Quick Start
Prerequisites
Section titled “Prerequisites”- Bun >= 1.1 (package manager + runtime)
- Docker (for PostgreSQL and Redis)
- Node.js >= 22
1. Install dependencies
Section titled “1. Install dependencies”bun install2. Start infrastructure
Section titled “2. Start infrastructure”docker compose up -dThis starts:
- PostgreSQL 16 on port
5433(user:pinteach, password:pinteach) - Redis on port
6379
3. Run database migrations
Section titled “3. Run database migrations”bun run db:migrate4. Seed development data
Section titled “4. Seed development data”bun run db:seed5. Start the dev servers
Section titled “5. Start the dev servers”bun run devThis starts all apps via Turborepo:
- API:
http://localhost:3001 - Frontend:
http://localhost:3737(proxies/apito:3001)
Start individual apps
Section titled “Start individual apps”bun run dev --filter=api # API onlybun run dev --filter=web # Frontend onlyDev Login
Section titled “Dev Login”For development, use the quick login endpoint:
GET http://localhost:3001/api/auth/dev-login/:teacherIdThe seed data includes teacher Maria Garcia with ID 00000000-0000-4000-a000-000000000001.
Useful Commands
Section titled “Useful Commands”| Command | Purpose |
|---|---|
bun run typecheck | TypeScript check all 5 packages |
bun run lint | Lint + format check (Biome) |
bun run build | Build all packages |
bun run db:studio | Open Drizzle Studio |
bun run db:generate | Generate Drizzle migrations |
Environment Variables
Section titled “Environment Variables”Create .env files in apps/api/:
DATABASE_URL=postgresql://pinteach:pinteach@localhost:5433/pinteachREDIS_URL=redis://localhost:6379APP_URL=http://localhost:3737PORT=3001SESSION_SECRET=your-secret-min-32-charsGOOGLE_CLIENT_ID=...GOOGLE_CLIENT_SECRET=...STRIPE_SECRET_KEY=...RESEND_API_KEY=...See the full environment variables list for all options.