The map requires a local HTTP server —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/samgutentag/sbburgerweek/llms.txt
Use this file to discover all available pages before exploring further.
file:// paths won’t work because scripts load via relative paths. Fortunately, Python’s built-in HTTP server is all you need. No build step, no package installation, no configuration file.
No build step is needed at any point. Edit a file and reload the browser — changes are live instantly.
Start the server
From the repo root, run:--bind 127.0.0.1 flag keeps the server local — it won’t be accessible from other devices on your network.
URL parameters for testing
Append query parameters to the local URL to force specific data modes without changing any source files:| Parameter | Value | Effect |
|---|---|---|
?year | 9999 | Forces data.js (skeleton, empty menuItems) to load regardless of dataLiveDate |
http://localhost:8000/?year=9999
Testing data modes
The map uses two data files depending on the current date relative todataLiveDate in config.js:
- Skeleton (
data.js) — Contains restaurant names, areas, and coordinates but has emptymenuItemsarrays. Popups show “Details coming soon!” instead of menu details. This is what visitors see before the event data goes live. - Full data (
data-YYYY.js) — Contains complete restaurant records with fullmenuItemsarrays and descriptions. Loads on or afterdataLiveDate.
?year=9999 to the URL. This is useful for testing the “pre-announcement” state of the map without having to change dataLiveDate in config.js.
Testing without the Worker
For local development, you don’t need the Cloudflare Worker running. SettrackUrl: null in config.js:
window.track(action, label) calls in app.js and embed/map/embed.js become no-ops when trackUrl is null — no errors, no network requests, no side effects. Remember to restore the real Worker URL before pushing.
Code style notes
The project is pure vanilla JS with no build tooling. Follow these conventions when editing any source file:- No TypeScript, no JSX, no transpilation, no npm. All dependencies load from CDN (Leaflet, MarkerCluster, CARTO tiles).
- Use
const/let, template literals, and arrow functions. - CSS belongs in dedicated
.cssfiles — no inline styles, no CSS-in-JS. - Keep functions short and focused. Avoid deep nesting; extract helpers when logic grows.
- Use semantic HTML elements —
<nav>,<main>,<aside>,<button>,<a>— rather than generic<div>and<span>where a more specific element fits.
Adding features
A few patterns to keep in mind when adding new functionality: Dual implementation for embeds. The main map (app.js) and the embed map (embed/map/embed.js) are separate files that do not share logic. If a new feature should appear in both the main map and in the embeddable iframe version, implement it in both app.js and embed/map/embed.js. If it’s intentionally main-only or embed-only, leave a comment explaining why.
New Leaflet controls. Use the L.Control.extend pattern and call L.DomEvent.disableClickPropagation on the control container to prevent map clicks from firing through the control:
THEME object in config.js rather than being hardcoded. This keeps the project forkable without requiring changes to app.js.
Mobile layout. The main map breakpoint is 768px; the embed breakpoint is 600px. Test that any new sidebar, popup, or modal content works on both desktop and mobile drawer layouts before pushing.