A real-time traffic event dashboard that aggregates data from multiple state Department of Transportation (DOT) APIs across the I-80 and I-35 corridors. The application provides interactive mapping, filtering, and collaborative messaging features for traffic management professionals.
- Interactive Map View: Visualize traffic events across multiple states with color-coded severity markers
- Table View: Sortable table display of all events with detailed information
- Advanced Filtering: Filter by state, corridor, event type, severity, and search text
- Real-time Updates: Auto-refresh capability to keep data current (60-second intervals)
- Collaborative Messaging: Comment and collaborate on specific traffic events with team members
- Multi-State Coverage: Nevada, Ohio, New Jersey, Iowa, Kansas, Nebraska, Indiana, Minnesota, and Utah
- Node.js/Express server
- Aggregates data from 9 state DOT APIs
- Normalizes data formats (JSON/XML) into consistent structure
- CORS-enabled for frontend access
- Deployed on Railway
- React 18 with Vite
- Leaflet for interactive maps
- Real-time data fetching with auto-refresh
- Responsive design for desktop and mobile
- Node.js >= 18.0.0
- npm or yarn
- Install dependencies:
npm install- Set environment variables (for APIs requiring authentication):
export NEVADA_API_KEY=your_key
export OHIO_API_KEY=your_key
export TXDOT_API_KEY=your_key
export CARS_USERNAME=your_username
export CARS_PASSWORD=your_password- Start the backend server:
npm startThe backend will run on http://localhost:3001
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Create
.envfile from example:
cp .env.example .env- Update
.envwith your backend URL:
VITE_API_URL=http://localhost:3001
- Start the development server:
npm run devThe frontend will run on http://localhost:3000
GET /api/health- Health check endpointGET /api/events- Get all traffic events from all statesGET /api/events/:state- Get events from a specific state
{
"success": true,
"timestamp": "2025-10-17T12:00:00.000Z",
"totalEvents": 150,
"events": [
{
"id": "NV-12345",
"state": "Nevada",
"corridor": "I-80",
"eventType": "Construction",
"description": "Road work ahead",
"location": "I-80 Eastbound MM 45",
"county": "Washoe",
"latitude": 39.5296,
"longitude": -119.8138,
"startTime": "2025-10-17T08:00:00.000Z",
"endTime": "2025-10-17T18:00:00.000Z",
"lanesAffected": "1 lane closed",
"severity": "medium",
"direction": "Eastbound"
}
],
"errors": []
}See DEPLOYMENT.md for complete step-by-step deployment instructions for both backend and frontend to Railway.
Backend (Railway):
- Already configured with
package.json - Deploy from GitHub, set environment variables
- Auto-deploys on push to main
Frontend (Railway):
- Configured with
frontend/railway.json - Deploy from same GitHub repo, separate service
- Set
VITE_API_URLenvironment variable to backend URL - Uses
serveto host the built React app
Alternative: Frontend can also be deployed to Vercel or Netlify for free static hosting
| State | API Type | Authentication | Corridor |
|---|---|---|---|
| Nevada | JSON | API Key | I-80 |
| Ohio | JSON | API Key | I-80 |
| New Jersey | XML | None | I-80 |
| Iowa | XML | CARS Program | I-80 |
| Kansas | XML | CARS Program | I-35 |
| Nebraska | XML | CARS Program | I-80 |
| Indiana | XML | CARS Program | I-80 |
| Minnesota | XML | CARS Program | I-35 |
| Utah | JSON (WZDX) | None | I-80 |
- WebSocket support for real-time messaging
- User authentication and authorization
- Message persistence (database integration)
- Email/SMS notifications for high-severity events
- Export data to CSV/PDF
- Historical event tracking
- Analytics dashboard
- Mobile app (React Native)
MIT
Pull requests are welcome! Please open an issue first to discuss proposed changes.