How sidhazzzzzz/namma_daari works
Namma Daari is a Bengaluru safety-navigation web app. A user enters a destination, the app obtains candidate routes, scores their geometry against crime, accident and facility data, then presents safety-coded routes and map overlays. The sampled code confirms the route fallback logic and safety calculations; README-documented capabilities such as traffic/weather, transit layers and SOS are retained, though their detailed implementation is not fully shown.
Main entry points: app.js Map and trip UI · routeService.js Route retrieval · safetyService.js Safety scoring · [[path]].js OSRM proxy
Components 19
Navigation experience
- Map and trip UI
app.js - Route presentation
app.js - Metro and BMTC layers
app.js - SOS access
app.js - Traffic and weather
app.js
Route services
- Place geocoding
src/services/geocodingService.js - Route retrieval
src/services/routeService.js - OSRM routing
- OSRM proxy
functions/api/osrm/[[path]].js - OSRM car proxy
functions/api/osrm-car/[[path]].js - TomTom routing proxy
functions/api/tomtom-routing/[[path]].js - TomTom routing
Safety analysis
- Safety scoring
src/services/safetyService.js - Crime hotspots
src/services/safetyService.js - Accident locations
src/services/accidentData.js
Bengaluru data
- Hospitals and police
src/services/facilityData.js - Metro network data
data/metroData.js - BMTC network data
public/data
Other components
- Traveler
Connections 19
- Traveler → Map and trip UI: enters trip
README.md - Map and trip UI → Place geocoding: resolves places
- Map and trip UI → Route retrieval: requests routes
app.js - Route retrieval → OSRM proxy: tries primary
src/services/routeService.js - OSRM proxy → OSRM routing: forwards request
functions/api/osrm/[[path]].js - Route retrieval → OSRM car proxy: tries fallback
- OSRM car proxy → OSRM routing: forwards request
functions/api/osrm-car/[[path]].js - Route retrieval → TomTom routing proxy: falls back
src/services/routeService.js - TomTom routing proxy → TomTom routing: forwards request
functions/api/tomtom-routing/[[path]].js - Map and trip UI → Safety scoring: scores geometry
app.js - Safety scoring → Crime hotspots: checks hotspots
src/services/safetyService.js - Safety scoring → Accident locations: checks accidents
src/services/safetyService.js - Safety scoring → Hospitals and police: checks protection
src/services/safetyService.js - Route retrieval → Hospitals and police: finds nearby
src/services/routeService.js - Map and trip UI → Route presentation: shows scored routes
app.js - Map and trip UI → Metro network data: renders overlay
app.js - Map and trip UI → BMTC network data: renders overlay
- Map and trip UI → Traffic and weather: shows conditions
app.js - Map and trip UI → SOS access: offers SOS
app.js