NYC Transit Hub
A personal, non-commercial application providing real-time MTA transit information, reliability analytics, and accessibility-aware routing for New York City.
Features
Live Arrivals
Real-time train arrival predictions for any subway station, updated every 30 seconds.
Live Tracker
Individual subway trips on maps and line diagrams, with between-stop geography clearly presented as an estimate.
Service Alerts
Current delays, planned work, and service changes with affected routes highlighted.
Crowding Estimates
Multi-factor crowding analysis combining headways, demand patterns, delays, and alerts.
Accessibility
Real-time elevator/escalator status and accessibility-aware trip planning.
Trip Planner
Point-to-point routing with real-time delay integration and accessibility options.
How It Works
1. Data Ingestion
MTA publishes real-time data via GTFS-Realtime feeds. We fetch subway, bus, LIRR, and Metro-North data every 30 seconds.
2. Processing
Protocol Buffer messages are decoded and parsed into structured data. Arrivals, alerts, and vehicle positions are extracted and cached.
3. Presentation
Clean, responsive UI displays the data with smart defaults. Server-side rendering ensures fast initial loads.
Tech Stack
Frontend
Backend
Data Sources
Quality & Testing
Crowding Algorithm
Our enhanced crowding system combines multiple real-time factors to estimate train crowding:
35%
Headway
Time between trains
35%
Demand
Time-of-day patterns
20%
Delays
Real-time delays
10%
Alerts
Service disruptions
Crowding is estimated, not measured. MTA does not provide real-time passenger counts.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ NYC Transit Hub │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Browser │◄───│ Next.js │◄───│ Vercel │ │
│ │ (React) │ │ App Router │ │ Edge │ │
│ └─────────────┘ └──────┬──────┘ └─────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ API Routes │ │
│ │ /api/trains /api/alerts /api/stations /api/crowding │ │
│ └─────────────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌───────────────────┼───────────────────┐ │
│ ▼ ▼ ▼ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ MTA │ │ Supabase │ │ OTP │ │
│ │ GTFS-RT │ │ PostgreSQL│ │ (Trips) │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Privacy
- • No account required for basic features
- • Favorites saved on this browser or device
- • Location used for nearby transit only when requested
- • No third-party tracking or analytics SDK
- • Search and nearby requests are sent to the NYC Transit Hub backend
Open Source
This is a personal, non-commercial project. The source code is available on GitHub.
View on GitHubCredits
Data provided by Metropolitan Transportation Authority (MTA)
Subway icons from mta-subway-bullets