Public map of the Grodno Roads app data: stationary speed cameras, medium-speed camera sections and road repairs, rendered on an interactive MapLibre map. Published at https://behindwheel.github.io/.
- Next.js static export (
output: "export"): GitHub Pages serves theout/directory produced bynpm run build— no server, everything renders client-side. - Data is fetched live from the public CDN (
https://cdn-data.behindwheel.workers.dev):manifest.jsonfirst, then the three feature files, each verified against the sha256 the manifest carries. The CDN setsmax-age=0, must-revalidate+ ETag, so the browser revalidates on every visit (304 when nothing changed) and the site always shows fresh data — no rebuild needed. The data contract is documented in the pipeline repo,docs/integrations/cdn.md. - MapLibre GL JS 6.x + OpenFreeMap Liberty basemap (free, no API key).
- PWA: a web manifest plus an offline service worker — the app shell and the last CDN snapshot survive a dropped connection; map tiles are not cached.
npm install
npm run dev # http://localhost:3000
npm run lint # eslint
npm test # vitest — the lib/ helpers
npm run build # static export into out/To check the production build locally, serve the export (and let the service worker register — it only does so on a production build):
npx serve outPushes to main deploy automatically to GitHub Pages (.github/workflows/deploy.yml).
Changes land through PRs: CI runs eslint, type check and the production build on every
pull request; merge to main triggers the Pages deploy.
MapLibre note: it stamps its own .maplibregl-map class (with position: relative)
onto the container element, so the container positioning rule needs a higher-specificity
selector than a bare class (div.map-container in app/globals.css) or the container
collapses to zero height and the map renders black.