Canonical path: Docker image (Dockerfile) exposing port 3002, or CapRover via captain-definition (same port).
npm ci
npm run db:migrate
# optional demo/admin seed — never auto-run destructive seed in prod
npm run db:seed:admin
npm startSeparate migrate from seed. Local/demo: npm run db:init (migrate + db:seed) loads committed fixtures/seed. db:seed clears domain tables and reloads fixtures — do not run in production. Rebuild JSON from CSVs with npm run db:seed:refresh-fixtures only when source files change.
Local development uses SQLite. Production uses PostgreSQL via POSTGRES_URL when NODE_ENV=production.
| Path | Use |
|---|---|
GET /health/live |
Liveness (no DB) |
GET /health/ready |
Readiness (DB + Redis) |
GET /health or / |
Rich status (HTML/JSON) |
None by design. Rows are hard-deleted. Advising sessions and selected courses are replaced/updated in place. If audit history is required later, add explicit history tables — do not silently soft-delete without a product decision.
Dropped permanently (Phase 1). Course.faculty / Course.department remain denormalized strings for display/import. Do not revive Faculty / Department tables unless product requires normalized org units; then migrate strings → FKs in a dedicated migration.
Sequelize models use mixed casing (SelectedCourses vs semestercourses). Do not rename in place without a dedicated migration + downtime plan. Track as follow-up; indexes/uniques already cover hot paths.
Existing routes return resource-shaped JSON ({ token, … }, arrays, etc.). Phase 7 error responses add a dual shape: { message, error: { message, code, statusCode } } while keeping top-level message for older clients. A global { data, error } success envelope is deferred until the SPA is updated together.
- Prefer managed provider snapshots when available.
- Logical dump:
pg_dump "$POSTGRES_URL" --format=custom --file="myadvisor-$(date +%Y%m%d).dump"- Restore:
pg_restore --clean --if-exists --dbname="$POSTGRES_URL" myadvisor-YYYYMMDD.dump- Keep dumps off the app container (ephemeral filesystem). Store in object storage or ops backup volume.
- After restore:
npm run db:migrate:statusto confirm meta matches code.
- CORS allowlist:
config/allowedOrigins.js+FRONTEND_URL - Auth header name:
token(notAuthorization: Bearer) - See API.md and architecture.md