This is the repository for the TransitMatters Data Dashboard. Client code is written in Typescript with React and Next.js, and the backend is written in Python with Chalice.
nvm
installed, use nvm install && nvm use
node -v
python --version && poetry --version
poetry self update
to update poetryMBTA_V3_API_KEY
to your shell environment:
export MBTA_V3_API_KEY='KEY'
in ~/.bashrc or ~/.zshrcnpm install
to install all frontend and backend dependenciesnpm start
to start both the JavaScript development server and the Python backend at the same time.npm start
)If you have access to AWS credentials, add them to your local setup for a better development experience
aws configure
.us-east-1
via export AWS_DEFAULT_REGION=us-east-1
or with an aws configAWS access is not required for development, but may be required for certain charts and data to appear
transitmatters
.TM_FRONTEND_CERT_ARN
TM_LABS_WILDCARD_CERT_ARN
AWS_DEFAULT_REGION
in your shell to us-east-1
. Maybe not! We're not sure.)./deploy.sh
(for beta) or ./deploy.sh -p
(for production). If deploying from a CI platform (such as GitHub Actions) you may also want to include the -c
flag.Additional notes:
sed
, deploy.sh might fail. On macOS, this is fixed by brew install gnu-sed
and adding it to your PATH.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
If you're using VSCode, .vscode
contains a based default workspace setup. It also includes recommended extentions that will improve the dev experience. This config is meant to be as small as possible to enable an "out of the box" easy experience for handling eslint.
See server/rapid/gen_latest_rapid_data.sh
and server/bus/gen_latest_bus_data.sh
for instructions.
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.