Quick Start
pnpm install
cp .env.example .dev.vars
pnpm db:migrate:local
pnpm dev
Default URL: http://localhost:3000
About .dev.vars
.env.example is a field template; write actual local config to .dev.vars and never commit it.
| File | Purpose |
|---|---|
.env.example | Reference template, safe to commit |
.dev.vars | Read by Wrangler + Vite, do not commit |
Important
.env.examplemay contain placeholder values. Replace with your own secrets before deploying.
Minimum Config
To explore the UI only, start with:
BETTER_AUTH_SECRET—openssl rand -base64 32BETTER_AUTH_URL/SERVER_URL—http://localhost:3000VITE_SITE_URL—http://localhost:3000
For login, payments, and email, add Google OAuth, Resend, Stripe, etc. See Secrets and Resend integration.
Common Commands
| Command | Description |
|---|---|
pnpm dev | Dev server (port 3000) |
pnpm db:migrate:local | Local D1 migrations |
pnpm test | Vitest unit tests |
pnpm lint | ESLint |
pnpm build | Production build (no deploy) |
Local D1
Migrations live in migrations/. After pulling code with new migrations:
pnpm db:migrate:local
Inspect local tables:
pnpm db:studio
Good to know
Local D1 data is isolated from production. Use
pnpm db:migrate:remotefor production — see Production Deploy.