Development setup
Fresh clone to local server
Install Node 22 (
nvm usereads the repository.nvmrc). The supported range is recorded in the rootpackage.json.Clone the repository and select the intended branch. Normal feature work starts from
staging.Install exactly the committed dependencies:
bashnpm ciCreate a local configuration file without adding secrets to Git:
bashcp .env.example .envObtain an approved non-production
DATABASE_URLfrom the project owner. Never point local development or a seed command at production.Start the server:
bashnpm run devThe expected startup signal is
serving on port 5000; the dependency-free health check isGET /api/healthz.Before opening a PR, run the focused test plus the normal static/build gates:
bashnpm test npm run check npm run build
Important limitation: schema bootstrap is not yet safe to automate
The repository currently has SQL migrations in three locations with duplicate sequence numbers. There is no approved migration runner, and npm run db:push is deliberately disabled. Do not hand-apply all SQL files from a fresh clone. See Migration Inventory for the collision register and the gated remediation path.
script/seed.ts is a legacy demo-data script. It is not part of the fresh-clone path, has no npm script, and must not be run against any shared or production database until it is redesigned under a separate schema/data-approved task.
