This application is designed to mash up the information from the @HCESBuses Twitter feed with SMS delivery.
The @HCESBuses Twitter feed is a great service provided by the school in the afternoons, letting parents know when buses have left, when they're running late, or other information that can affect how long you're standing outside waiting for your kids to get home. And SMS is a great way to get notified quickly of new information. Put them together, and you have the core of this app.
The prototype version of this was a simple Ruby script that ran via cronjob, and needed to be manually updated when tracks moved in and out of the school. It was also unwieldy when people changed phone numbers, went on vacation, etc.
Thus, this web app was born. It allows parents to create accounts, enter their own cell numbers, pick which buses and tracks they care about, and get notified. The idea is that, on the web, it can be useful to people outside of my immediate neighbors.
The application has four main ActiveRecord models:
User - managed by Devise, handles the user authentication piece.
Bus - Representing a bus, it has the bus name (for display purposes), a Regexp to match the bus in a given tweet, and a marker for the last tweet we've seen that mentions the bus.
Tracker - Attached to a user and a bus, this model is used to determine who is watching for a particular bus, which track they're on, and if the tracker is currently active.
Mobile Phone - attached to a User, this uses sms-fu to generate an email-to-SMS to a given number on a given cell carrier.
There is also a simple Track model (representing the school schedule), and a TwitterTracker model (used via cron to search the Twitter feed).
This application is written in Ruby 1.9, Rails 3.2, and uses Twitter Bootstrap for the web UI. If you would like to contribute to making it better, feel free to file a pull request or an issue.