<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shivrajsinh Zala</title>
    <description>The latest articles on DEV Community by Shivrajsinh Zala (@shivrajsinhzala).</description>
    <link>https://dev.to/shivrajsinhzala</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4235971%2F36d59218-122c-4438-8422-08a62765c1cf.jpg</url>
      <title>DEV Community: Shivrajsinh Zala</title>
      <link>https://dev.to/shivrajsinhzala</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shivrajsinhzala"/>
    <language>en</language>
    <item>
      <title>Building Headway: A Fast, Lightweight Transit Schedule Lookup from Open GTFS Data</title>
      <dc:creator>Shivrajsinh Zala</dc:creator>
      <pubDate>Mon, 09 Nov 2026 22:30:19 +0000</pubDate>
      <link>https://dev.to/shivrajsinhzala/building-headway-a-fast-lightweight-transit-schedule-lookup-from-open-gtfs-data-4bp</link>
      <guid>https://dev.to/shivrajsinhzala/building-headway-a-fast-lightweight-transit-schedule-lookup-from-open-gtfs-data-4bp</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;That frustration led me to build &lt;strong&gt;&lt;a href="https://headway.shivrajsinh.in/" rel="noopener noreferrer"&gt;Headway&lt;/a&gt;&lt;/strong&gt; — a lightweight, fast, mobile-first transit timetable and schedule lookup tool powered entirely by official General Transit Feed Specification (GTFS) data.&lt;/p&gt;

&lt;p&gt;The project is completely open source on GitHub: &lt;strong&gt;&lt;a href="https://github.com/shivrajsinhzala/transit-timetables" rel="noopener noreferrer"&gt;shivrajsinhzala/transit-timetables&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Problem with Transit Timetables
&lt;/h3&gt;

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

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Heavy Real-Time Routing Engines:&lt;/strong&gt; Full trip planners that consume massive device memory and battery, requiring heavy network connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clunky PDFs or Static HTML Tables:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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.&lt;/p&gt;




&lt;h3&gt;
  
  
  Architecture &amp;amp; Engineering Highlights
&lt;/h3&gt;

&lt;p&gt;Here is how Headway works under the hood:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. GTFS Ingestion &amp;amp; Static Pre-Processing
&lt;/h4&gt;

&lt;p&gt;Instead of querying a heavy relational database on every client request, Headway processes raw GTFS feeds ahead of time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feeds are parsed, normalized, and compressed into structured route and stop indices.&lt;/li&gt;
&lt;li&gt;Calendar exceptions (&lt;code&gt;calendar_dates.txt&lt;/code&gt;) 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).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Mobile-First, Zero-Bloat UI
&lt;/h4&gt;

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

&lt;h4&gt;
  
  
  3. Global Coverage
&lt;/h4&gt;

&lt;p&gt;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.&lt;/p&gt;




&lt;h3&gt;
  
  
  Try It Out &amp;amp; Contribute
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Web App:&lt;/strong&gt; &lt;a href="https://headway.shivrajsinh.in/" rel="noopener noreferrer"&gt;https://headway.shivrajsinh.in/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/shivrajsinhzala/transit-timetables" rel="noopener noreferrer"&gt;shivrajsinhzala/transit-timetables&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
