Inspiration

Most navigation apps answer one question: what's the fastest way? But drivers and riders also need to know whether it's safe to go right now. Will it rain halfway? Will I arrive after dark? Is there roadwork or a recent accident on this road? Today that means checking five different apps. We wanted one companion that answers it all, before you leave.

What it does

SafeMiles turns "A to B" into a full safety briefing in seconds:

  • Smart route comparison: up to 3 routes for car, motorbike or bicycle, each scored for safety. It recommends the safest, not just the fastest.
  • Weather along the route: the forecast for when you'll actually reach each part of the road, not just the weather where you start.
  • Traffic prediction: chance of a jam, expected delay, and the best hour to leave.
  • AI road research: recent accidents, roadworks and road quality, with sources.
  • Trip planning: sunset and arrival-after-dark warnings, rest breaks, a pre-trip checklist and fuel cost.
  • AI travel assistant: ask by text or live voice: "fuel stations within 2 km?", "is it safe to drive tonight?" It answers with maps, places and directions, and can even change your route.

How we built it

  • App: Expo (React Native) with Expo Router, so one codebase runs on Android and iOS.
  • Backend: Python FastAPI with PostgreSQL.
  • Free map and weather data: OpenStreetMap (OSRM, Valhalla, Photon, Nominatim) and Open-Meteo. No paid API keys are needed.
  • Bring your own AI: users connect their own provider (Hugging Face, OpenAI, Anthropic, Gemini, Groq, Mistral or OpenRouter). Their keys are encrypted at rest.
  • Agentic assistant: a tool-calling assistant that searches places, plans routes, checks weather and reads the web.
  • Voice: speech-to-text through the user's provider, and spoken replies.

Challenges we ran into

  • Weather at the right time: a forecast for now says little about a 5-hour drive, so we forecast each point of the route for the time you'll reach it.
  • Traffic without paid data: we built a model from road types, city size and hourly rush patterns.
  • Accurate two-wheeler timing: the free motorbike routing server reported speeds close to a bicycle's, so we calibrated it against car routing.
  • Testing on real phones: connecting a physical phone to the local backend took automatic server discovery and an in-app status check.
  • Many AI providers: each has its own API quirks, error formats and voice support, all behind one simple interface.

Accomplishments that we're proud of

  • A full pre-trip safety briefing from just a destination, in seconds.
  • Hands-free live voice with an AI that can actually act, such as finding places or re-planning your route, not just chat.
  • Runs entirely on free, open data, so it's accessible anywhere, including regions with poor commercial map coverage.
  • Real routes for cars, motorbikes and bicycles, including the riders most exposed on the road.

What we learned

  • Safety depends on time as much as place: the same road can be safe at 2 PM and risky at 10 PM.
  • Open data (OpenStreetMap, Open-Meteo) is good enough for production-level travel features.
  • AI is most useful when it can use real tools and data, not just generate text.

What's next for Safe Miles

  • Live traffic and incident feeds to complement our traffic prediction.
  • In-drive alerts: warnings when weather or conditions change ahead of you.
  • Community reports: riders flag potholes, hazards and closures.
  • Offline mode and multi-day trip planning for long journeys.
  • Publishing on Google Play and the App Store.

Built With

Share this project:

Updates

Submission history