EcoRoute
Healthy Route Navigation
The problem EcoRoute solves
Every navigation app today answers one question: "How do I get there fastest?" But for the 400+ million people worldwide with respiratory conditions — and for children, seniors, and urban commuters breathing polluted air daily — how clean the air is along the route matters just as much as travel time.EcoRoute solves the invisible danger of air pollution during daily commutes.Most people have no idea that two routes of similar length can differ by 30–40% in PM2.5 exposure. They don't know whether to leave now or wait 30 minutes for rush-hour pollution to clear. They have no concept of how much pollution they've already inhaled today, or how close they are to the WHO's safe daily limit.What people can use it for:
Asthma/allergy sufferers can pick the route that minimises airway irritants, using a dedicated health profile with a 35% sensitivity multiplier that adjusts every recommendation.
Parents can use the "Child" profile to plan school commutes and outdoor activities with tighter daily exposure budgets.
Urban cyclists and joggers who breathe harder and inhale more pollution per kilometre than car passengers can compare up to 3 alternative routes side-by-side and pick the cleanest one.
Senior citizens can benefit from personalised departure timing advice — the AI card tells them whether to leave now, wait 30 minutes, or wait an hour based on a real 12-hour air quality forecast.
Anyone commuting in polluted cities can track their daily and weekly pollution "budget" with a visual radial meter, build streaks of healthy days, and get alerted when they're approaching the WHO daily PM2.5 limit.
Health-conscious commuters get a lung visualiser that fills like a tank — showing exactly how many micrograms of PM2.5 they'll inhale on a given route, expressed as a percentage of the WHO daily safe limit.
Challenges we ran into
- Getting truly different alternative routes from ORS
OpenRouteService's alternative_routes API was finicky — in many city geographies it returned only 1 route even when 3 were requested. We had to tune weight_factor (how much longer a route could be) and share_factor (how different it had to be in waypoints) iteratively. We also had to gracefully handle the case where ORS returns a FeatureCollection vs a plain route object, since the shape of the response changed depending on the endpoint variant we used. - AQI data sparsity crashing the scoring pipeline
WAQI only has stations in certain locations. When sampling 3 GPS points along a route, we'd frequently get null or undefined AQI back for rural or mid-route points. This caused NaN health scores and broken UI states. We fixed it with defensive averaging — filtering out nulls before computing the mean, and falling back to AQI-based scoring (instead of the more accurate PM2.5-based formula) when real PM2.5 data was unavailable. The mock fallback mode ([45, 120, 72]) was added to unblock demos entirely. - Leaflet + React StrictMode double-initialization
React 19 with StrictMode runs useEffect twice in development, which caused Leaflet to initialize two map instances on the same DOM node, breaking the map with a silent white screen. The fix was lazy-loading Leaflet via import('leaflet') inside useEffect and tracking a mapInitialized ref — so the second StrictMode call was a no-op. - LLM API reliability under hackathon time pressure
The Gemini and OpenAI keys both had rate-limit or latency issues during testing. Rather than let a failed AI call break the whole departure card, we built a 3-tier cascade: Gemini → OpenAI → deterministic rule-based fallback. Each tier has an 8-second timeout. This meant the Decision Card always rendered something useful even under zero-key demo conditions. - PM2.5 dose formula calibration
The lung visualiser only makes sense if the numbers feel medically grounded. We had to research WHO guidelines (25 μg/m³ daily safe limit), breathing rates for light walking (~18 L/min), and inhalation fraction to arrive at a formula that produced intuitive results — low numbers for clean short routes, alarming numbers for long rush-hour commutes. Getting the BREATHING_RATE_FACTOR and duration scaling right took several iterations of sanity-checking against real-world exposure studies.
Tracks Applied (1)
Best Use of Gemini API
Major League Hacking
Technologies used
