A live map that tracks the MBTA Pride bus (#1843) as it travels around the network during Pride season. A React + Vite frontend renders the map and route; a Python Chalice app proxies the MBTA V3 API.
- Frontend: React, TypeScript, Vite, Leaflet, Tailwind CSS
- Backend: Python 3.12, AWS Chalice (Lambda + API Gateway)
- Tooling: uv (Python), npm (Node), Ruff (lint + format), ESLint + Prettier, pre-commit
- Node 20.x and npm 10+
- With
nvminstalled:nvm install && nvm use - Verify with
node -v
- With
- Python 3.12 via uv
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh(orbrew install uv) - Verify with
uv --version - uv installs and manages the pinned Python 3.12 toolchain automatically — you do not need to install Python yourself.
- Install uv:
nvm use # select Node 20
npm install # installs Node deps; `postinstall` runs `uv sync` for Python depsnpm install runs uv sync automatically, which creates the .venv and
installs the Python dependencies from uv.lock. To install Python deps on their
own, run uv sync.
(Optional but recommended) enable the git hooks so linting/formatting run on every commit:
uv run pre-commit installnpm startThis runs the Vite dev server and the Chalice backend (chalice local)
concurrently. The backend reads the MBTA API key from the MBTA_V3_API_KEY
environment variable.
Python is linted and formatted with Ruff; the frontend uses ESLint and Prettier.
npm run lint # lint frontend + backend
npm run lint-frontend # ESLint
npm run lint-backend # Ruff check + Ruff format --check
npm run format-backend # Ruff autofix + format (writes changes)The same Python checks (plus a uv.lock consistency check) run via pre-commit
and in CI.
Deploys happen automatically from main via GitHub Actions. To deploy manually
you need the AWS credentials and secrets referenced in deploy.sh, then:
bash deploy.shThis builds the frontend, packages the Chalice backend (exporting
requirements.txt from uv.lock), deploys the CloudFormation stack, and syncs
the static site to S3 + invalidates CloudFront.
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.