Quick Start
Local Setup
Fastest way to run BetterStarter locally in under 2 minutes.
Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).
Prerequisites
- Node.js 22+
- pnpm (npm, yarn, bun also works)
- Docker Desktop (or Docker Engine) running locally
Quick Start
git clone https://github.com/azizali/betterstarter.git mybetterapp
cd mybetterapp
pnpm install
pnpm setup -- --yes --startWhat pnpm setup does
The setup command automates local bootstrapping:
- Creates or starts a Docker Postgres container
- Uses a database name from your folder name (or your provided name)
- Creates
.env.localfrom.env.samplewhen needed - Sets APP_BASE_URL, BETTER_AUTH_URL, DATABASE_URL
- Generates BETTER_AUTH_SECRET if missing/placeholder
- Runs database sync with Drizzle (db:push)
- Optionally starts the dev server when --start is passed
Command Reference
| Command | Purpose |
|---|---|
pnpm setup | Interactive local bootstrap |
pnpm setup -- --yes | Bootstrap using defaults |
pnpm setup -- --yes --start | Forward flags explicitly through pnpm |
pnpm setup -- --db-name mybetterapp | Use a custom Postgres database name |
pnpm setup -- --help | Show setup CLI help |
Flag Notes
| Flag | Description |
|---|---|
--yes | Skip prompts and use defaults |
--start | Start the app after setup completes |
--db-name | Override the default database name |
-- | Required when forwarding flags through pnpm |
Local Email Behavior
You do not need Plunk for local setup.
| Environment | Behavior |
|---|---|
| Development without Plunk | Auth emails are logged to the server console |
| Development with Plunk | Real emails are sent |
| Production | A real email provider is required |
Manual Database Setup
Use this path if you do not want the Docker automation.
pnpm db:generate
pnpm db:migrate
pnpm devBefore running those commands:
- Create your local database
- Set
DATABASE_URLin.env.local
See the local database guide