Skip to content

apps/api/src/adapters/db/index.ts ​

Auto-generated by scripts/generate-file-docs.ts. Do not edit — overwritten on every run.

Purpose ​

Prisma client singleton. The repository pattern (docs/internal/implementation/repository-adapters.md) dictates that this is the ONLY place outside apps/api/src/adapters/db/ permitted to import @prisma/client. Service classes consume repository interfaces, not the Prisma client directly. The singleton avoids exhausting Postgres connections during hot-reload in development (Node modules reload, but the global is preserved). /

Exports ​

  • export default prisma;

Imports ​

  • @prisma/client

Imported by ​

Heritage Community Hub — Internal. Access restricted via Cloudflare Access + Entra ID.