Bug A — TypeError 'r is not iterable' on /site-finder/analysis/[cad]:
Backend /parcels/{cad}/poi-score returns {cad_num, radius_m, top_poi:[...]}
but useParcelPoiScoreQuery expected {items, poi_weighted_score}. Added
adapter in queryFn that maps top_poi → items and computes poi_weighted_score
from weight field. No backend changes needed.
Bug B — Sidebar hides on parcel select (bad UX):
ParcelDrawer was position:fixed over the whole page, causing sidebar
(CadInput + RecentParcels + ParcelLegend) to hide. Fix: drawer is now
position:absolute within the map container (parent given position:relative),
overlapping only the map area. Sidebar stays permanently visible so user
can type a cad directly alongside the drawer.
Bug C — CSS design tokens missing (all var(--*) undefined):
Created frontend/src/app/globals.css with all design tokens from
UI_Brief_GenDesign_May17 (surface, border, text, brand, semantic, viz).
Imported in layout.tsx. Removes invisible UI caused by undefined CSS vars.
Also sets font-variant-numeric: tabular-nums globally per brief.
3 pages (market, PRINZIP drilldown, developers leaderboard) on top of
existing v_developer_full_metrics + domrf_realization views. ECharts on
the frontend, FastAPI router /api/v1/analytics on the backend.
- backend/Dockerfile: split builder/runner, runtime libs only, non-root app user, curl for healthcheck, --frozen via new uv.lock
- frontend/Dockerfile: npm ci instead of npm install (deterministic), USER node
- docker-compose.prod.yml: working backend healthcheck (curl now in image), redis healthcheck, drop dead NEXT_PUBLIC_API_BASE_URL env (Next.js bakes NEXT_PUBLIC_* at build time, runtime override is no-op)
- docker-compose.yml: same redis healthcheck, BACKEND_URL for next.config rewrites, drop uv from CMD (not in new image)
- Caddyfile: handle (not handle_path) so /api prefix is preserved into FastAPI router
- next.config.ts: rewrite /api/* and /health to BACKEND_URL in dev (no Caddy locally)
- frontend/src/lib/api.ts: empty default = same-origin relative URLs
- Makefile: drop uv run from migrate target
- Add backend/uv.lock and frontend/package-lock.json for reproducible builds
Verified: docker build succeeds for both, backend container starts, /health responds, curl healthcheck works inside image, container runs as non-root.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>