Inspiration
In a recent cybersecurity class we discussed a simple idea: attacks will happen so the real question is how well you've prepared to limit the damage. That made me think about physical safety in the same way. If a real attack or a severe storm hit, would I know where to go? Today the main option is MSB's official shelter map, which I found slow and hard to use. I wanted to build something fast and easy to explore that shows how many shelters are actually around you and the quickest route to the nearest one. I also hope it sparks some curiosity: what is it like inside a shelter and how many people does it hold?
What it does
Shelter Locator public shelters and helps you find the fastest route to one nearby. You can search for an address or drop a pin and choose walking, cycling, driving or public transport. Each shelter shows its address and official capacity. The shelters can also be used for severe weather and other emergencies, not just attacks. There is also a live layer where people can check in and share basic information about how full a shelter is and what resources are available. The live check-in layer is currently offline while the backend is being upgraded.
How I built it
The app is a single-page web app with a native Android version built in Kotlin/Compose. I used Sweden’s official shelter data from MSB, MapLibre for the map, OSRM for routing and Trafiklab for public transport. Supabase handles the live check-ins and privacy rules.
Challenges
The biggest challenge was dealing with the official shelter data. The dataset was large, incomplete in some places and difficult to download reliably, so I had to clean it and connect shelters to the correct municipalities. Routing was another challenge. With over 63 000 shelters, I couldn't calculate every route individually. Instead, I use travel-time matrices to find the fastest options. Privacy was also important. I wanted useful information about shelter occupancy without exposing personal information. Check-in data is therefore separated and protected using database-level access rules.
Accomplishments that I am proud of
Someone with devtools open cannot forge an occupancy number, edit someone else's check-in, inflate several shelters at once, or read another shelter's roster. I am proud that it is now faster and visually more fun and interactive to play with than the available page for this.
What I learned
Turning messy real-world data into something actually useful. I also learned how important privacy and reliability are when building something intended for emergencies.
What's next
- Expanding to other countries
- Offline support
- Phone verification for check-ins
- More information about shelter conditions
- Paying for SupaBase so the check-in function works again
Built With
- android
- css3
- geojson
- geopandas
- hcaptcha
- html5
- javascript
- jetpack-compose
- kotlin
- maplibre-gl
- nominatim
- openfreemap
- openstreetmap
- osrm
- postgresql
- python
- resrobot
- row-level-security
- sql
- supabase
- trafiklab
- websockets
- wfs
Log in or sign up for Devpost to join the conversation.