Inspiration
Climate change is the defining challenge of our generation. While using navigation apps daily, I noticed they prioritize speed above all else. A route that saves just 2 minutes might burn 20% more fuel due to highway speeds or aggressive traffic patterns. This inspired me to build a tool that empowers drivers to answer a simple question: "What if I could choose the 'Greenest' route as easily as the fastest one?"
What it does
EcoRoute AI is a smart navigation assistant that calculates and visualizes the carbon footprint of route options.
- Eco-Scoring: It compares routes by distance, duration, and traffic patterns to estimate CO₂ emissions.
- Vehicle Selection: Users can choose their car type (Sedan, SUV, Hybrid, or EV) to get personalized emission stats.
- Smart Comparison: It highlights the "Eco Pick" 🌱, showing exactly how much CO₂ you save compared to standard routes.
- Seamless Navigation: Provides 3 distinct geographic paths on an interactive map and lets users start navigation instantly via Google Maps.
How we built it
I built EcoRoute AI using a modern, scalable tech stack:
- Frontend: Next.js 14 (App Router) for a fast, responsive interface.
- Styling: Tailwind CSS v4 for a clean, premium design.
- Mapping: Leaflet.js and OpenStreetMap for rendering interactive maps.
- Routing Engine: OpenRouteService API to fetch real-world driving paths and geometry.
- Geocoding: A custom server-side API wrapping Nominatim to convert city names to coordinates.
- Algorithm: I developed a custom emission estimation logic in TypeScript that accounts for vehicle efficiency curves and traffic penalties based on EEA standards.
Challenges we ran into
- API Limitations: The free tier of routing APIs often struggles to find "alternative routes" for long distances. I solved this by implementing a Multi-Path Strategy, parallel-fetching 3 distinct routes by forcing "via-points" to guarantee geographic diversity on the map.
- Data Accuracy: Calculating emissions isn't linear. I had to research specific emission factors for EVs vs. SUVs to ensure the comparison was scientifically grounded and not just a visual gimmick.
Accomplishments that we're proud of
- Creating a Robust Fallback System that ensures the app never crashes during a demo, even in remote locations like the deserts of Al Anbar.
- Implementing the Vehicle Selector which dynamically updates calculations instantly—seeing emissions drop to near-zero for EVs is a powerful user moment.
- Delivering a polished, production-ready UI with smooth animations and a professional look suitable for a hackathon winner.
What we learned
I learned a lot about Geospatial Engineering, specifically how to decode encoded polylines, handle map bounds automatically, and the importance of UX in encouraging sustainable behavior. I also deepened my knowledge of Next.js server-side API handling.
What's next for EcoRoute AI
- Live Traffic Integration: Using real-time traffic data to dynamically adjust the "congestion penalty" score.
- Gamification: Adding user profiles to track "Total CO₂ Saved" over time and awarding badges for green driving habits.
- Public Transit: expanding the options to include buses and trains as even greener alternatives.
Built With
- api
- css
- leaflet.js
- next.js
- openrouteservice
- react
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.