new-train-tracker
new-train-tracker copied to clipboard
Tracking the MBTA's new Orange, Red, and Green trains
New Train Tracker
Developed by TransitMatters Labs
Shows new MBTA Orange, Red, and Green Line trains as they come into service.
Install & Run
Dependencies:
node 22.x(withnpm 10.x)python 3.12poetry- Ensure
poetryis using the correct Python version by runningpoetry env <use your python3.12 binary>
- Ensure
Run:
$ npm install$ npm start- visit http://localhost:5173/
To use an API key, put it as an environment variable MBTA_V3_API_KEY
Linting
To lint frontend and backend code, run $ npm run lint in the root directory
To lint just frontend code, run $ npm run lint-frontend
To lint just backend code, run $ npm run lint-backend
AWS Deployment
- Make sure AWS CLI is set up and working — i.e.
aws cloudformation describe-stacks | wc -lshould work - Make sure these environment variables are set up in your shell (ask a Labs member for values if needed):
TM_NTT_CERT_ARN(for production)TM_LABS_WILDCARD_CERT_ARN(for beta & production)
- A key named
transitmatters-nttneeds to be available in your AWS account and copied to~/.ssh/transitmatters-ntt.pem. - Run
./deploy.sh(add-pfor production) to deploy. - You're all set! Visit:
- https://ntt-beta.labs.transitmatters.org for beta
- https://traintracker.transitmatters.org for production
Other Deployments
This project generally fits the "Chalice app" mold. Contact us if you need help: [email protected]
Support TransitMatters
If you've found this app helpful or interesting, please consider donating to TransitMatters to help support our mission to provide data-driven advocacy for a more reliable, sustainable, and equitable transit system in Metropolitan Boston.