Scripts
Available pnpm scripts
All scripts should be run from the repository root using Bun and Turborepo.
Development
Start Development Server
pnpm devStarts the Next.js development server with Turbopack for fast hot-reloading.
- Web app: http://localhost:3000
- Docs: http://localhost:3001
Filter by App
pnpm --filter web dev # Only web app
pnpm --filter docs dev # Only docsBuilding
Build All Apps
pnpm buildRuns:
- Database migrations (
db:migrate) - Next.js production build
Build Specific App
pnpm --filter web build
pnpm --filter docs buildBuild Without Migrations
pnpm build:onlySkips database migrations (useful for CI or when migrations already ran).
Production
Start Production Server
pnpm startStarts the production server for all apps.
Database
Run Migrations
pnpm db:migrateApplies pending database migrations. Safe to run multiple times.
Push Schema (Development)
pnpm db:pushPushes schema changes directly to the database without creating migration files. Development only — use migrations for production.
Generate Migration
pnpm db:generateGenerates a new migration file from schema changes.
Open Database Studio
pnpm db:studioOpens Drizzle Studio for visual database browsing and editing at http://localhost:4983
Code Quality
Type Checking
pnpm tscRuns TypeScript type checker across all apps.
Linting
pnpm lintRuns ESLint on all apps. Auto-fixes where possible.
Formatting
pnpm format # Format all files
pnpm format:check # Check without formattingFormats code with oxfmt (Rust-based formatter).
CSS Linting
pnpm stylelintRuns Stylelint on CSS files.
Testing
Run All Tests
pnpm testRuns the test suite.
Load Testing
# Start the app first
docker compose up -d
pnpm dev
# In another terminal
pnpm loadtestRuns k6 load tests against the local development server.
Docker
Start Services
docker compose up -dStarts PostgreSQL and Valkey containers.
View Logs
docker compose logs -f
docker compose logs -f db # PostgreSQL only
docker compose logs -f valkey # Valkey onlyStop Services
docker compose downReset Database
docker compose down -v # Removes volumes
docker compose up -d
pnpm db:migrateTurborepo
Turborepo caches task outputs for faster subsequent runs.
Clear Cache
bunx turbo run build --forceForces a rebuild, ignoring cache.
View Task Graph
bunx turbo run build --graphVisualizes task dependencies.
Script Summary
| Command | Description |
|---|---|
pnpm dev | Start development server (Turbopack) |
pnpm build | Build for production (with migrations) |
pnpm build:only | Build without running migrations |
pnpm start | Start production server |
pnpm tsc | TypeScript type checking |
pnpm lint | Run ESLint |
pnpm format | Format code with oxfmt |
pnpm format:check | Check formatting without changes |
pnpm stylelint | Run Stylelint for CSS |
pnpm test | Run tests |
pnpm db:migrate | Run database migrations |
pnpm db:push | Push schema to database (dev only) |
pnpm db:generate | Generate migration files |
pnpm db:studio | Open Drizzle Studio |
pnpm loadtest | Run k6 load tests |
docker compose up -d | Start PostgreSQL and Valkey |
docker compose down | Stop Docker services |
Next Steps
- Architecture — Understand the codebase
- Testing — Test strategy and guides
- Database Guide — Database operations