Inspiration We were driven by a simple question: what if building evacuations could be smarter? Traditional exit signs are static — they don't know if a stairwell is blocked by fire or a hallway is filled with smoke. We wanted to build something that adapts in real-time, giving people the safest way out when every second counts.

What it does Saferoute is an iOS app that provides real-time, AI-recalculated evacuation routes for buildings. Security officers can upload floor plans, place navigation nodes, report hazards, and broadcast emergency alerts to all users. Regular users receive instant evacuation guidance with optimized escape paths that dynamically reroute around active hazards like fire, smoke, or debris. The app features live interactive maps, hazard reporting, SOS notifications that bypass silent mode, and accessibility-aware routing for wheelchair users.

How we built it We built Saferoute using SwiftUI for the frontend and Firebase (Firestore + Storage + Auth) for the backend. Floor plans are uploaded and overlaid with a custom node-edge graph that represents walkable paths. We implemented Dijkstra's shortest path algorithm in our routing engine to calculate optimal evacuation routes, with real-time hazard weighting that penalizes or blocks dangerous paths. Push notifications use Apple's UNNotificationCenter with critical alert support. The map editor uses SwiftUI's Canvas API for performant graph rendering with pinch-to-zoom and pan gestures.

Challenges we ran into Getting real-time synchronization right was tough — when a hazard is reported on one device, every connected user needs their route recalculated instantly. Coordinating Firestore listeners with local state management required careful architecture. Building the interactive map editor with node placement, proximity-based edge connections, and zoom/pan support entirely in SwiftUI Canvas was also a significant challenge. We also struggled with Xcode project file conflicts during collaboration and getting the onboarding UI to feel polished.

Accomplishments that we're proud of We're proud that the full pipeline works end-to-end: a security officer can report a hazard and within seconds, every user in the building sees their evacuation route update to avoid the danger zone. The routing engine correctly handles edge cases like blocked exits, falling back to refuge points when no safe exit exists. We're also proud of the polished dark-themed UI and the dual-role system that gives security officers full control while keeping the user experience simple for regular occupants.

What we learned We learned how to build real-time collaborative systems with Firestore listeners, how graph algorithms like Dijkstra's translate into practical life-safety applications, and how much thought goes into accessible design — things like wheelchair-only routing that avoids stairs. We also gained a deeper appreciation for how critical good UX is in emergency scenarios: when people are panicking, the interface needs to be instantly understandable.

What's next for Saferoute Next, we plan to add indoor positioning using Bluetooth beacons or UWB so the app can automatically detect which floor and room a user is in. We also want to integrate computer vision to let security officers scan a floor plan photo and auto-generate the navigation graph. Longer term, we envision multi-building support, integration with building fire alarm systems for automatic hazard detection, and an Apple Watch companion app for haptic turn-by-turn evacuation guidance.

Built With

Share this project:

Updates