A full-stack SSR application running entirely on the Cloudflare Developer Platform. The MTA's GTFS-Realtime feeds provide arrival predictions — not GPS coordinates — so this app infers smooth geographic train positions by decoding binary protobuf payloads and interpolating each train's location along embedded track geometry polylines. The result is ~400-750 animated train positions updated every 15 seconds, rendered on an interactive MapLibre GL map with MTA-branded route lines, direction-coded train icons, and live service alerts.
Browser (React + MapLibre GL)
│ SSR hydration + 15s polling via server functions
▼
Cloudflare Worker (TanStack Start SSR)
├── Fetches 10 MTA GTFS-RT feeds in parallel
├── Decodes binary protobuf payloads
├── Interpolates train positions along track geometry
├── Workers KV ─── GTFS static data cache
├── D1 (SQLite) ── user preferences, saved routes
├── R2 ─────────── station photos, feed archival
└── Workers AI ──── (planned) disruption summaries
▼
MTA GTFS-Realtime API (public, no key required)