Simple static web app that shows live departures for Sydenham Station:
- Overground (Windrush) — both directions, via the TfL Unified API
- Southern — both directions, via a National Rail (Darwin) JSON proxy
It also registers a service worker (sw.js) to cache basic assets for offline/slow-network use (PWA-style).
- A single departure list mixing Overground and Southern, sorted by expected departure time
- Overground: all Windrush arrivals at
910GSYDENHM(inbound and outbound) - Southern: National Rail departures at CRS
SYDoperated by Southern (SN) - Each row shows platform direction (
→for Platform 1,←for Platform 2), operator icon (Overground / Southern), countdown, and destination - Countdown shows minutes remaining (e.g.
3 min),Due,Cancelled, orDelayed - Refreshes the departures list every 60 seconds
Data sources are configured in index.html inside the fetch helpers:
- TfL stop point:
910GSYDENHM(Overground / Windrush) - National Rail CRS:
SYD(Southern), viahttps://national-rail-api.davwheat.dev/
If you need a different stop or operator, update the fetch URLs / filters in index.html.
Because this is a static site, you can serve it with any local static server.
Example (Python):
python3 -m http.server 8000Then open:
http://localhost:8000
- The page registers
/sw.json load (navigator.serviceWorker.register('/sw.js')). - For the service worker to work correctly:
- Use HTTPS in production, or
- Use
http://localhostwhen testing locally.
manifest.jsonreferences icon files (icon-192.png,icon-512.png). Those files are expected to exist in the site root.- If you don’t have them, update the
iconssection ofmanifest.json(or add the missing PNGs).
- If you don’t have them, update the
Add a license header/file if you plan to publish this project.