Skip to content

Quick Start

  • Node.js >= 22 with corepack enabled (installs the pinned pnpm automatically)
Terminal window
corepack enable # first time only
pnpm install

No hace falta Docker. La API local (wrangler dev) usa el D1 local de wrangler: se migra con pnpm --filter @pinteach/api db:migrate:d1. Los scripts de Node de packages/db (db:seed, db:studio) usan libsql sobre DATABASE_URL=file:.dev/pinteach.db, relativo a su directorio (packages/db/.dev/), y no alimentan a la API local. En producción, D1.

Terminal window
cp .env.example .env # at the monorepo root, then fill in the keys you need
Terminal window
pnpm db:migrate
Terminal window
pnpm db:seed
Terminal window
pnpm dev

This starts all apps via Turborepo:

  • API: http://localhost:3001
  • Frontend (SPA): http://localhost:3737 (proxies /api to :3001)
  • Docs (Starlight): http://localhost:3838
Terminal window
pnpm --filter @pinteach/api dev # API only
pnpm --filter @pinteach/app dev # React SPA only

For development, use the quick login endpoint (registered only when NODE_ENV !== 'production'):

GET http://localhost:3001/api/auth/dev-login/:teacherId

The seed data includes teacher Maria Garcia with ID 00000000-0000-4000-a000-000000000001.

Command Purpose
pnpm typecheck TypeScript check all packages
pnpm lint Lint + format check (Biome)
pnpm build Build all packages
pnpm db:studio Open Drizzle Studio
pnpm db:generate Generate Drizzle migrations

The template is .env.example at the monorepo root (loaded by the API and by Drizzle). Minimum for local dev:

Terminal window
DATABASE_URL=file:.dev/pinteach.db
PUBLIC_APP_URL=http://localhost:3737
PORT=3001
SESSION_SECRET=your-secret-min-32-chars
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
STRIPE_SECRET_KEY=...
RESEND_API_KEY=...

See deploy/DEPLOYMENT.md in the repository for the full, authoritative per-environment variable reference.