Public Cloudflare-cached EMF API and demo site for one Home Assistant sensor.
- A public read-only API for the current EMF value, full-range history browsing, entropy summaries, timeline metadata, raw D1 snapshots, exports, and derived random numbers
- Human-friendly documentation at
/docs - Formal OpenAPI at
/api/v1/openapi.jsonand/api/docs - A live site that displays the current reading, a realtime graph, full history controls, snapshot export tools, and story/timeline context
- Cloudflare Worker
- Hono +
@hono/zod-openapi - Cloudflare Cache API + KV + optional D1 snapshots
- Static assets in
public/
pnpm install
cp .dev.vars.example .dev.vars
pnpm check
pnpm devThe repo includes a Playwright E2E harness under tests/e2e/ with 14 multi-feature user flows. Local E2E uses a committed mock env file at .dev.vars.playwright, runs the Worker in deterministic mock-sensor mode, enables dev-only seed/reset helpers, and writes local state under .wrangler/state/e2e.
pnpm test:e2eCopyright (c) 2024-2026 Brian Zalewski / Megabyte Labs. The Rutgers License.