Systems
Inside Mirai Guide: an offline-first event companion
How a loginless PWA, two Workers, and a hard binding-data rule keep a fan-run event guide trustworthy.
Mirai Guide is a trilingual, offline-first companion for Vocaloid concert events, focused on venue goods, crowd-reported stock and queues, a persistent local cart, maps, and route planning. This note records the architectural decisions that keep a one-person fan project trustworthy at event scale.
Two Workers, one boundary
- The attendee PWA, the admin UI, and the HTTP APIs are a SvelteKit and TypeScript application on Cloudflare Workers.
- A separate pipeline Worker built on Cloudflare Workflows owns everything that touches the outside world: polite fetches of approved sources, extraction, translation, media caching, and proposal staging.
- D1 stores reviewed structure, catalogs, live state, passkey credentials, provenance, conflicts, and an append-only audit history. A private R2 bucket stores immutable published bundles and reviewed, content-hashed copies of product images from approved sources.
Attendees never log in. The app installs as a PWA and keeps working offline inside the venue from the published bundle; only the owner and admin area authenticates, and it does so with passkeys.
The binding-data rule
The repository, migrations, application code, tests, and documentation contain no event facts — no edition names, venues, days, vendors, booths, goods, or source URLs. D1 starts empty. An administrator configures a public discovery URL, the extraction system proposes structure with evidence and confidence, and a human reviews the proposal before any row exists.
The consequences are deliberate:
- The same system supports future events with unknown names, cities, venue layouts, and booth numbering schemes, because nothing is hardcoded.
- IDs are opaque and classification keys are open strings with safe presentation fallbacks. Code never maps a vendor name to special behavior.
- Model output never publishes itself. Every proposal passes a human veto.
Why this shape
An event companion earns trust exactly once. Splitting the data plane into reviewed structure, immutable published bundles, and clearly-labeled crowd reports means an attendee standing in a dead zone still has a working map and catalog, and nothing they see was ever written directly by a crawler or a language model.