Quickstart Guide
Welcome to the ZeroStack Quickstart guide! This guide is designed for developers who are just getting started. Follow these steps precisely to set up your environment and launch your first project.
Before you begin
Section titled “Before you begin”Make sure you’ve reviewed the prerequisites, including setting up your Cloudflare and GitHub accounts.
-
Open Your Terminal
The Terminal is where you will type commands to control your computer and build your apps.
- How to find it: Press
Cmd + Spaceon your keyboard, type “Terminal” (or “Ghostty” if you have it installed), and pressEnter. - You should see a window with a blinking cursor. Keep this window open!
- How to find it: Press
-
Set Up Your Environment (Dotfiles)
We use a standard set of configurations called “dotfiles” to make your terminal powerful and easy to use.
Copy and paste this command into your terminal and press
Enter:Terminal window curl -L https://raw.githubusercontent.com/builtby-win/dotfiles/main/install.sh | bashWhat does this do? It downloads and runs a script that sets up your Zsh configuration, Git shortcuts, and other essential developer tools.
-
Purchase and GitHub Access
You need access to our private templates (like
zerostack) to create your apps.- Purchase ZeroStack: You must purchase a license to access the private repository. Click here to purchase ZeroStack.
- GitHub Access: After purchase, ensure your GitHub account has been granted access to the builtby-win/zerostack repository.
-
GitHub Authentication
You need to tell your terminal who you are on GitHub so it can download your new project. In your terminal, run this command:
Terminal window gh auth login- What to choose:
- Account: GitHub.com
- Preferred protocol: HTTPS
- Authenticate: Login with a web browser
- A browser window will open. Click “Authorize” to finish the login.
- What to choose:
-
Create Your Application
Now you are ready to start your project. Run the following command, replacing
your-app-namewith whatever you want to call your project:Terminal window npx @builtby.win/cli your-app-name- Wait for it to finish: The CLI will check that you have access to the repository, download the template, and set up your new project folder.
-
Initialize Your Project
Once the CLI is finished, you must enter your new project folder and run the setup command. Run these two commands in your terminal:
Terminal window cd your-app-namepnpm setup- What does
pnpm setupdo? This installs all the necessary packages and configures your local environment (like your database and authentication) for development.
- What does
-
Cloudflare & Deployment
We use Cloudflare to host our applications. If you haven’t already, sign up for a free account.
-
Login to Cloudflare: Run this command in your terminal:
Terminal window npx wrangler login -
Deploy: Push your app live to the internet (this performs a full production build and applies database migrations):
Terminal window pnpm deploy -
GitHub CI/CD Integration: Automatically deploy your app every time you push to GitHub:
- Navigate to the Workers & Pages section on your Cloudflare Dashboard.
- Select the application you just deployed.
- Go to Settings > Builds & deployments > Git integration.
- Click Connect GitHub, select your account, and choose the repository you created.
- For more details, see the official Cloudflare Git Integration Guide.
-
Your app is now fully set up with automated deployments! You can find your live URL in the Cloudflare Dashboard.