Architecture Analysis

Current site: Single-page Vite + React 18 app. Page chrome is React; the interactive map is D3 over us-atlas TopoJSON. Deployed as a static site on GitHub Pages under the /measles-dashboard/ base path.

GitHub: https://github.com/ACCIDDA/measles-dashboard

Final architecture diagram of the measles dashboard

The dashboard is a static single-page app (Vite + React 18) with no backend. Its URL drives everything: App.jsx parses the route into a zoom level (national, state, county) and passes it, along with a small amount of UI state, to the page chrome and the map.

UnifiedMap.jsx is the one place React and D3 meet. React renders the SVG shell and D3 owns everything inside #map-g, using mutable refs so the setup effect runs once. Colors and thresholds come from src/config. useUnifiedMapData loads shared topology and manifests once, then lazy-loads each state's CSVs on demand and caches them. Geography comes from a CDN, and all other data comes from static files served alongside the app.

The data behind those files is produced in two stages, both outside the running app:

Notes

Questions