Getting Started
Setting up your development environment
This guide helps you bootstrap a Beztack project locally.
Prerequisites
Make sure you have installed:
Create a New Project
You can create a new Beztack project using the create-beztack command:
pnpm create beztackThe CLI will walk you through:
- Project name: The name for your new project (lowercase with dashes)
- Project description: A short description of your project
- Initialize Git repo?: Choose if you want to set up a new Git repository
- Install dependencies?: Choose if you want to automatically install dependencies using
pnpm install
Useful CLI Commands
After project creation, you can use the Beztack CLI for updates and tooling:
pnpm dlx beztack init
pnpm dlx beztack template status
pnpm dlx beztack template plan --to 1.2.0
pnpm dlx beztack template apply --dry-runTemplate Sync is useful when you want to preview and apply template changes without manually diffing your project.
Initial Setup
Once the project is created, navigate to the directory and set up your environment:
1. Set Up Environment Variables
Copy the .env.example file to .env:
cd your-project
cp apps/api/.env.example apps/api/.env
cp apps/ui/.env.example apps/ui/.env
cp apps/docs/.env.example apps/docs/.env2. Configure Required Variables
Open the .env files in each app directory and set the required variables.
At minimum, configure your database/auth variables and the payment provider you
plan to use (Polar or Mercado Pago).
3. Initialize the Database
Run database migrations:
pnpm run pushDevelopment
To start the dev server (UI + API):
pnpm run devThis will start:
- UI at http://localhost:5173
- API at http://localhost:3000
Additional Nx Commands
Beztack uses Nx for task execution. You can run individual apps:
- UI:
npx nx serve ui - API:
npx nx serve api - Docs:
npx nx serve docs(Defaults to http://localhost:3001)
Production Build
To build all projects:
pnpm run buildOr build specific projects:
npx nx build ui
npx nx build api