Skip to content

hackusf-2026-crisis-net/crisis-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

143 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crisis-Net: Multi-Agent Disaster Response Platform

Next.js FastAPI Google ADK Gemini Supabase Mailgun Vercel TypeScript Python Tailwind CSS

Five specialized AI agents coordinate in real-time to scout threats, triage severity, match resources, and dispatch multilingual alerts β€” all triggered by a single ZIP code.

Built for HackUSF 2026, focused on Tampa-area
Developed by Knight Hacks & Hack@UCF Members
Uploaded onto Devpost, live at Crisis-Net.tech

πŸ† HackUSF 2026 Winner for Best Use of .tech Domain


Tech Stack

Layer Technology
Frontend Next.js 16, React 18, TypeScript, Tailwind CSS 3
Backend Python Β· FastAPI Β· Uvicorn
Agent Orchestration Google ADK (Agent Development Kit) β€” SequentialAgent, ParallelAgent, LlmAgent
LLM Google Gemini (gemini-2.5-flash-lite default) via google-genai
Database / Auth Supabase (Postgres + anonymous auth + Row Level Security)
Email Mailgun (alerts, opt-in confirmations, webhook-based unsubscribe)
Maps Leaflet + React-Leaflet, MapLibre GL
Charts Recharts
UI Primitives Radix UI, Lucide icons, Framer Motion, cobe (3-D globe)
Deployment Vercel (frontend β€” Next.js framework preset)

External APIs & Data Sources

  • National Weather Service (NWS) β€” active & recent alerts by state
  • US Census Bureau β€” 2020 population by ZIP code
  • pgeocode / Nominatim β€” ZIP β†’ lat/lng + county FIPS geocoding
  • Shelter dataset β€” pre-geocoded JSON of emergency shelters (shelters_geocoded.json)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ Frontend (Next.js on Vercel) ────────────┐
β”‚  Landing  Β·  Dashboard  Β·  About                    β”‚
β”‚  /api/* β†’ rewrites to backend                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ HTTPS
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Backend  (FastAPI)                     β”‚
β”‚                                                     β”‚
β”‚  /scout          – NWS alert ingestion & filtering  β”‚
β”‚  /population_size – Census population lookup        β”‚
β”‚  /resourceMatcher – Nearest-shelter matching        β”‚
β”‚  /translate       – Gemini-powered translation      β”‚
β”‚  /agent-status    – Live agent state                β”‚
β”‚  /activity-stream – Ring-buffer event log           β”‚
β”‚  /summarize       – AI Q&A over alerts + shelters   β”‚
β”‚  /incidents/report – User reports + AI triage       β”‚
β”‚  /alerts/send     – Mailgun alert dispatch loop     β”‚
β”‚  /comms           – On-demand alert send            β”‚
β”‚  /auth/anon       – Supabase anonymous auth         β”‚
β”‚  /user-stuff      – Preference CRUD (email/opt-in)  β”‚
β”‚  /mailgun/webhook – Bounce/unsub handler            β”‚
β”‚  /snowflake/historical – Static hurricane history   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Agent System  (Google ADK)                   β”‚
β”‚                                                      β”‚
β”‚  Coordinator (root SequentialAgent / LlmAgent)       β”‚
β”‚   β”œβ”€ Scout Agent β†’ calls /scout                      β”‚
β”‚   β”œβ”€ AnalysisPhase (ParallelAgent)                   β”‚
β”‚   β”‚    └─ Resource Agent β†’ calls /resourceMatcher    β”‚
β”‚   └─ Comms Agent β†’ calls /translate                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Agent Descriptions

Agent Role
Scout Monitors NWS, FEMA & local feeds; returns active and recent alerts filtered to the target county or Tampa Bay metro area.
Triage Scores severity using storm category, Census population density, and NOAA historical damage data (P1 / P2 / P3).
Resource Matches shelters and aid programs to affected ZIP codes using haversine distance against the geocoded shelter database.
Comms Drafts and dispatches multilingual alerts via Mailgun; translates using Gemini.
Coordinator Orchestrates the full pipeline β€” runs Scout, then parallel analysis, then Comms β€” via Google ADK's agent primitives.

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py                   # FastAPI application (all endpoints)
β”‚   β”œβ”€β”€ shelters_geocoded.json    # Pre-geocoded shelter data
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── agent_system/
β”‚       └── agent.py              # Google ADK agent definitions
β”œβ”€β”€ frontend/crisisnet/
β”‚   β”œβ”€β”€ next.config.js            # API rewrite to backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                  # Next.js App Router pages
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx          # Landing page (globe, agent cards)
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/        # Live ops dashboard
β”‚   β”‚   β”‚   └── about/            # How-it-works + timeline
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/        # Map, feeds, agent panel, reports
β”‚   β”‚   β”‚   └── ui/               # Reusable animated UI primitives
β”‚   β”‚   β”œβ”€β”€ context/              # React context (language toggle)
β”‚   β”‚   └── lib/
β”‚   β”‚       β”œβ”€β”€ api.ts            # Backend fetch wrappers
β”‚   β”‚       β”œβ”€β”€ agents.ts         # Static agent metadata
β”‚   β”‚       └── types.ts          # Shared TypeScript interfaces
β”œβ”€β”€ vercel.json                   # Vercel deployment config
└── requirements.txt              # Root Python dependencies

Getting Started

Prerequisites

  • Node.js β‰₯ 18 and npm
  • Python β‰₯ 3.11

Environment Variables

Create backend/.env:

GEMINI_API_KEY=...
CENSUS_API_KEY=...
SUPABASE_URL=...
SUPABASE_KEY=...
SUPABASE_SERVICE_KEY=...
MAILGUN_API_KEY=...
MAILGUN_DOMAIN=...
MAILGUN_FROM=...
MAILGUN_SIGNING_KEY=...
# Optional
GEMINI_MODEL=gemini-2.5-flash-lite
ALLOWED_ORIGINS=http://localhost:3000
ALERTS_POLL_SECONDS=0

Backend

cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8080

Frontend

cd frontend/crisisnet
npm install
npm run dev          # http://localhost:3000

Next.js rewrites /api/* to the backend at http://127.0.0.1:8080 by default (configurable via BACKEND_URL).

Agent System (standalone ADK runner)

cd backend/agent_system
# Requires FASTAPI_SERVER_URL pointing at the running backend
python -c "from agent import root_agent; print(root_agent)"

Deployment

The frontend deploys to Vercel using its built-in Next.js framework detection (vercel.json sets "framework": "nextjs"). The backend can be deployed to any Python ASGI host (e.g., Railway, Render, Cloud Run) exposing port 8080. Set the BACKEND_URL env var in Vercel to point to the live backend.


Apache 2.0 License

See LICENSE.

About

[Winner @ HackUSF 2026] Multi-agentic, real-time weather detection system for Florida

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors