Local Development
Day-to-day commands, the local database, code style, and adding dependencies.
For first-time setup, see Setup.
Commands
| Command | What it does |
|---|---|
pnpm dev | Start the dev server (Turbopack) at localhost:3000. |
pnpm build / pnpm start | Production build, and run it locally. |
pnpm check | Typecheck and lint. Run before committing. |
pnpm format | Format the codebase with Prettier. |
pnpm test / pnpm test:e2e | Unit / end-to-end tests — see Testing. |
pnpm local:up / pnpm local:down | Start / stop the local Postgres container. |
pnpm db:generate | Generate a migration from schema changes. |
pnpm db:migrate | Apply migrations to the database at DIRECT_URL. |
pnpm db:studio | Browse and edit your data in Drizzle Studio. |
While working on billing, keep stripe listen running in a second terminal —
see Stripe Setup.
Local database
pnpm local:up starts Postgres 17 in Docker on port 5432, with a named
volume so data survives restarts. To start over with an empty database:
docker compose -f docker-compose.local.yml down -v
pnpm local:up
pnpm db:migrateCode style
ESLint and Prettier run through pnpm check and pnpm format. On top of
Next.js's ESLint config, imports are sorted and unused imports flagged
automatically, and Prettier sorts Tailwind classes.
The repo ships VS Code settings in .vscode/: open the folder, install the
recommended extensions (Prettier, ESLint, Tailwind CSS IntelliSense) when
prompted, and files are formatted and lint-fixed on save.
Dependencies
Use pnpm — the repo ships pnpm-lock.yaml, and npm or yarn would create
a second, diverging lockfile.
pnpm add <package> # runtime dependency
pnpm add -D <package> # dev-only: tooling, types, test librariesAdding a UI component
Components come from shadcn/ui, built on Base UI rather than Radix
(components.json sets "style": "base-vega"). Add one with:
pnpm dlx shadcn@latest add <component>Some third-party registries, such as @magicui, generate components that
import Radix. If a new component's imports don't match the rest of
src/components/ui/ (@base-ui/react), rewrite them rather than adding a
second primitives library.