Inspiration

I love public transit: it's fast, it's affordable, it's green. For the past 8 years I've been commuting all over the Bay Area on Caltrain, Bart, and Muni. However, I'm also chronically late, and the subway waits for no one. All too commonly I'd be standing at a train station looking up at the red neon sign: "next train in 28 minutes." I realized that my commute could be made a lot less stressful if I knew when the next few stops were when I was leaving my house or packing up at the office.

What it does

The app is a realtime widget on your iOS home screen that shows the next three trains arrivals for your "to" and "from" transit stations, as well as the local color of the transit line.

How we built it

This app queries Google Maps API for transit information for your "from" location and your "to" location, (and vice-versa) so that you can see both your "Going to work" and the "Coming home" commute lines. The magic is in the powerful filtering mechanisms of the API. For example, being able to specify not just the mode as transit but also as the transit mode as rail.

Challenges we ran into

In terms of Google Maps API response, it was a bit tricky to pick a "starting" location. For example, if you want to leave from Montgomery Bart station and go to Daly City Bart station, you would imagine there is a only a single step in that route: ride the train. However, there are typically three steps: walk 0 miles to the station, ride the train, walk 0 miles to the station. This slight nuance was surprising. I would have preferred to filter out those steps entirely.

Accomplishments that we're proud of

Perhaps the biggest accomplishment is the fact that this is 100% open source. I would have loved to take this a step further and enable a fully running service for free to everyone too. That said, I spent a lot of time writing documentation so that anyone can spin this up for themselves. For example, showing how to create the Google Maps API key, how to restrict the key to particular services for safety, and how to integrate the API key into the code.

What we learned

Not everything valuable has to scale. Sometimes the simplest idea is the best. Shipping something "okay" is better than working quietly forever on something that was never shipped at all. To elaborate, if I asked myself: "how can I build this such that a million people can leverage a real-time commute management system" I might still be working out the details of API billing and caching and load balancing and user management. Getting hung up on scale can sometimes stop you from building your first version. Getting this in the hand of real people who said: "can you add line colors?" and "can you add the commute home as well?" and "I think there's a bug on the Muni version" meant that there are now at least 10 real people who love and use this everyday.

What's next for iOS Transit Widget for Commuters

Built With

Share this project:

Updates