Back to Projects

Hackathon · Safety · Navigation

WaySafe

Real-time safety-weighted routing for unfamiliar cities

7th Place — Hackverse 2025 MIT Bangalore · September 2025

Thirty-six hours. That is all you get at a hackathon, and it changes how you think about building. There is no time for architecture astronautics. No time for premature abstraction. You identify the core problem, build the smallest thing that solves it, and fight for every minute of polish after that.

The problem we picked: tourists in unfamiliar cities navigate blind. Google Maps optimizes for distance and traffic. It does not know — or does not surface — that a particular shortcut runs through an area with elevated crime at night, or that a street festival has packed a normally-quiet road with ten thousand people, or that a flash flood warning is active for a low-lying route.

WaySafe fills that gap. It aggregates crime statistics, real-time crowd density estimates, weather hazard alerts, and local safety advisories into a unified scoring layer, then computes routes weighted by safety — not just distance.

"The time pressure forced brutal prioritization. We built the core routing algorithm and safety scoring engine first, then layered the UI on top. If the math is right, the interface can be rough. If the math is wrong, no amount of polish saves you."

How It Works

Data Aggregation

Multiple data streams feed the scoring engine: historical crime data (geocoded and time-bucketed), crowd density estimates from anonymized mobile signals, weather service APIs for hazard warnings, and manually curated local advisories. Each source has different update frequencies and reliability characteristics — the aggregator handles normalization and staleness.

Safety Scoring

Every road segment gets a composite safety score that varies by time of day. A well-lit commercial street at 2pm scores differently than the same street at 2am. The scoring function is a weighted combination of the data streams, with weights tunable per user preference — some travelers prioritize avoiding crowds, others prioritize avoiding isolated areas.

Route Optimization

Modified Dijkstra with a multi-objective cost function. The user chooses a safety-distance tradeoff on a slider. At one extreme, you get the shortest path regardless of safety. At the other, you get the safest path regardless of distance. Most users land somewhere in the middle, and the algorithm surfaces the Pareto-optimal trade-off curve.

System Flow

  Crime Data API ----+
                     |
  Crowd Density  ----+---> Aggregator ---> Safety Score
                     |       Engine         per Segment
  Weather Hazards ---+         |
                     |         v
  Local Advisories --+   Route Optimizer
                        (Modified Dijkstra)
                              |
                              v
                      +---------------+
                      | Map UI Layer  |
                      | Safe / Risky  |
                      | color-coded   |
                      +---------------+
        
7th Place at Hackverse 2025
36h Build Time
4 Data Streams Fused

Stack

PythonFastAPIReactLeaflet.jsPostgreSQLPostGISREST APIs