Inspiration Safety is a fundamental right, yet navigating through cities—especially at night or in unfamiliar areas—remains a significant source of anxiety for many women. While traditional maps prioritize the fastest route, they often completely ignore the safest route. We were inspired by the need for a community-driven, AI-powered tool that bridges this gap. We wanted to build a proactive solution for the women of Indore, India, empowering them with real-time, context-aware safety intelligence before they even step out the door. What it does SafeRoute is an intelligent, AI-powered women's safety platform. It serves three primary functions:

  1. Route Safety Analyzer: Users input their starting point, destination, travel mode, and time of day. SafeRoute analyzes this against a localized database of known safe zones, danger zones, and recent community incidents to generate a dynamic Safety Score (0-100).
  2. Context-Aware Incident Reporting: Users can report incidents. The AI instantly analyzes the severity, summarizes the threat, and generates localized community alerts.
  3. SafeRoute Chat AI: A conversational assistant that provides instant, localized safety advice based on the user's immediate surroundings. How we built it We built the frontend using React.js and Vite for a blazing-fast, responsive user experience.

The core intelligence of the platform is powered by the Google Gemini API (specifically the cutting-edge gemini-3.5-flash model). We designed a custom context-injection pipeline: whenever a user requests a route analysis, the app fetches local JSON data (containing coordinates, historical incident reports, and safe zones in Indore) and injects it directly into the Gemini prompt.

This allows the AI to act as a hyper-local safety expert, calculating risk based on variables like time of day and transportation mode. Conceptually, the AI evaluates a Safety Score function $S$ based on local variables:

$$ S(r, t, m) = 100 - \sum_{i=1}^{n} w_i \cdot Risk(z_i, t) $$

Where $r$ is the route, $t$ is the time of day, $m$ is the mode of transit, and $z_i$ represents specific zones along the path with their associated historical risk weights ($w_i$).

Challenges we ran into

  • Contextualizing AI: AI models are generally good at broad advice, but safety requires hyper-local context. Injecting structured local data (like specific street intersections in Indore) into Gemini in a way that produced consistent, perfectly formatted JSON responses took significant prompt engineering.
  • API Key & Environment Management: Migrating to the newest gemini-3.5-flash model and managing the new AQ. format API keys within Vite's strict .env loading pipeline caused some initial deployment hurdles, which we successfully debugged and resolved.
  • Designing for Panic: UI/UX for safety apps must be intuitive and stress-free. Balancing a rich feature set with a clean, dark-mode, high-contrast interface required multiple iterations.

Accomplishments that we're proud of

  • Successfully integrating the lightning-fast Gemini 3.5 Flash model to provide sub-second route analysis.
  • Forcing the LLM to strictly output structured JSON, allowing our React frontend to seamlessly render dynamic UI components (like warning tags and alternative routes) based on the AI's logic.
  • Creating a beautiful, responsive UI that feels premium and empowering rather than fear-inducing.

What we learned

  • Prompt Engineering for JSON: We learned how to constrain a Large Language Model to act purely as a data-processing API that outputs reliable, strictly formatted JSON.
  • Environment Security: We deepened our understanding of securing Vite applications and ensuring API keys are properly managed and excluded from version control.
  • AI Agentic Workflows: We learned how to combine static datasets (indoreZones.js) with generative AI to create a dynamic, reasoning engine.

What's next for SafeRoute

  • Live Crowd-sourcing: Transitioning our static local data into a real-time MongoDB backend where user-reported incidents instantly update the AI's context window.
  • Live Location Tracking & SOS: Integrating the browser Geolocation API to track users along their route and automatically trigger SOS protocols if they deviate significantly from the safe path or stop unexpectedly.
  • Expansion: Scaling the local dataset beyond Indore to provide safety intelligence for cities nationwide.

Built With

Share this project:

Updates

Submission history