The database layer combines Supabase-managed PostgreSQL with Prisma ORM. Prisma generates TypeScript types directly from the schema file, so every query is type-checked at compile time. No manual type definitions for database entities — the schema is the single source of truth.
Development follows a schema-first workflow: define models in schema.prisma, run migrations, and the generated client updates automatically. Server Components query the database directly without an intermediate API layer, reducing latency and eliminating redundant fetch calls. Connection pooling is handled by Supabase, keeping the application stateless.