Skip to content
RR.DEV
All Projects

Case Study

Private production systemWeb Applications2025 - 2026

OnTheScene

Station information platform for fire department TVs, tablets, and the web

Platform
Web Applications
Year
2025 - 2026

01 / 06 โ€” Console dashboard

Select thumbnail ยท click image to enlarge

Screenshots come from the real applications. Sensitive names, identifiers, and credentials are redacted.

01What it does

OnTheScene connects the systems a fire department already uses - scheduling, CAD, weather, traffic, incidents, tides, power outages, air quality - normalizes them server-side into Postgres, and renders curated pages to station displays and the web. The TV never calls an external API directly; every widget declares a stale-after threshold so outdated operational data is visibly flagged, never silently shown as live.

02What I built

  • Admin console SPA with a drag-and-drop page builder, widget catalog, automations, integrations, and display management
  • TV player SPA with 26 operational widgets, page rotation, pairing flow, PWA support, and live-map opt-in for six map widgets
  • Native Apple TV app (SwiftUI) with pairing, cached snapshots, a rotation engine, and stale-data badges
  • 22 Supabase Edge Functions acting as server-side pollers, map snapshot renderers, and a WHEN/THEN automation evaluator
  • 36 SQL migrations with row-level security and shared Zod schemas across apps and functions

03Key engineering work

  • A rules-engine automation layer (json-rules-engine) with reversible actions and a state journal, so a chief can ask why a page appeared and undo it
  • Server-generated map snapshots for six map widgets, with an opt-in live MapLibre mode and careful snapshot lifecycle handling
  • Content-aware TV layout authoring: 1080p viewport fit analysis, layout presets, and per-widget resize minimums
  • Integration honesty: three of six requested data sources had no usable API, so the plan documented official replacements (NWS, CAL FIRE, NIFC, CalOES) instead of scraping

04Challenge / Solution

Challenge

Render trustworthy operational data to TVs that must never show stale information as live, while six external data sources each had different availability, terms, and rate limits.

Solution

Server-side pollers normalize every source into Postgres with fetched_at timestamps; every widget declares staleAfterSeconds and visibly degrades. The TV reads only from the database - external APIs stay server-side by design.