RaskhaMarg
"Navigate the with Intelligence.
Created on 10th January 2026
•
RaskhaMarg
"Navigate the with Intelligence.
The problem RaskhaMarg solves
RakshaMarg: Navigation with a Conscience
Navigate the Night with Intelligence.
The Problem It Solves
Standard navigation apps often prioritize speed and shortest distance, inadvertently routing pedestrians through dark alleys, unpopulated areas, or zones with high crime rates just to save a few minutes. This creates a significant gap in personal safety, as users are forced to choose between the fastest route and their peace of mind, often without knowing which path is actually consistently safe.
What Can People Use It For?
RakshaMarg serves as an intelligent companion for anyone navigating, especially at night or in unfamiliar areas.
- Safe Navigation: Finds routes that prioritize "Safety Corridors" (well-lit, active main roads) over dark, risky shortcuts.
- Guardian Monitoring: Users can share their live location with trusted friends or family, who can virtually "walk them home."
- Emergency Response: In critical situations, users can instantly trigger an SOS that alerts contacts and authorities with their precise location.
- Situational Awareness: Automatically highlights nearby "Safe Zones" like 24/7 stores, hospitals, and police stations along the path.
How It Makes Existing Tasks Easier & Safer
RakshaMarg adds a "conscience" to the standard navigation experience:
- Proactive Safety: Instead of reacting to danger, it prevents it by analyzing routes for lighting, crime data, and crowd density before you start walking.
- Reduced Anxiety: It removes the guesswork from walking home at night, giving users confidence that their path has been vetted for safety factors, not just traffic speed.
- Unified Safety Tool: It combines navigation, live tracking, and emergency alerts into a single flow, so users don't have to switch between a maps app and a messaging app to stay safe.
Challenges I ran into
Challenges we ran into
1. The "Subjectivity" of Safety & Algorithm Design
One of our biggest hurdles was turning abstract concepts like "safe" vs "unsafe" into a concrete number. A road might have 5 incidents, but if it's a 10km highway, that's different from 5 incidents in a dark alley.
- The Bug/Hurdle: Early versions of our algorithm simply summed up incidents, which unfairly penalized long routes even if they were safe. We also struggled with high-crime areas skewing the graph so much that "moderate" areas looked perfectly safe by comparison.
- The Fix: We implemented a logarithmic scaling formula (
20 * log10(incidents + 1)
) in our safetyAnalysisService.js. This prevents outlier data from breaking the scale. We also added a localized "chunking" system that analyzes routes in small segments (every 10 points) rather than as a whole, ensuring granular accuracy.
2. Taming the AI: Prompt Engineering for JSON
Integrating Gemini for real-time safety context was powerful but unpredictable.
- The Bug/Hurdle: Initially, the LLM would return helpful text explanations or conversational fluff along with the data, breaking our strict JSON parsers and crashing the frontend. It would also sometimes refuse to answer if the query was too broad.
- The Fix: We completely rewrote our system prompt to act as a "backend safety-intelligence engine" with strict "CRITICAL RULES." We forced a specific JSON schema and added a robust fallback mechanism that returns a "restricted" status object instead of crashing if the AI output is malformed or blocked.
3. Handling API Latency & Rate Limits
Analyzing 3 different route options with thousands of coordinate points in real-time is expensive and slow.
- The Bug/Hurdle: Our initial implementation tried to granularly analyze every single point on the path, which led to 10+ second load times and hit API rate limits instantly.
- The Fix: We optimized the generateRouteBounds function to create "search buffers" (0.5km radius) around polyline chunks rather than individual points. This reduced our external API calls by over 90% while maintaining the same level of safety coverage.
