Project Info

SafeRoute

Devpost

Inspiration

At UC Berkeley, we frequently experience scenarios walking home alone late at night, regretting the path we took down that dark alleyway or hoping we had someone with us. What we created This inspired us to create SafeRoute, which automatically finds the safest routes based on historical crime data. Additionally, we added a user self-report feature with uses Groq to classify user incident photos and add them to the map.

How we built it

The site's crime database based on PostGre SQL has two sources: publicly scraped incident data and self-reported incidents from the application itself (described and classified through groq). These two kinds of incidents are entered into the postgresql database. When the user queries a new route, we use mapbox to identify relevant road segments by using a modified dijkstra algorithm to traverse a K-dimensional Tree data structure with weighted edges that generates the shortest path from point a to b. We decided that the edge weights should be calculated using a cost function based on multiplying time, crime severity score, and distance, in which the algorithm finds the closest unvisited node to take its next direction.

Challenges we ran into

The public records site with the dataset we were scraping from coincidentally began requiring auth for API requests the second day of the hackathon, leaving us very confused. Luckily we found a workaround. Figuring out how to incorporate road pathing (valid path recognition) was very difficult considering that we had to still have the algorithm optimize for safety.

Accomplishments we're proud of

The routing algorithm Very strong image recognition accuracy Frontend Development Team communication

What we learned

Docker Postgresql Mapbox Common routing/pathing algorithms

What's next

Next, we plan on expanding the platform to have even more advanced routing for safest routes and customized settings. We would also like for SafeRoute to eventually be compatible with Google Maps because of the user concentration. Additionally, we would like to have live rerouting in the case of new incidents.

Analysis

Compare with all teams

View

Metric

Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.

Technology

Found in codeClaimed only
  • CSSIn code
  • FastAPIIn code
  • HTMLIn code
  • JavaScriptIn code
  • PythonIn code
  • ReactIn code
  • DockerClaimed
  • PostgreSQLClaimed
  • SQLClaimed

6 of 9 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.

AI coding agents

  • Claude CodeConfig
  • CursorConfig

Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.

Codebase size

Source size

556 KB

Source files

76

Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.

0 stars