When you just want to know when the next bus or train is coming, modern transit apps can feel overwhelming. Opening Google Maps or Citymapper often means waiting through multi-megabyte bundle downloads, GPS location tracking prompts, routing calculations, and heavy UI animations.

That frustration led me to build Headway — a lightweight, fast, mobile-first transit timetable and schedule lookup tool powered entirely by official General Transit Feed Specification (GTFS) data.

The project is completely open source on GitHub: shivrajsinhzala/transit-timetables.

The Problem with Transit Timetables

Most transit agencies publish their full schedule schedules as open static GTFS feeds (stops.txt, routes.txt, trips.txt, stop_times.txt, calendar.txt). However, two extremes usually happen to this data:

  1. Heavy Real-Time Routing Engines: Full trip planners that consume massive device memory and battery, requiring heavy network connections.
  2. Clunky PDFs or Static HTML Tables: The transit agency's own website often hosts raw PDFs or clunky tables that are frustrating to navigate on a phone at a bus stop.

I wanted something in between: instantaneous, stop-by-stop schedule lookup with full-day timetables that load in milliseconds, works offline as a PWA, and respects user privacy without ads or tracking.

Architecture & Engineering Highlights

Here is how Headway works under the hood:

1. GTFS Ingestion & Static Pre-Processing

Instead of querying a heavy relational database on every client request, Headway processes raw GTFS feeds ahead of time.

  • Feeds are parsed, normalized, and compressed into structured route and stop indices.
  • Calendar exceptions (calendar_dates.txt) and service days are pre-calculated to handle weekend and holiday service variations (e.g. Phoenix Valley Metro, Melbourne, Sydney, and 120+ other global agencies).

2. Mobile-First, Zero-Bloat UI

  • Sub-100ms Page Loads: Static generation and edge caching ensure near-instant first contentful paint (FCP).
  • Clean Typography & High Contrast: Designed specifically for reading route timetables outdoors in direct sunlight.
  • Offline Capabilities: Service workers cache recently viewed routes so riders can check departure times even when underground or with poor mobile reception.

3. Global Coverage

Headway currently indexes over 120 transit agencies across the US, Australia, Europe, and beyond. Whether you're commuting on the Valley Metro light rail in Phoenix or riding trains across Victoria, you get direct access to full stop schedules.

Try It Out & Contribute

If you're interested in public transit data, GTFS pipelines, or lightweight web engineering, I'd love your feedback, bug reports, and PRs!