Concern
Object-relational mapping and schema.
Technology
Prisma
Documentation
- Website: https://www.prisma.io/
- Repository: https://github.com/prisma/prisma
- Getting started: https://www.prisma.io/docs/getting-started
- NestJS integration: NestJS – Prisma recipe, Prisma – NestJS guide
Version
v7
Implementation
The boilerplate generation skill sets up Prisma v7 with PostgreSQL. backend/prisma.config.ts is the single source of Prisma CLI configuration: schema path, migrations.path (e.g. prisma/migrations), migrations.seed (command for prisma db seed, e.g. ts-node prisma/seed.ts), and datasource.url (with a fallback so prisma generate works without a running DB). The deprecated package.json#prisma property is not used. Schema lives in backend/prisma/schema.prisma (datasource has provider = "postgresql" only; URL comes from the config). Generator output is backend/src/generated/prisma. PrismaService (NestJS injectable) extends PrismaClient and uses @prisma/adapter-pg; it injects AppConfigService and passes DATABASE_URL from config (appConfig.get('DATABASE_URL')) into the client so Prisma uses the same validated config as the rest of the app. It is registered in a backend module so services can inject it. The skill creates the config, schema, initial migration assets, and wires PrismaModule/PrismaService into the app.
Integration
relational-data / PostgreSQL
Prisma schema targets PostgreSQL. Generates Prisma Client used by repository-layer.