How rohit-t4756/ecoroute works
EcoRoute is a Pune-focused route-planning application intended to compare fast and lower-emission journeys, with supporting road-network data ingestion and traffic-model tooling. The visible user flow is location selection in the map UI, route submission to the API, and route-result display; however, the API currently returns a placeholder rather than computing a route, and the displayed impact metrics remain zero. Traffic inference and Redis edge-weight caching exist as a separate bridge, with no shown connection from the route endpoint. Source excerpts are partial, so unverified integrations and links are omitted.
Main entry points: App.jsx Map and route UI · main.py FastAPI gateway · inference.py Congestion inference · init.sql PostGIS database
Components 16
Route client
- Map and route UI
app/frontend/src/App.jsx
Route API
- FastAPI gateway
app/main.py - Route request schema
app/models.py
Road network
- PostGIS database
database/init.sql - Road map ingestion
scripts/database/ingest_map.py
Traffic modeling
- Traffic cache bridge
app/ml_service.py - Congestion inference
scripts/ml_pipeline/inference.py - ONNX traffic model
app/ml/traffic_model.onnx - Redis edge weights
- Pune traffic data generator
scripts/ml_pipeline/fetch_pune_data.py - Traffic dataset
pune_traffic_data.csv - Model training and export
scripts/ml_pipeline/train_and_export.py
Other components
- Traveler
- Mapbox services
- OpenStreetMap
- Open-Meteo archive
Connections 15
- Traveler → Map and route UI: sets locations
app/frontend/src/App.jsx - Map and route UI → Mapbox services: geocodes locations
app/frontend/src/App.jsx - Map and route UI → FastAPI gateway: submits route request
app/frontend/src/App.jsx - FastAPI gateway → Route request schema: validates request
app/main.py - FastAPI gateway → PostGIS database: checks node count
app/main.py - OpenStreetMap → Road map ingestion: provides road graph
scripts/database/ingest_map.py - Road map ingestion → PostGIS database: writes nodes and edges
scripts/database/ingest_map.py - Traffic cache bridge → Congestion inference: requests predictions
app/ml_service.py - Congestion inference → ONNX traffic model: loads model
scripts/ml_pipeline/inference.py - Congestion inference → PostGIS database: reads edge attributes
scripts/ml_pipeline/inference.py - Traffic cache bridge → Redis edge weights: caches edge weights
app/ml_service.py - Pune traffic data generator → Open-Meteo archive: fetches weather
scripts/ml_pipeline/fetch_pune_data.py - Pune traffic data generator → Traffic dataset: writes dataset
scripts/ml_pipeline/fetch_pune_data.py - Model training and export → Traffic dataset: loads dataset
scripts/ml_pipeline/train_and_export.py - Model training and export → ONNX traffic model: exports model
scripts/ml_pipeline/train_and_export.py