Files
TudorandClaude Opus 5.5 355a5a841c
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m12s
PR Checks / Backend Smoke (pull_request) Successful in 10s
PR Checks / Build Backend (no push) (pull_request) Successful in 18s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m19s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 11s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 17s
feat(search): offer a quarter-mile distance
Adds "Within 0.25 miles" to the Distance control; 0.5 stays the default.
The radius shown in the results heading and drawn on the map was rounded
to one decimal place, which would have turned 0.25 into 0.3. It now keeps
two, and the list heading says "1 mile" rather than "1.0 miles".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 17:52:59 +01:00
..

SchoolCompare frontend and CMS

Next.js App Router with React, TypeScript, CSS Modules, Chart.js, Leaflet and Payload CMS. It serves school search, comparisons, rankings, school/place detail pages and editorial content across England.

Start with the repository overview, architecture and development checks.

Source map

Path Purpose
app/(frontend)/ Public root layout, server pages and FastAPI proxy
app/(payload)/ Payload root layout, /admin and /cms-api
app/robots.ts, app/opengraph-image.tsx, root icons Site-wide metadata endpoints
components/ Client views and reusable display components
components/school/ School detail sections
lib/api.ts, lib/types.ts Fetch wrappers and manual school API types
lib/schoolSections.ts, lib/compareLogic.ts Presentation decisions and data preparation
context/, hooks/ Comparison state, suggestion state and responsive behaviour
collections/, blocks/, migrations/ CMS schema and production migrations
__tests__/ Jest and React Testing Library tests

Do not introduce a shared app/layout.tsx: public pages and Payload have separate root layouts. Keep root metadata files outside the route groups.

Data and state

Server pages fetch initial data directly from FASTAPI_URL. Browser fetches use /api by default, forwarded by app/(frontend)/api/[...path]/route.ts. FASTAPI_URL must include /api. See .env.example for CMS and API settings.

State uses React hooks/context, URL search parameters and localStorage for the comparison basket. SWR is not installed. Maps use dynamic Leaflet wrappers. Revalidation intervals are configured in fetch wrappers and pages; they vary by resource. Backend reloads do not automatically invalidate every Next.js cache.

Commands

npm ci
npm run typecheck
npm test -- --runInBand
npm run build

test:watch and test:coverage are also available. There is no lint script. A running application needs the backend/data environment described in the development guide.

After CMS field or editor changes, run npm run generate:importmap. Keep payload-types.ts generated from the CMS schema rather than editing it by hand. The build must work without a database connection; avoid module-scope CMS queries and DB-backed generateStaticParams functions.

See publishing for CMS operations and deployment for staging and production promotion.