← All workCase study 02 / 07

Transit Reliability Platform

Live MBTA and BART feeds turned into on-time rates, delay stats, and incident alerts.

WhenJune 2026 – Present
StackPythonRedpanda/KafkaPostGISdbtDuckDBMinIOPrometheusGrafanaDocker

How it works

Polls Boston's MBTA VehiclePositions feed every 15s and BART's TripUpdates every 60s, decodes the protobuf, and pushes it through Redpanda. A processor joins each event to the static GTFS schedule to estimate delay, upserts the current snapshot into PostGIS for the live Leaflet map and WebSocket API, and lands gzipped JSONL to MinIO partitioned by service date/hour. A 3-layer dbt pipeline over DuckDB reads that object store back out into route- and stop-level reliability marts: on-time rate, plus mean/median/p90 delay.

Runs the way a platform team would want — every service exports Prometheus metrics, 15 SLO rules feed Alertmanager and a Grafana dashboard, and a detector turns live state into operator incidents (stalled feed, vehicle bunching, degraded routes). A chaos drill caught induced failure in 90s and backfilled 30s after restart. Self-hosted on Dokploy behind HTTPS ingress, with internal services isolated from the network.