Inspiration
India's NDMA School Safety Guidelines (2016) say every school should "prepare a floor wise evacuation plan and display it prominently at the notice board on each of the floors", and run mock drills "preferably once in every six months". In most schools the plan is an old sketch and the drill is a bell plus a guess. Nobody knows which class was slow or where the staircase jammed.
What it does
- Map: draw each floor over a photo of the floor plan. Add rooms with headcounts, corridors, staircases, exits and the assembly point. Measure distances by walking them with your phone (a step counter), or type them in.
- Plan: for every class, the app works out the best route. It simulates crowd flow on corridors and stairs and spreads classes across staircases so queues stay short.
- Print: an A4 evacuation sheet for each floor, plus a route card for each classroom door.
- Drill: the coordinator starts a drill with a 5-letter code or QR. Teachers' phones tap left, reached and headcount, and it still works offline. A live board shows every class.
- Report: planned time vs actual time for each class, classes that were slow to leave, likely staircase jams, missing heads, and classes that never reported. It also compares against the last drill.
How we built it
Drillmap is plain, exact code. There's no AI inside the app, so every route and every time can be checked.
- Routes: a shortest-path search (Dijkstra) finds every class's possible routes through corridors, staircases and exits.
- Crowd flow: a step-by-step simulation sends each class down its route. Corridors and stairs only let so many people through per second, based on their width, so classes queue behind each other just like in a real drill.
- Optimiser: it keeps moving classes between staircases until the whole school is out fastest. The plan also shows where queues form, in red on the map.
- Measuring: distances are measured by walking them with a phone, using the motion sensor as a step counter, or typed in.
- Live drills: teachers' phones join with a 5-letter code. Taps are queued if the Wi-Fi drops, and the server stamps the time, so a slow phone can't fake a time. Mistaken taps can be undone, and the coordinator can mark a silent class by hand.
- Hindi: the teacher's phone screen and the printed sheets switch between English and Hindi.
- Privacy: a school's map is private. Only someone with its private edit link can see, change or delete it. Teachers in a drill only see their own class's route.
- Stack: React and TypeScript on Vite, an Express API on Vercel, and Postgres on Neon.
Challenges
Getting crowd flow believable without a physics engine. Making the drill work on bad school Wi-Fi (taps are queued offline and timestamped by the server). Moving live updates from streaming to polling so it runs serverless.
What I learned
I learned how to plan maps and the calculations in it. Thinking about the tool was one thing but building it was really different.
What's next
Make this reach upcoming and present school who doesn't have this and its a little common in India which is actually a bad thing, and the lives of the student in a real disaster are at risk.
Hindi on the print sheets and the monitor screen, undo for a mistaken tap, and a real drill at more schools.
AI disclosure: The code was written with an AI coding assistant. The idea, the design decisions, the features and the testing were mine. The app itself uses no AI.
Built With
- dijkstra
- express.js
- neon
- node.js
- postgresql
- react
- typescript
- vercel
- vite
Log in or sign up for Devpost to join the conversation.