County health departments inspect every restaurant and publish the results — the California placard (Pass / Conditional Pass / Closed), a numeric score where the county issues one, and the specific violations — but that information lives on a different site for every county and almost nobody looks it up. SafeBite surfaces it on the map, where you're already deciding where to eat.
- Detect — on a restaurant's Google Maps listing, SafeBite reads the place's name, address, and coordinates from the page.
- Route — it maps the restaurant's city/ZIP to the county that inspects it.
- Look up — the background service worker queries that county's Source (an open-data API, or the county portal) for the facility's inspections.
- Match — it links the Maps place to the right facility strictly (geo-first, with a name/address tiebreak); if it can't be sure, it says so and links out rather than guess.
- Show — an inline card with the latest placard (+ score where the county issues one), the inspection date, the latest inspection's violations, and a list of past inspection results, plus a link to the official record.
Everything runs locally in your browser — there's no server. See
PRIVACY.md.
| County | Data source | Score? | Notes |
|---|---|---|---|
| San Francisco | DataSF open data (Socrata) | No (SF dropped scores in 2020) | Auto-loads |
| Santa Clara (San Jose) | County open data (Socrata) | Yes (0–100) | Auto-loads |
| San Mateo | County MyEHS portal | No | Tap-to-load, with a deep-link fallback |
New counties are added as Sources — see Contributing.
From the Chrome Web Store: coming soon.
From source (for development):
git clone https://github.com/86larryli/SafeBite.git
cd SafeBiteThen open chrome://extensions, enable Developer mode, click Load
unpacked, and select the extension/ folder. Open a restaurant on Google Maps
in a supported county to see its inspection card.
npm ci
npx playwright install --with-deps chromium
npm run lint # ESLint
npm run test:ci # deterministic test suite (the CI gate)
npm test # everything, incl. live tests
npm run package # build dist/safebite.zip for the store
npm run icons # regenerate icon PNGs from extension/icons/icon.svgThe deterministic tests run each Source's normalization and the matching logic
against captured API fixtures with the network blocked. The live: end-to-end
tests drive real Google Maps + county data and are excluded from CI (manual smoke
tests).
SafeBite is plain JavaScript with no build step — a deliberate choice for fast load-unpacked iteration. The design and its rationale are written down:
CONTEXT.md— vocabulary (Placard, Score, Source, Match, …)PLAN.md— flow, scope, and phased builddocs/adr/— architecture decision records
Contributions — especially new county Sources — are welcome. See
CONTRIBUTING.md for the dev setup and a step-by-step Source
guide. Releases are documented in docs/RELEASING.md.
SafeBite collects nothing and has no backend; it only reads the Maps page you're
on and queries public county inspection data to build the card. Full policy:
PRIVACY.md.
MIT © Larry Li