Shared architecture
I built a shared transit platform powering three native iOS apps for Caltrain, VTA, and BART: offline-first schedules and route planning, enriched with realtime 511.org vehicle positions, trip updates, and service alerts.
- delayta-core · Shared Swift framework
- Agency-independent GTFS parsing, transit models, and train-position interpolation. A protocol-based configuration layer supplies each system’s time zone, route mappings, and station metadata, keeping agency-specific behavior separate from the reusable engine.
- delayta-proxy · Scalable realtime delivery
- Cloudflare Workers relay 511.org telemetry while keeping API keys server-side. Per-agency Durable Objects cache feeds for 60 seconds and coalesce concurrent misses into one upstream request per endpoint, decoupling upstream load from client count. Recent cached data remains available during upstream failures.
- Bundled + cloud GTFS · Updates without an app release
- Apps launch with bundled schedules and refresh from versioned feeds published to R2, with manifests in Workers KV. The Swift feed store verifies file sizes and SHA-256 digests, installs updates atomically, and selects between bundled and downloaded data by validity and recency—preserving offline access and the previous feed if an update fails.