Inspiration

A few summers ago, I was visiting my grandma in Jiangxi, China, during my annual August trip when a flood warning came in. I had never dealt with an actual flood before, so my dad and I did what felt right: we rushed to drive away. Looking back, that could have been the wrong decision. We were lucky that we drove in a safe direction and stayed away from floodwater, but at the time, we were mostly guessing. During that same flood, my grandma’s cat, whom I loved playing with, died because he was outside when the flooding happened. That experience stayed with me because we technically had a warning, but no specific guidance. The alert told us that a flood was coming, but it did not tell us what to do next, which direction was safe, or whether driving was a bad idea. That gap inspired the creation of ProtectionIV: a tool that turns disaster alerts into calm, specific, step-by-step guidance before, during, and after a disaster.

What it does

ProtectionIV turns a disaster alert into a personalized action plan for the user’s exact situation and location. Instead of giving generic advice like “move to higher ground,” ProtectionIV tries to answer the practical questions someone actually has in the moment:

  • Which direction is higher ground from where I am?
  • Where is the nearest sturdy building?
  • How is the fire moving?
  • Should I stay inside, leave, shelter, or wait?
  • What do I need to do after the alert clears?

The user can start in three ways:

  • ProtectionIV can find a live alert near them.
  • The user can upload a screenshot of an alert from their phone, and a vision model reads it.
  • The user can use demo mode to simulate a disaster scenario.

After that, the AI determines the urgency of the alert and asks a short one-tap resource check. This is intentionally simple because someone in an emergency may not have the time or focus to type a long explanation. The user can quickly answer things like:

  • Am I walking or driving?
  • Am I at home?
  • Is anyone with me?
  • Does anyone have limited mobility?
  • Are there dependents, pets, or medical equipment involved? All those answers change the plan.

ProtectionIV currently handles four disaster types:

  • Floods: Uses elevation data to figure out which direction the ground rises and routes the user away from flood-prone areas.
  • Wildfires: Uses live fire detections and wind direction to understand where the fire is and where conditions may push it.
  • Tornadoes: Guides the user toward the lowest, most interior safe space, or the nearest sturdy building if they are outside.
  • Earthquakes: Gives immediate drop-cover-hold guidance, then helps the user identify safer open space if the building becomes unsafe.

The plan is shown on a map with route and destination guidance. The user can also ask follow-up questions, add new information, or say that something changed, and ProtectionIV rebuilds the plan around the updated situation. Once the immediate danger has passed, ProtectionIV can be used to support recovery. It helps users understand safe re-entry, cleanup steps, insurance paperwork, aid applications, required documents, deadlines, and when to involve a human professional.

How we built it

ProtectionIV is built with a React frontend and a FastAPI Python backend. The map experience uses Leaflet for satellite mapping and routing. The most important design choice was making the system deterministic first and AI-assisted second. Each disaster module creates a structured rule-based plan before the AI layer is used. That means the system has a grounded fallback plan even if the AI model is slow, unavailable, or produces a weak response. The AI layer, accessed through OpenRouter, is used to make the plan easier to understand, read alert screenshots, and answer follow-up questions. It is not allowed to freely invent core safety decisions like routes, destinations, or hazard logic. Those come from the planning engine and live data. We grounded the system with government and emergency sources such as Ready.gov, FEMA, the National Weather Service, USGS, and CAL FIRE. We also connected multiple live data sources, each with a specific role:

  • Open-Meteo for elevation and wind
  • NASA FIRMS for active fire detections
  • USGS for earthquakes
  • NWS and ECCC for weather warnings
  • Overpass and OpenStreetMap for nearby buildings and shelters
  • OSRM for road routing
  • Google News for local situational awareness

We also used Claude Code and Codex to move faster across Python, React, TypeScript, and debugging. Claude for Chrome helped with webpage debugging, and Claude AI helped refine the interface and design direction.

Challenges we ran into

The hardest part was finding real-world data sources to work together reliably. Each API had a different format, speed, limitation, or failure mode. Overpass mirrors are slow or fail to respond, so I had to build a multi-mirror failover with generous timeouts, although it is still the slowest part of the pipeline. The second major challenge was safety, ensuring that AI never generate unsafe advice. Since in a disaster context, the wrong instructions could cost human lives. That is why ProtectionIV uses computational planning first, based on official guidance and live data, and then uses AI to explain, personalize, and adapt that plan more accurately.

Accomplishments that we're proud of

We are proud that ProtectionIV is not just a generic emergency chatbot. It actually reasons over live, real-world data. We wired up a lot of APIs, each doing a specific job: Open-Meteo for elevation and wind, NASA FIRMS for active fire detections, USGS for earthquakes, NWS and Environment Canada for weather warnings, Overpass and OpenStreetMap for nearby buildings and shelters, OSRM for road routing, and Google News for live local headlines. So when ProtectionIV tells the user the safe direction, it's pulling the ground's actual elevation and the wind's actual direction at that moment, not guessing. We're also proud of how responsibly the AI is built in. ProtectionIV is deterministic first, AI second. It helps translate and explain the plan, but the core plan comes from hazard-specific logic, official guidance, user context, and live data. Another accomplishment is the end-to-end scope. This AI is not only for the moment of panic. It supports the full arc: starting from the second that users receive an alert, all the way to post-disaster recovery.

What we learned

One of the biggest things we learned was how many reliable public APIs exist, and how powerful they become when they are connected with a clear purpose. Elevation, wind, fire detections, weather alerts, earthquake feeds, maps, shelters, and routing each serve an important role in the whole project. We also learned a lot technically. We became more comfortable reading and debugging a FastAPI app, working with React and TypeScript, understanding routing logic, and connecting frontend behaviour to backend planning. We still aren't experts in all of these tools, but we understand the structure much better now.

What's next for ProctectionIV

The biggest limitation right now is that a web app cannot receive an operating-system-level emergency alert when it is closed. The natural next step is a native app or stronger PWA experience that can activate when an official warning arrives, instead of requiring the user to open the site first. Other potential next steps are:

  • Expanding live weather and alert coverage beyond the United States and Canada.
  • Improving the screenshot parser so it can extract expiration times and create a real countdown.
  • Strengthening the recovery engine so it can handle more countries, not just US/FEMA-style documents.
  • Supporting more languages, since the current bilingual direction already shows that multilingual scaling is possible.
  • Continuing to improve performance and reliability when external APIs are slow or unavailable.

Built With

  • anthropic/claude-sonnet-4.6
  • eccc-geomet
  • esri-/-opentopomap-/-osm
  • fastapi
  • google-news-rss
  • leaflet-1.9
  • nasa-firms
  • nominatim-(openstreetmap)
  • nws-(api.weather.gov)
  • open-meteo-elevation
  • open-meteo-forecast
  • openrouter
  • osrm
  • overpass-api
  • pdfjs-dist
  • pwa-(service-worker)
  • python-3.10+
  • pythonanywhere
  • react-18
  • usgs-earthquake-feed
  • uvicorn
  • vercel
  • vite-6
  • web-speech-api-(speechsynthesis-+-speechrecognition)
Share this project:

Updates