Project - runer112/wassall-zachary-databasedev GitHub Wiki
Problem statement
The MBTA is infamous for being unreliable. Combine this unreliability with the fact that subway trains don't run on a set schedule, and sometimes taking a trip that involves the subway can have a lot of unforeseen variance in time.
The data to illuminate MBTA subway times is available, though. It merely needs to be presented in an easy-to-consume fashion.
Proposed solution
Consume MBTA data to provide predicted departure times for subway trains. The API provides such data publicly. From experience, it seems to be very similar in quality (if not identical) to the data that feeds into the displays and announcement systems at stations.
One usage mode would be via browsing/searching. Users could identify which line, direction, and stop they would like to examine, and a page would display relevant information, namely predicted future departure times. The API also provides longitude and latitude for each stop, so linking this data up to the Google Maps API could allow showing a map of the station and surrounding area. From this map, users could use Google Maps to acquire directions and predicted travel time to get to the stop. When combined with predicted departure times, users could confidently choose a stop to go to and know if a subway train will come in a timely manner.
The other usage mode would be a collection of favorite combinations of line, direction, and stop. When a logged in user finds a commonly used stop via browsing/searching, they could favorite that stop to add it to a list. A favorites page would serve up predicted departure times for all favorites in one place, allowing the user to see all their commonly needed information in one place without browsing or searching.
Note: This design is largely based off of an iOS app called ProximiT. I concluded that it would be worthwhile to create something with similar design and functionality because (a) this would be a web app available to all devices, not just iOS, and (b) this is primarily an educational project, so I'm more concerned with implementation and learning anyway.
Domain objects
Bold indicates a domain object to domain object relation. Italics indicates a domain object to user relation.
Domain objects implicitly have and are linked by IDs.
Route
- Name
- Color
- Direction names
Stop
- Name
- Latitude
- Longitude
Departure
- Route
- Direction
- Stop
- Departure time
Favorite
- User
- Route
- Direction
- Stop
Alert
- Route
- Message
- Updated at
- Updated by
User archetypes
Bold indicates a user to user relation. Italics indicates a user to domain object relation.
User
- Browses routes, stops on a route, and routes for a stop
- Searches for stops
- Views route alerts
- View stop location on a map
- Views departure times for a combination of route, direction, and stop
- Favorites route/direction/stop combinations
- Views favorites in one place
- Friends/unfriends other users
- Views a friend's favorites in one place
Official
- CRUD route alerts
Admin
- CRUD users
- CRUD users' favorites