Skip to main content

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.

The map requires a local HTTP server — 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:
python3 -m http.server 8000 --bind 127.0.0.1
Then open http://localhost:8000 in your browser. The --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:
ParameterValueEffect
?year9999Forces data.js (skeleton, empty menuItems) to load regardless of dataLiveDate
For example: http://localhost:8000/?year=9999

Testing data modes

The map uses two data files depending on the current date relative to dataLiveDate in config.js:
  • Skeleton (data.js) — Contains restaurant names, areas, and coordinates but has empty menuItems arrays. 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 full menuItems arrays and descriptions. Loads on or after dataLiveDate.
To force skeleton mode during local development regardless of the current date, add ?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. Set trackUrl: null in config.js:
trackUrl: null,
All 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 .css files — 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:
const MyControl = L.Control.extend({
  onAdd(map) {
    const container = L.DomUtil.create("div", "my-control");
    L.DomEvent.disableClickPropagation(container);
    // build your control UI here
    return container;
  },
});
Config-driven UI. New UI elements that vary by event (labels, filters, thresholds) should read from the 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.

Build docs developers (and LLMs) love