Operations
Production is designed as separate API and worker processes.
API service
└─ npm start
Worker service
└─ npm run worker
Shared:
PostgreSQL
Redis
private object storage
Health
GET /api/health reports runtime health from database and queue checks.
Readiness
npm run preflight:production validates production configuration shape/presence without making vendor calls. npm run verify:runtime-role checks that the configured database role cannot bypass tenant row-level security, which the API, the worker, and the serverless entrypoint each refuse to start without.
Workers
Workers use BullMQ/Redis and are expected to run with:
- bounded retries;
- backoff;
- timeouts;
- leases;
- cancellation;
- dead-letter/replay handling;
- correlation IDs;
- health/metrics.
Migrations
The repository maintains an authoritative migration replay chain and includes verification tooling.
Production distinction
The API and worker run as deployed services; health, queue execution, and scheduled work are verified there. Operational drills that depend on the hosting environment — restore rehearsal and external alert delivery — are not claimed here until they are exercised against the deployed environment.