2026-09-14 23:01:15 +01:00
|
|
|
# SchoolCompare project context
|
2026-01-06 21:34:40 +00:00
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
## Maintained documentation
|
2026-01-06 21:34:40 +00:00
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
Read [README.md](README.md), [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) and
|
|
|
|
|
[docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for the current implementation.
|
|
|
|
|
[docs/LEGACY_CODE.md](docs/LEGACY_CODE.md) records obsolete paths and deliberate
|
|
|
|
|
compatibility code. Historical design documents are not current setup instructions.
|
2026-01-06 21:34:40 +00:00
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
## Architecture constraints
|
2026-01-06 21:34:40 +00:00
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
- Next.js serves the public UI. FastAPI serves school data from dbt-built `marts.*`.
|
|
|
|
|
The backend does not create school tables or import CSVs at startup.
|
|
|
|
|
- School coverage spans England and multiple phases, not only primary schools in
|
|
|
|
|
Wandsworth and Merton.
|
|
|
|
|
- `/api/*` belongs to the FastAPI proxy. Payload uses `/cms-api` and `/admin`.
|
|
|
|
|
- Payload runs inside Next.js, with its own `payload` schema and persistent media.
|
|
|
|
|
Keep CMS migrations independent of school-data transformations.
|
|
|
|
|
- Public and Payload route groups have separate root layouts. Do not introduce
|
|
|
|
|
`app/layout.tsx`. Keep site-wide metadata files at the `app/` root.
|
|
|
|
|
- Builds must succeed with `DATABASE_URL` unset. Do not call `getCachedPayload()`
|
|
|
|
|
at module scope or add DB-backed `generateStaticParams`.
|
|
|
|
|
- After changing CMS fields/editors, run `npm run generate:importmap` and commit
|
|
|
|
|
the generated import map. See `nextjs-app/docs/PUBLISHING.md`.
|
|
|
|
|
- The backend and pipeline GIAS dictionary copies are generated together; preserve
|
|
|
|
|
their parity. Tests enforce it.
|
2026-01-06 21:34:40 +00:00
|
|
|
|
2026-07-03 06:50:40 +01:00
|
|
|
## SDLC
|
|
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
Follow [docs/DEPLOY.md](docs/DEPLOY.md).
|
2026-07-03 06:50:40 +01:00
|
|
|
|
2026-09-14 23:01:15 +01:00
|
|
|
- Never push directly to `main`. Use a feature branch and a PR with passing checks.
|
|
|
|
|
- Merges deploy staging only. Production promotion is a separate human decision;
|
|
|
|
|
do not trigger the promotion workflow yourself.
|
|
|
|
|
- Update E2E journeys in the same PR when changing user-facing behaviour.
|
|
|
|
|
- Do not attempt to start a local server to test the application; use unit checks
|
|
|
|
|
and the configured integration environment.
|