Skip to content

c-h-russell-walker/mbta-schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBTA-Schedule Web Application

React App for displaying realtime MBTA schedules.

Currently deployed via heroku here:

MBTA Schedule App

Be sure to set your API KEY (gotten here)

Used in the code here


Current requirements:

A web application that shows live Commuter Rail departure board:

    - The application should show the upcoming departures at North and South stations - including:

        - The train destinations

        - The departure times

        - The track numbers

        - The boarding status (e.g. 'Boarding', 'All Aboard', 'Delayed')

        - I add a column for the name of the station since we're getting data for two stations on one board


Notes/comments on assumptions made in code (they link to relevant portion of code):

Expect the destination to be the first value in the array

We should not add to the board when we receive a new event that has status of 'Departed'

We're using defaults specific to the requirements but have set up use for props

If we have a prediction with a "Cancelled" status it's departure time is null and is at the start of the array and there top of the board

Since this is the MBTA we always know the timezone!

Left a note about possibly making station names header configurable

Replaced slashes with hyphens to match image of board at North Station


Useful MBTA links:

https://www.mbta.com/developers

Developer Portal

V3 API Swagger Documentation

Google Groups Forum


This project was bootstrapped with Create React App.


Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.