How dasshiva/coolroute works
CoolRoute Delhi is a web app for comparing walking routes by estimated shade. Users choose an origin and destination on the map; the browser requests a route comparison, and the backend returns a fastest route and a shade-oriented alternative (or the direct route if no qualifying detour is found). The backend loads a shade grid, calls a routing service, scores candidate routes, and enforces a daily call quota. The excerpts show the frontend request and backend orchestration, but not the page markup, grid-generation implementation, or deployment wiring.
Components 14
Web client
- Map and selection
frontend/app.js - Route results
frontend/app.js
Route service
- Request handler
backend/app.py - Route calculation
backend/app.py
Shade analysis
- Shade scoring
backend/shade.py - Detour candidates
backend/shade.py
Data and quota
- Grid loading
backend/app.py - Shade grid
data/shade_grid.json - Daily quota
backend/quota.py
Other components
- Route planner
- Quota table
- Routing service
- Object storage
- Map tiles
Connections 13
- Route planner → Map and selection: selects points
frontend/app.js - Map and selection → Request handler: posts route request
frontend/app.js - Request handler → Grid loading: loads grid
backend/app.py - Grid loading → Object storage: reads grid object
backend/app.py - Grid loading → Shade grid: caches grid data
backend/app.py - Request handler → Daily quota: reserves calls
backend/app.py - Daily quota → Quota table: updates count
backend/quota.py - Request handler → Route calculation: calculates routes
backend/app.py - Route calculation → Routing service: requests walking route
backend/app.py - Request handler → Shade scoring: scores routes
backend/app.py - Request handler → Detour candidates: requests waypoints
backend/app.py - Request handler → Route results: returns comparison
frontend/app.js - Map and selection → Map tiles: loads map tiles
frontend/app.js