A hobby project that retrives and displays realtime MTA subway and bus arrival information for any stop. It also tracks service alerts for subway.
Please follow this guide on how to setup and deploy this project on your device.
We have provided a Makefile that helps automate development and deployment. To use it, please install Make using the command that corresponds to your operating system.
winget install GnuWin32.Makexcode-select --installCreate a .env file in the backend directory and add the following variables.
| Key | Value |
|---|---|
MTABUSKEY |
An API key for the MTA BusTime API. Request one here. |
Modify config.json in the root directory to customize your board to your liking. By default, it tracks stops near The Bronx High School of Science.
| Key | Type | Description |
|---|---|---|
subway |
Array<Stop> |
The list of subway stops you want to track. |
bus |
Array<Stop> |
The list of bus stops you want to track. |
theme |
Theme |
The color theme for the components. Provide the colors in hex. |
credits |
string |
The credits on the status bar. Wrap links to images with square brackets. |
You can find a detailed reference on the MDN Web Docs.
| Key | Type | Description |
|---|---|---|
name |
string |
This allows you to set a nickname for the stop being tracked. If left blank, the stop_name of the first element in stop_ids will be used. |
stop_ids |
Array<string> |
You can group all of the various stations you wish to track together by inserting its corresponding stop_id in the array. If you need help finding a station's stop_id, you can download the GTFS feeds provided by the MTA. |
walk_time |
number |
It may be unhelpful to include vehicles that will depart faster than it would take someone to walk to the station. walk_time should be the average time it takes for someone to comfortably walk from the location of the board to the station. All vehicles that will arrive in less than half the walk_time will not be included. |
| Key | Type | Description |
|---|---|---|
primary_color |
string |
This color will be used for the stop name title bar. |
text_color |
string |
This color will be used on the text inside the stop name title bar. |
background_color |
string |
This color will be used on the background of the page. |
Warning
Please install the optional tools to run make. Otherwise, you are able to manually run these commands by inspecting the Makefile.
Before you begin, run the following command to install the project dependencies.
make installTo build and run the project for development, run each command in seperate terminals.
cd backend && cargo runcd frontend && npm run devYou can view the webpage at http://localhost:5173.
To build the project for production, run the following command.
make buildTo run the project, run each command in seperate terminals.
cd backend && ./target/release/transit-boardcd frontend && npm run previewYou can view the webpage at http://localhost:4173.