Configuration and scripts
Repository scripts and runtime/test configuration. package.json is the source for exact commands and dependency versions.
System explanation · Choosing checks
Development reads DATABASE_URL; explicit production scripts use PROD_DATABASE_URL. Seed aliases include --reset. Migration generation and application are separate steps. See the first-day guide before running a write command.
Source files
| File | Responsibility / entry points |
|---|---|
scripts/backfill-report-index.ts
|
Rebuilds report eligibility/variance/transmittal fields in bounded batches with version guards. |
scripts/db/migrations.ts
|
Reads migration files/journal and compares applied history and required
columns. migrationsFolder, migrationFiles, Migration, AppliedMigration, migrationPlan, databaseStatus |
scripts/db/target.ts
|
Selects development/production connection, normalizes migration connection and
redacts diagnostics. DatabaseTarget, resolveDatabaseTarget, redact, errorDetails |
scripts/db-migrate.ts
|
Migration/status CLI with target selection, history checks, advisory lock and
redacted diagnostics. main |
scripts/seed-snap-negative.ts
|
Seed CLI, preflight collisions, and one transaction for policies, reset and review
rows. Production needs --confirm-production. parseArgs, missingSeedPolicies |
scripts/prune-documents.ts
|
Lists, and with --delete removes, stored PDFs that no snapshot version references
and that are older than a day. main |
package.json
|
Exact scripts and dependency versions; install with the matching bun.lock. |
bun.lock
|
Locked dependency resolution used by frozen Bun installs. |
bunfig.toml
|
Bun test discovery root is src; Playwright specs run separately. |
next.config.ts
|
Application-specific Next configuration. |
tsconfig.json
|
TypeScript compiler and @/ source-path alias configuration. |
drizzle.config.ts
|
Schema and migration output configuration for Drizzle tooling. |
docker-compose.yml
|
Optional loopback PostgreSQL 18 service and persistent development volume. |
playwright.config.ts
|
Serial functional browser tests, localhost test session, fresh build/start and local document storage. |
playwright.perf.config.ts
|
Performance projects, local/remote profiles, repeats, reporters and server setup. |
postcss.config.mjs
|
Tailwind PostCSS plugin configuration. |
components.json
|
UI generator conventions and import aliases. |
.oxlintrc.json
|
Repository lint settings. |
.oxfmtrc.json
|
Repository formatting settings. |
next-env.d.ts |
Generated Next TypeScript references; do not hand-maintain. |