Direct admin tool for the Carmen inventory PostgreSQL database. Every change is permanent — there is no undo. The audit log is the only recovery record.
cp .env.example .env.localand fill inGOD_MODE_PASSWORD,SESSION_SECRET(>=32 chars), and the DB URLs.bun installbun run dev(uses.env.local). Usebun run dev:local/bun run dev:prod/bun run dev:uatto pick.env.local/.env.prod/.env.uatexplicitly. The server port comes fromPORTin the chosen env file (3305 by default).
The CARMEN_SYSTEM.tb_god_mode_audit table is created automatically on the first audited operation — any delete, edit, raw-SQL write, or platform migration self-ensures it.
bun run test— unit + integration (integration uses embedded-postgres; no Docker needed). (Usebun run test, NOTbun test— the latter invokes Bun's built-in runner and cannot run our Vitest suite.)bunx playwright test— light E2E.
- Shared-secret login; cookie session.
- Deletes show a blast-radius preview and require typing a confirm phrase.
- Deleting a business unit can optionally
DROP SCHEMAits tenant database (off by default; requires typing the schema name). - Raw SQL writes require an explicit Commit after a preview.
CASCADE_MAX_ROWS/CASCADE_MAX_DEPTHcap the blast radius; an over-cap cascade is refused.
/platform-migrations runs the migration scripts of the sibling
@repo/prisma-shared-schema-backstage package by spawning its own commands
(prisma migrate deploy, db:tenant-views:apply, db:seed.*). It requires:
BACKSTAGE_PACKAGE_DIR— path to the package (defaults to../carmen-turborepo-backend/packages/prisma-shared-schema-backstage). The repo must be checked out withnode_modulesinstalled;bunand (for tenant views)psqlmust be on PATH.SYSTEM_DIRECT_URL— PrismadirectUrl(non-pooled) for migrations/seeds. Defaults toSYSTEM_DATABASE_URLwhen unset.ALLOW_DANGER_OPS— set totrueto expose the danger zone (db:migrate:reset). Off by default: the group is hidden from the page and the API refuses the op with 403. Changing it requires a server restart.PROTECTED_SCHEMAS— comma-separated schemas/schemasmay never drop (exact, case-sensitive), e.g.CARMEN_SYSTEM,CARMEN_FILE,CRONJOBS,ISO_PROD,ISO,QA_MANUAL,public. The system schema andpublicare always protected regardless. Requires a server restart.
Migrations run against the DB this instance is pointed at (the banner shows the
target). Writes require typing the schema name; resets (hidden unless ALLOW_DANGER_OPS=true) need a second
confirmation. Every run is recorded in tb_god_mode_audit.