Skip to Content
StackBlaze Templates — operator documentation

Scripts

npm scripts available in a scaffolded project. The package manager is npm.

Development

ScriptDescription
npm run devStart the dev server (http://localhost:3000 ).
npm run buildProduction build.
npm run startServe the production build.
npm run lintESLint (flat config).

Tests

ScriptDescription
npm testRun all tests once (Vitest).
npm run test:watchRun tests in watch mode.

Database

ScriptDescription
npm run db:pushPush the Drizzle schema to the database.
npm run db:generateGenerate Drizzle migration files.
npm run db:studioOpen Drizzle Studio (database GUI).
npm run auth:generateRegenerate the better-auth schema into lib/db/schema.ts.

Admin (admin-portal feature only)

ScriptDescription
npm run db:seed-adminPromote 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.