Context
The API, worker, Postgres and Redis run only on the developer's machine. We need a first public deployment for the capstone demo, on a free tier, without a credit card, and without provisioning anything on the shared claude.ai account.
Decision
- Postgres → Supabase, the project already created for SmartLearn (
lqbnldwxodvhmevfunkw).vectorandpg_trgmare pre-installed, which the catalog and AI phases (M2–M6) will need. Prisma owns the tables; migrations are applied withdb:deploy. - Redis → Upstash, free tier, TLS URL (
rediss://…) inREDIS_URL. - API → Render, a Docker web service on the free plan, built from
apps/api/Dockerfilewith the repo root as context, described byrender.yaml. The managed host assigns the port throughPORT, whichmain.tsnow honours. - Worker → not deployed yet. Render background workers are paid and nothing enqueues jobs in the auth phase. It lands later as its own service from
apps/worker/Dockerfile, sharing the sameREDIS_URL.
Consequences
- Free Render web services spin down when idle, so the first request after a quiet spell is slow. Acceptable for a demo; revisit if a mentor needs it warm.
- Secrets (
DATABASE_URL,REDIS_URL,JWT_ACCESS_SECRET, …) live only in the Render dashboard and local.env.local, never in the repo — therender.yamlentries aresync: false. - Migrations are run from a developer machine against Supabase (
db:deploy), not on container boot, so a bad migration can never wedge a rolling deploy. - The runbook is
docs/deploy/backend.md.