Inspiration

We set out to tackle a problem which affects many individuals daily lives -- including our own. We've all been there, out alone at late at night, and need to walk through the city or unfamiliar areas as part of our way home. It's widely known there are plenty of very dangerous areas in the city, but it's uncannily unknown where exactly these dangerous areas are, and more importantly, how to safely navigate them.

What it does

Craze uses crowdsourced reports to create efficient walking routes to requested locations while avoiding any dangerous areas. It functions similar to Waze, but instead of avoiding traffic, it helps user avoid unsafe locations. Users can easily report dangerous areas by clicking on the location, tapping on the create a report button, and fill out the necessary boxes. The map shows unsafe locations represented by highlighted circles which depict the level of danger reported for that area, ranging from low to high, and a brief description of the report if applicable. Craze additionally offers a "find a buddy system" which acts as a gateway to connect individuals who would like a buddy to walk with, adding another layer of safety.

How we built it

We gathered sidewalk routing data for Toronto from OpenStreetMaps and used OSRM (Open Source Routing Machine) with dynamically generated profile scripts to preprocess optimal routes. After the preprocessing is complete, we run an ORSM instance using Docker. We designed a custom algorithm for ORSM to avoid danger areas. We used SQLite and PrismaORM to store user data like buddy requests, usernames, danger reports, and profile pictures. We used React to create the frontend and bridged to the ExpressJS backend through a REST API.

Challenges we ran into

One challenge we ran into was modifying the OSRM profile scripts to penalize paths routing through dangerous locations, since we had no experience in Lua (which does not have good debugging tools) and the language does not include typings, so it was hard to know what information certain objects held and what we needed to modify without scouring the OSM repo. Another challenge we faced was rendering the map with the routed path segments which did not play nice with the OSM data and styling. Although we previously had no experience in OSM, Lua, and Docker, after some perseverance (and loss of hair), we managed to get past our challenges.

What we learned

Our biggest takeaways from this project include the process of setting up Docker containers, writing OSRM scripts in Lua, and distance algorithms using latitude and longitude.

What's next for Craze

In the future we would like to incorporate municipal crime statistics to extend and cover more unsafe locations, and also include public transportation data to possibly create faster routes. We would also like to implement a rating and verification system for the find my buddy feature to ensure that any found buddies are trustworthy individuals.

Built With

Share this project:

Updates