A safety-aware transit routing application for Chicago, built using CTA Bus and Train APIs. This application helps users find the safest and most efficient routes in Chicago using public transportation.
- Real-time CTA bus and train tracking
- Route planning with safety considerations
- Interactive map display of transit options
- Mobile-responsive web interface
This project is organized into two main components:
- Frontend: React + TypeScript application
- Backend: Node.js + Express API server
- Node.js (v14+ recommended)
- npm or yarn
- API keys:
- CTA Bus Tracker API key
- CTA Train Tracker API key
- Mapbox API key (for maps)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install -
Create a
.envfile with your API keys (see.env.examplefor template) -
Start the development server:
npm run dev
The backend server will start on http://localhost:3001
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install -
Add your Mapbox API key in
src/components/Map/MapComponent.tsx -
Start the development server:
npm start
The frontend application will start on http://localhost:3000
GET /api/transit/bus/routes- Get all bus routesGET /api/transit/bus/routes/:routeId/directions- Get directions for a routeGET /api/transit/bus/routes/:routeId/stops- Get stops for a routeGET /api/transit/bus/routes/:routeId/vehicles- Get vehicles for a routeGET /api/transit/bus/routes/:routeId/predictions- Get predictions for a routeGET /api/transit/bus/stops/:stopId/predictions- Get predictions for a stop
GET /api/transit/train/stations- Get all train stationsGET /api/transit/train/stations/:stationId/arrivals- Get arrivals for a stationGET /api/transit/train/stops/:stopId/arrivals- Get arrivals for a stopGET /api/transit/train/routes/:routeCode/arrivals- Get arrivals for a routeGET /api/transit/train/routes/:routeCode/locations- Get train locations for a routeGET /api/transit/train/runs/:runNumber/follow- Follow a specific train
GET /api/transit/route- Get route between origin and destination
- Integration with crime data for safety routing
- Real-time alerts for transit delays
- User accounts for saving favorite routes
- Accessibility features