Spaces:
Running
Running
cdupland
Add FastAPI application structure with Prisma integration, including API endpoints, services, repositories, and database setup. Introduce strict layering rules, documentation, and testing strategy.
0ddf928 Database workflow
The project uses Supabase SQL migrations as source of truth and Prisma for Python client generation.
Mandatory flow
- Create schema change in local Supabase.
- Generate migration:
supabase db diff -f <migration_name>
- Review migration SQL in
supabase/migrations/. - Rebuild local DB:
supabase db reset
- Sync Prisma schema:
prisma db pullprisma generate
- Run tests, then commit SQL + Prisma schema + code/tests.
Rules
- Never edit an already applied migration.
- Never edit
prisma/schema.prismamanually. - Avoid direct schema-only changes in remote dashboard.