Scripts
npm scripts available in a scaffolded project. The package manager is npm.
Development
| Script | Description |
|---|---|
npm run dev | Start the dev server (http://localhost:3000 ). |
npm run build | Production build. |
npm run start | Serve the production build. |
npm run lint | ESLint (flat config). |
Tests
| Script | Description |
|---|---|
npm test | Run all tests once (Vitest). |
npm run test:watch | Run tests in watch mode. |
Database
| Script | Description |
|---|---|
npm run db:push | Push the Drizzle schema to the database. |
npm run db:generate | Generate Drizzle migration files. |
npm run db:studio | Open Drizzle Studio (database GUI). |
npm run auth:generate | Regenerate the better-auth schema into lib/db/schema.ts. |
Admin (admin-portal feature only)
| Script | Description |
|---|---|
npm run db:seed-admin | Promote a registered user to the admin role by email (reads SUPER_ADMIN_EMAIL). See Admin portal. |
db:* scripts and integration tests need Postgres running
(docker compose up -d, or POSTGRES_PORT=5433 docker compose up -d if 5432
is taken) and — for tests — the stackblaze_test database to exist.
drizzle-kit reads from .env.local.