DEV Community

Cover image for πŸ›‘οΈ We Built an AI Flood Guardian in a Hackathon β€” Meet StormShield AI
Tanisha
Tanisha

Posted on

πŸ›‘οΈ We Built an AI Flood Guardian in a Hackathon β€” Meet StormShield AI

🌧️⚑
Hackathons are chaotic.
You start with coffee β˜•
You end with questionable sleep decisions, rapid-fire Git commits, and a lot of β€œwait… does this even run?” moments.
But sometimes something really cool comes out of that chaos.
For the World Wide Vibes Hackathon, our team OmniShield decided to build something that could actually help people during extreme weather events.
So we built:
πŸ›‘οΈ StormShield AI β€” a real-time flood prediction and civic alert system
A system that monitors water levels, predicts floods, and alerts citizens before things get dangerous.
And yes… we built it during a hackathon.

🌍 Live Demo
You can try the project here:
πŸš€ Live App (Render Deployment)
πŸ‘‰ https://stormshieldai-montgomery.streamlit.app/

πŸŽ₯ Demo Video
We also recorded a walkthrough showing the system in action.
🎬 Watch the demo

Or watch directly here:
πŸ‘‰ https://www.youtube.com/watch?v=La_nr6mdPw0

🌊 The Problem
Flooding is one of the most common natural disasters worldwide.
The problem isn’t just detecting floods β€” it’s detecting them early enough to act.
Most traditional systems:
rely on static thresholds

provide delayed alerts

don’t explain what people should actually do

We wanted to build something smarter:
⚑ Real-time monitoring
πŸ€– AI-powered predictions
πŸ“’ clear public alerts

πŸ›‘οΈ Enter StormShield AI
StormShield acts like a digital guardian for the city.
It continuously monitors environmental data, predicts what might happen next, and informs citizens before flood conditions escalate.
Think of it as:
🚨 An AI-powered early warning system for floods
Built for Montgomery, Alabama.

🌟 Key Features
🌍 Real-Time Data Ingestion
StormShield constantly collects live environmental data from:
🌊 USGS stream gauge data

β›ˆ NOAA / NWS weather alerts

🌦 local weather telemetry

This keeps the system aware of changing flood conditions in real time.

πŸ€– Predictive Flood Forecasting
We trained a machine learning model using XGBoost on historical water-level data.
The model predicts:
🌊 water levels 30 minutes into the future (T+30)
That short prediction window can provide critical early warning time.

🚨 Smart Alerting Engine
StormShield automatically categorizes risk levels:
Status
Condition
Meaning
🟒 GREEN
Normal water level
Safe conditions
🟑 YELLOW
Rapid water rise
Prepare / caution
πŸ”΄ RED
Predicted flood stage
Immediate action

The system also monitors rate-of-rise, one of the earliest indicators of flash flooding.

✨ Generative AI Alerts (Gemini 2.0 Flash)
Raw flood data isn’t helpful for most people.
So we integrated Gemini 2.0 Flash to generate clear, calm public alerts.
Instead of confusing telemetry, people receive messages like:
β€œWater levels are rising rapidly near Sligo Creek. Residents should avoid low-lying roads and prepare for possible evacuation guidance.”
Helpful. Clear. Not panic-inducing.

πŸ’¬ Ask StormShield AI
We also built a RAG-powered AI assistant.
Citizens can ask questions like:
β€œIs my neighborhood at risk?”

β€œWhich roads are flooded?”

β€œWhere are evacuation points?”

StormShield searches live system data and answers instantly.

πŸ“Š The Dashboard
We created a live interactive dashboard using Streamlit.
Features include:
πŸ“ˆ real-time water telemetry
🌊 predictive flood charts
πŸ—Ί interactive flood zone maps
πŸ“ live sensor markers
And one of our favorite features:
🌳 Green Infrastructure Simulator
It estimates how many trees would be needed to reduce water runoff and flood risk.
Because sometimes the best flood defense is simply more trees.

βš™οΈ Tech Stack
Backend
🐍 Python

⚑ FastAPI

⏱ APScheduler

πŸš€ Uvicorn

Frontend
πŸŽ› Streamlit

πŸ—Ί Folium (interactive maps)

πŸ“Š Plotly charts

AI / ML
🌳 XGBoost (time-series forecasting)

πŸ€– Gemini 2.0 Flash (alert generation + RAG chatbot)

Data Sources
🌊 USGS Water Services API

β›ˆ NOAA / NWS alerts

🌐 Bright Data

πŸ—οΈ Project Architecture
StormShield/
β”‚
β”œβ”€β”€ backend/
β”‚ β”œβ”€β”€ ingestion/
β”‚ β”œβ”€β”€ processing/
β”‚ β”œβ”€β”€ prediction/
β”‚ β”œβ”€β”€ alert/
β”‚ β”œβ”€β”€ simulation/
β”‚ └── query/
β”‚
β”œβ”€β”€ frontend/
β”‚ β”œβ”€β”€ dashboard
β”‚ β”œβ”€β”€ interactive maps
β”‚ └── chatbot interface
β”‚
└── data/
β”œβ”€β”€ model weights
└── telemetry cache

πŸš€ Running the Project Locally
Clone the repo:
git clone https://github.com/Tanishaaaaaaa/StormShield.git
cd StormShield
Create environment:
python -m venv venv
source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Train the model:
python backend/modules/prediction/train.py
Run backend:
uvicorn backend.main:app --reload --port 8000
Run dashboard:
streamlit run frontend/app.py

πŸ† Hackathon Context
This project was built for the World Wide Vibes Hackathon.
Goal:
Build an AI-powered civic application that can help communities respond to extreme weather events.
Team: OmniShield
Project: StormShield AI
Sometimes hackathon ideas stay as prototypes.
But occasionally they turn into real-world solutions.
StormShield might just be one of those.

πŸ’¬ We’d Love Feedback
If you were building an AI-powered smart city platform, what would you add?
Better prediction models?
IoT sensors?
Automated evacuation planning?
Curious to hear ideas from the community.

Top comments (0)