ÜSAFE: safe walking routes
A navigation app where safety comes first. It calculates walking routes based on the risk of each street segment, fed by community reports and historical police data. A team of 6 of us built it for the USM Software Fair.
- Type
- University
- My role
- Software Engineer and Scrum Master
- Year
- 2025
- Status
- Delivered
What the app does
A regular navigation app optimizes for time. ÜSAFE puts safety first, and the pilot covered San Joaquín and Valparaíso.
- Collaborative map. People report incidents such as robberies, attempted robberies, harassment or vandalism, and each report shows on the map with its type, location and time.
- Safe routes. Each route is calculated from the risk of each street segment, and the person picks between three profiles.
- SOS button. It calls the police, fire services or ambulance directly, and works without signing in.
- Nearby services and frequent locations, such as home or work, to plan routes faster.
- Admin panel. It validates reports, manages accounts and emergencies, uploads historical data and exports information for audits.
How a route is calculated
Risk isn’t fixed. It’s recalculated every time an administrator validates a new report.
- 01ReportA person reports an incident with its type, location and time.
- 02ValidationAn administrator reviews it in the panel before it counts toward risk.
- 03Weight by typeEach incident type weighs differently. A violent robbery weighs more than vandalism.
- 04Risk per segmentThe risk of each street segment is recalculated from its reports and historical data.
- 05RouteDijkstra over the street graph, with a cost that combines distance and risk.
- 06Three profilesThe person picks the safest, the shortest or a balanced route.
Historical police data follows the same path. The administrator uploads the files in the panel and the system turns them into reports that feed the risk calculation.
How it is built
It’s a three-tier architecture. The app and the panel consume a REST API, which is the only one that accesses the database.
Presentation
- Mobile app · Expo and React NativeIncident map, reports, routes, nearby services and SOS button.
- Web panel · React and ViteReport moderation, accounts, emergencies and historical data uploads.
Business logic
- REST API · Node and FastifyUsers, reports, routes, emergencies and the risk index of each segment.
Data
- PostgreSQL on SupabaseUsers, reports, dispatches and the graph of streets and intersections.
External services
- Google Maps PlatformAddress search and nearby places, such as police stations and hospitals.
- CartoDBBase map where reports, routes and zones are drawn.
- Police STOP dataHistorical crime data, obtained through the Transparency Portal.
The API is organized into components with one responsibility each, such as authentication, reports, routing, emergencies, incident type weights and risk per segment. Routing and the SOS button work without a session, so help doesn’t depend on having an account.
My part
It was a year-long project with a team of 6. Each sprint was split by user stories, and these were mine.
- Accounts and roles. Sign-up and sign-in with JWT, with unique emails and encrypted passwords, and an administrator role separate from the pedestrian role.
- Personal data and privacy. Each person edits their data and decides whether their information shows on the reports they create.
- Admin panel access. Admin-only sign-in, with the panel views protected for anyone without a session.
- Audit export. The history of reports and users downloads as Excel or JSON, filtered by date range and with the chosen fields.
- Language switch. The whole app can be used in another language, and the choice is saved in each user’s settings.
- Reports between users. A person can report another for false information, spam or inappropriate content. The administrator reviews the reports, and anyone with several is deactivated.
- Most-traveled streets map. A layer in the panel shows the traffic intensity of each street, with its legend, for future analysis.
I also set up the web panel repository, with continuous integration on GitHub Actions, tests and deployment.
Beyond code, I reviewed more than 30 pull requests, was the team’s Scrum Master and was in charge of testing the system.
After the fair
The app was presented at the 33rd USM Software Fair. A year later I took it as the case study for my thesis, where I documented its architecture and designed where to take it so routing can scale. It’s in Redesigning the ÜSAFE architecture.