Skip to content

transitmatters/new-train-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New Train Tracker

lint test deploy

Developed by TransitMatters Labs

Shows new MBTA Orange, Red, and Green Line trains as they come into service.

Install & Run

Dependencies:

  • node 22.x (with npm 10.x)
  • python 3.13
  • uv
    • Ensure uv is using the correct Python version by running uv venv --python 3.13

Run:

To use an API key, put it as an environment variable MBTA_V3_API_KEY

Container

You can also run the New Train Tracker inside a container using the following docker build and docker run commands

docker build -t new-train-tracker -f Containerfile .
docker run --net=host -e MBTA_V3_API_KEY=your_key_here new-train-tracker

The app will be available at http://localhost:5173/

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

  1. Make sure AWS CLI is set up and working — i.e. aws cloudformation describe-stacks | wc -l should work
  2. 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)
  1. A key named transitmatters-ntt needs to be available in your AWS account and copied to ~/.ssh/transitmatters-ntt.pem.
  2. Run ./deploy.sh (add -p for production) to deploy.
  3. You're all set! Visit:

Other Deployments

This project generally fits the "Chalice app" mold. Contact us if you need help: labs@transitmatters.org

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.

About

Tracking the MBTA's new Orange, Red, and Green trains

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 22