Postgres (Prisma)
Not monitoredlow@atrium/infrastructureSchema, repositories and mappers exist. No app calls them yet.
checked never
Checks
Database connection
Nothing user-facing yet — no app reads or writes.
No HTTP surface to probe and no consumer to break. Turn this on when the first app opens a connection.
What it is
The persistence layer of the hexagonal architecture: Prisma schema, repositories, mappers and a dev-safe client that survives HMR. It is fully tested (51 tests) and completely unused — neither Next app opens a connection today.
That makes it low criticality right now and high leverage later: auth, saved grader scans and anything multi-user land here when they land.
Why it is dormant
The website is static and the grader is stateless — a scan is computed, returned and forgotten (GRADER_SCAN_STORE=file writes evidence to .tmp/ in non-production only). Nothing has needed durable storage yet, so the adapter exists ahead of its first consumer.
First things that will need it
- Grader scan history, so a restaurant can be re-scanned and compared over time.
- A durable rate limiter and spend guard, replacing the in-memory counters.
- Anything with accounts:
packages/applicationalready holds RegisterOwner and AuthenticateUser use cases with 79 passing tests.
When it breaks
Symptom
Migrations fail locally
Check
DATABASE_URL and DIRECT_URL in packages/infrastructure/.env.
Fix
bun run db:generate then bun run db:migrate from the repo root.
Configuration
| variable | status | purpose |
|---|---|---|
DATABASE_URLpackages/infrastructure/.env | set | Pooled Prisma connection. |
DIRECT_URLpackages/infrastructure/.env | set | Direct connection for migrations. |
Where to start reading
Prisma client
packages/infrastructure/src/client.tsRepositories
packages/infrastructure/src/repositories
In the repo
path
packages/infrastructureversion
files
lines
depends on
Incident history
No incidents recorded for this system.