How kx1t/docker-commuterrail works
docker-commuterrail combines a browser departures dashboard with a Dockerized, in-memory transit cache for Paris PRIM and Boston MBTA. The main flow is browser selection and refresh → local service request → cache hit or upstream refresh → departures displayed; vehicle-map snapshots and cache diagnostics are additional capabilities. The server excerpt is partial, so the graph keeps server responsibilities at a coarse level and uses README statements for documented UI and diagnostics behavior rather than implying unshown handler internals.
Main entry points: server.py HTTP cache service · index.html Departures dashboard · map_snapshot.py Vehicle snapshot extraction
Components 16
Browser dashboard
- Departures dashboard
index.html - Transit settings
index.html - Departure selection
index.html - Snapshot map dialog
index.html
Cache service
- HTTP cache service
app/server.py - Transit mode handling
app/server.py - Cache and refresh
app/server.py - Upstream data fetch
app/server.py - Vehicle snapshot extraction
app/map_snapshot.py
Transit data
- Paris PRIM
- Boston MBTA
Cache diagnostics
- Diagnostics view
index.html - Stats endpoint
app/server.py - Stats journal
app/server.py - Client provenance
app/server.py
Other components
- Rider
Connections 18
- Rider → Departures dashboard: views
README.md - Departures dashboard → Transit settings: opens
README.md - Transit settings → Departure selection: selects mode
README.md - Departures dashboard → HTTP cache service: requests departures
README.md - Departure selection → Transit mode handling: sends transit
README.md - HTTP cache service → Transit mode handling: routes request
app/server.py - HTTP cache service → Cache and refresh: gets or refreshes
app/server.py - Cache and refresh → Upstream data fetch: refreshes stale data
README.md - Upstream data fetch → Paris PRIM: fetches Paris data
app/server.py - Upstream data fetch → Boston MBTA: fetches Boston data
app/server.py - HTTP cache service → Vehicle snapshot extraction: builds snapshots
app/server.py - Departure selection → Snapshot map dialog: opens map
README.md - Snapshot map dialog → HTTP cache service: requests position
README.md - Rider → Diagnostics view: opens diagnostics
README.md - Diagnostics view → Stats endpoint: reads statistics
README.md - Stats endpoint → Stats journal: reads and records
app/server.py - Stats endpoint → Client provenance: reports clients
README.md - HTTP cache service → Stats endpoint: serves endpoint
README.md