Inspiration

Getting there typically involves using three apps and some guesswork – one for calculating the fastest way to reach your destination, one for figuring out the price and neither giving any indication of the environmental impact the journey will make. If people knew it cost roughly the same amount, and emitted significantly less carbon, a lot more people would opt for the bus, metro or the bike. We needed a planner which would clearly illustrate the better choice and which you could trust, as it would show the sources of all data presented. This is how we began with Mumbai, where a single journey consists of several forms of transport.

What it does

You log in, select an origin and a destination by typing or tapping on the map, and compare your choices next to each other. Each choice presents time, cost, and CO₂, and a click reveals the detailed calculation: the legs, the distances, the emission factor and the fare table, all cited with source and date. A vehicle icon travels along the selected route, for you to view on the map. You can select your own vehicle, the number of passengers, and your priorities, and the application calculates the choices in order of your importance. A logged-in user can record trips and see his CO₂ savings and weekly streaks increase, save frequent routes, and join invitation-code based communities to take up challenges. The administrators have the ability to review proposed fare and fuel price changes before publishing them. A Data status page tells the truth about the operational status of the system.

How we built it

MileZero uses React and TypeScript front end created with Vite and Node.js back end using Fastify, which also serves the built front end. There is no database, just validated JSON files that get saved atomically, making it impossible to lose any data due to a crash. The maps are done with Leaflet and OpenStreetMap tiles. Nominatim and OSRM services are called by the back end for searching places and calculating walking, cycling and driving routes. In case of public transportation, the back end downloads data about bus, metro and train lines from OpenStreetMap via Overpass API and generates an estimated journey with up to one transit point. The costs and emissions are calculated using a deterministic engine based on published tariff tables and emission factors. Groq’s openai/gpt-oss-120b model is used for one purpose only – to suggest updates for fares and petrol prices. Afterwards, a server side fetcher gets the cited page, blocks private networks and makes sure that suggested values are indeed shown alongside the respective city name. Then the administrator can publish the update. The accounts are secured with hashed passwords and cookies with CSRF protection.

Challenges we ran into

Public transport information was the most challenging issue since there is no openly accessible timetable feed in Mumbai. Therefore, we had to create the transport planner using OpenStreetMap routing data, and we indicate this as estimations rather than timetables. Models generate prices and websites’ addresses quite reliably, so we don’t allow a generated response to go through to a user without verification by checking it independently on the original page. Free public services of maps, searches, and routing have strict limitations in their use, so we implemented caching for requests. Web pages and addresses might be hostile or hard to access when a server gets links suggested by an AI, so we discovered and fixed one more potential loophole for blocked private addresses. Designing a comparison table turned out to be quite challenging, and we made many iterations in result formatting.

Accomplishments that we're proud of

Everything that appears on the screen comes with facts and the date of origin; missing information will be displayed as such. The status page will declare a component to be working only after a positive check is made. The AI is kept away from any area where it can make mistakes: the AI suggests something, but the server checks it and it is confirmed by a person. The entire application is developed without using a database or containers and uses just one command and one Groq key. The first time user ends up with a login page followed by an operational map and planner.

What we learned

It’s better to be honest about labelling. It’s better to say "estimated from OpenStreetMap, not a timetable" than precise times that we have no way of supporting. Proper use of an AI model involves giving it a very specific task and testing its output with standard code. Often data availability, not code, dictates what is possible, and it’s worth looking at early. Running the application itself in the actual browser through tests uncovered errors not caught by the unit tests, including one that crashed the map and one made while the security token hadn’t been retrieved yet.

What's next for MileZero

We hope to incorporate actual timetable information where it is available through operators, beginning with Mumbai bus, subway and commuter train, thus turning estimates into schedules. We intend to expand to other cities in India that have their own fare table and price of gasoline. The incorporation of live disruptions where available, improved account recovery without emails and impact report for businesses and schools wishing to conduct a commuting challenge would follow. Having self-hosted map, search and routing servers is the next item before any official release to make sure the app doesn’t rely on community servers.

Built With

Share this project:

Updates

Submission history