Quick Start
Prerequisites
Section titled “Prerequisites”- Node.js >= 22 with corepack enabled (installs the pinned pnpm automatically)
1. Install dependencies
Section titled “1. Install dependencies”corepack enable # first time onlypnpm install2. Base local
Section titled “2. Base local”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.
3. Configure environment
Section titled “3. Configure environment”cp .env.example .env # at the monorepo root, then fill in the keys you need4. Run database migrations
Section titled “4. Run database migrations”pnpm db:migrate5. Seed development data
Section titled “5. Seed development data”pnpm db:seed6. Start the dev servers
Section titled “6. Start the dev servers”pnpm devThis starts all apps via Turborepo:
- API:
http://localhost:3001 - Frontend (SPA):
http://localhost:3737(proxies/apito:3001) - Docs (Starlight):
http://localhost:3838
Start individual apps
Section titled “Start individual apps”pnpm --filter @pinteach/api dev # API onlypnpm --filter @pinteach/app dev # React SPA onlyDev Login
Section titled “Dev Login”For development, use the quick login endpoint (registered only when
NODE_ENV !== 'production'):
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 |
|---|---|
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 |
Environment Variables
Section titled “Environment Variables”The template is .env.example at the monorepo root (loaded by the API and by
Drizzle). Minimum for local dev:
DATABASE_URL=file:.dev/pinteach.dbPUBLIC_APP_URL=http://localhost:3737PORT=3001SESSION_SECRET=your-secret-min-32-charsGOOGLE_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.