Atriumstatus

master9da7fa5

← all systems

Postgres (Prisma)

Not monitoredlow@atrium/infrastructure

Schema, 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/application already 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

variablestatuspurpose
DATABASE_URLpackages/infrastructure/.envsetPooled Prisma connection.
DIRECT_URLpackages/infrastructure/.envsetDirect connection for migrations.

Where to start reading

  • Prisma client

    packages/infrastructure/src/client.ts
  • Repositories

    packages/infrastructure/src/repositories

In the repo

path

packages/infrastructure

version

0.0.1

files

36 (16 tests)

lines

2,192

depends on

@atrium/application, @atrium/domain, @atrium/shared
engineering view →

Incident history

No incidents recorded for this system.