Scripts
Available npm/bun scripts
All scripts should be run from the repository root using Bun and Turborepo.
Development
Start Development Server
bun run devStarts the Next.js development server with Turbopack for fast hot-reloading.
- Web app: http://localhost:3000
- Docs: http://localhost:3001
Filter by App
bun run dev --filter=web # Only web app
bun run dev --filter=docs # Only docsBuilding
Build All Apps
bun run buildRuns:
- Database migrations (
db:migrate) - Next.js production build
Build Specific App
bun run build --filter=web
bun run build --filter=docsBuild Without Migrations
bun run build:onlySkips database migrations (useful for CI or when migrations already ran).
Production
Start Production Server
bun run startStarts the production server for all apps.
Database
Run Migrations
bun run db:migrateApplies pending database migrations. Safe to run multiple times.
Push Schema (Development)
bun run db:pushPushes schema changes directly to the database without creating migration files. Development only — use migrations for production.
Generate Migration
bun run db:generateGenerates a new migration file from schema changes.
Open Database Studio
bun run db:studioOpens Drizzle Studio for visual database browsing and editing at http://localhost:4983
Code Quality
Type Checking
bun run tscRuns TypeScript type checker across all apps.
Linting
bun run lintRuns ESLint on all apps. Auto-fixes where possible.
Formatting
bun run format # Format all files
bun run format:check # Check without formattingFormats code with oxfmt (Rust-based formatter).
CSS Linting
bun run stylelintRuns Stylelint on CSS files.
Testing
Run All Tests
bun testRuns the test suite.
Load Testing
# Start the app first
docker compose up -d
bun run dev
# In another terminal
bun run 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
bun run 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 |
|---|---|
bun run dev | Start development server (Turbopack) |
bun run build | Build for production (with migrations) |
bun run build:only | Build without running migrations |
bun run start | Start production server |
bun run tsc | TypeScript type checking |
bun run lint | Run ESLint |
bun run format | Format code with oxfmt |
bun run format:check | Check formatting without changes |
bun run stylelint | Run Stylelint for CSS |
bun test | Run tests |
bun run db:migrate | Run database migrations |
bun run db:push | Push schema to database (dev only) |
bun run db:generate | Generate migration files |
bun run db:studio | Open Drizzle Studio |
bun run 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