🗺️ SafeMap

Inspiration

Traveling through unfamiliar cities, especially at night, often felt like rolling the dice. Traditional navigation apps prioritize speed, but never safety. We wanted to change that.

SafeMap was born from a simple idea: What if your map actually cared about your safety, not just your arrival time? Whether it's a tourist exploring a new city or a student commuting home late, everyone deserves to feel safe along their journey.

What It Does

  • Interactive Crime Mapping: Currenlty displays real-world crime incidents from 2010 to 2025 across Vancouver using color-coded markers and heatmap-style hotspots.
  • Smart Safer Routing: Users can input a start and destination point, and SafeMap recommends a route that avoids high-crime areas. If unavoidable, users are warned.
  • Toggleable Views: Switch between individual crime markers and crime hotspots for a broader or detailed view.
  • AI Chatbot Integration: Built-in Google Gemini chatbot answers safety questions, suggests safer routes, and provides neighborhood insights.

How We Built It

  • Frontend: ReactJS with Google Maps API for dynamic rendering of maps, routes, markers, and circles.
  • Backend: NodeJS server to fetch and serve large crime datasets efficiently.
  • Routing Logic: Customized Google's Directions API output by building a route-safety scoring system to prioritize routes that pass through fewer high-crime hotspots.
  • AI Integration: Integrated Google Gemini to offer live chat support for route suggestions and safety information queries.

Challenges We Ran Into

  • Custom Route Prioritization: Google's default directions prioritize speed, not safety. We had to analyze alternative routes and score them based on proximity to high-risk crime areas.
  • Handling Big Data Smoothly: Mapping thousands of crime incidents from 15+ years without hurting performance took a lot of optimization work.
  • Tuning AI Interactions: Early chatbot responses were too verbose or generic. We had to refine prompts to get clear, helpful, and context-sensitive advice.

Accomplishments That We're Proud Of

  • Built a working "Safer Routes" feature that truly reroutes users away from danger, even if it means longer travel times.
  • Successfully integrated AI (Gemini) into a live map application for real-time safety assistance.
  • Created an interface that is easy to use yet packed with information.

What We Learned

  • At first, getting Gemini to give useful answers was like arguing with a Magic 8-Ball super vague and kinda useless. After lots of trial and error, we cracked the prompt magic and made it actually smart.
  • Learnt more recent and up to date practices of react after not using it for while since learning it in 2021.

What's Next for SafeMap

  • User-Generated Safety Reports: Allow users to flag unsafe areas or report recent incidents, Waze-style.
  • Conversational Route Generation: Enable Gemini to automatically display safer routes when users type conversational queries like "Find me a safe route home." instead of telling them a route, it would update the map with the route.
  • Real-Time Crime Alerts: Push notifications if users approach newly reported unsafe zones during their trip.

Check it out

Share this project:

Updates