Operation SAFER is a Smart City Emergency Operations Command Center designed for real-time urban flash flood detection, AI risk forecasting, autonomous multi-agent coordination, and emergency rescue fleet dispatch.
- Live weather gauge & telemetry metrics (Rainfall rate, Water Stage Level, Temperature, Humidity, River Velocity, Pressure).
- Real-time Flood Risk Badge (
LOW,MEDIUM,HIGH,EXTREME). - High-level KPI metrics for rescue teams, shelters, and active broadcasts.
- Live stream of recent emergency events and sensor alerts.
- Recharts hydrographs for precipitation and river water stage level.
- Interactive Leaflet map centered on urban sectors.
- Flooded sectors mapped with high-visibility red polylines and pulsing warning icons.
- High-elevation safe zones outlined in green.
- Emergency shelter locations with capacity utilization and amenities.
- Real-time rescue fleet markers (NDRF, Fire Brigade, Police, Ambulance).
- Interactive details drawer when clicking any zone or marker.
- Interactive sliders for meteorological parameters (Rainfall mm/hr, Water Level m, Humidity %, Temp °C, Velocity m/s).
- Direct server-side integration with Google Gemini 3.6 Flash.
- Generates structured hydrological flood risk level, confidence score (%), cause-and-effect reasoning, tactical recommendations, evacuation directives, and agent execution plans.
- Preset scenarios: Normal Day, Heavy Monsoon, Flash Flood Emergency.
Visual monitoring and animated pipeline simulation for 5 core AI agents:
- Data Collection Agent: Ingests weather radar, satellite indices, and ultrasonic river sensors.
- Flood Prediction Agent: Runs Gemini hydraulic and runoff AI models.
- Mapping Agent: Renders dynamic GIS flood polygons and marks inundated roads.
- Resource Allocation Agent: Matches stranded citizens with rescue boats and ambulances using Dijkstra shortest path.
- Alert Agent: Formats and broadcasts multi-channel emergency messages.
- Real-time tracking of NDRF units, Fire Engines, Police Patrols, and Ambulances.
- Dynamic crew size, equipment inventory (dinghies, pumps, cranes, trauma kits), location, and ETA.
- Interactive Assign Mission modal to dispatch resources to target sectors with real-time status updates.
- Active alert feeds (Flash Flood Alert, Evacuation Notice, Road Closure, Shelter Open).
- New Alert modal to compose public broadcasts distributed across Cell Broadcast, SMS, TV/Radio, and City Sirens.
- 24-hour rainfall vs river stage area charts.
- Calculated Flood Risk Index progression line chart.
- Emergency calls vs dispatched rescue units bar chart.
- Rescue team SLA response times.
- CSV report export for city disaster planning.
operation-safer/
├── server.ts # Express backend server & Gemini API endpoint
├── metadata.json # Applet capabilities metadata
├── package.json # Project dependencies & scripts
├── index.html # HTML entry point with Leaflet CSS & Fonts
├── vite.config.ts # Vite configuration
├── src/
│ ├── main.tsx # React entry point
│ ├── App.tsx # Main layout & router container
│ ├── index.css # Tailwind CSS styles
│ ├── types.ts # Global TypeScript interfaces
│ ├── data/
│ │ └── mockData.ts # Hydrological, GIS, rescue & alert datasets
│ └── components/
│ ├── Header.tsx # Command bar with clock, weather & siren test
│ ├── Sidebar.tsx # Navigation sidebar
│ └── views/
│ ├── DashboardView.tsx # Main Overview & charts
│ ├── LiveMapView.tsx # Leaflet interactive GIS map
│ ├── AIPredictionView.tsx # Gemini AI flood risk predictor
│ ├── MultiAgentView.tsx # Multi-agent swarm monitoring
│ ├── RescueManagementView.tsx # Rescue fleet dispatch hub
│ ├── EmergencyAlertsView.tsx # Public safety broadcast feed
│ └── AnalyticsView.tsx # Recharts analytics dashboard
-
Clone & Install Dependencies
npm install
-
Environment Configuration Ensure your
.envfile includes your Gemini API Key (automatically injected in Google AI Studio):GEMINI_API_KEY="your_gemini_api_key_here"
-
Start Development Server
npm run dev
Open
http://localhost:3000in your browser. -
Build for Production (Vercel / Cloud Run)
npm run build npm run start
- Frontend: React 18+, TypeScript, Tailwind CSS
- Backend / API Proxy: Express.js, Node.js (
tsx) - AI Model: Google Gemini API (
@google/genaiSDK -gemini-3.6-flash) - Mapping: Leaflet + OpenStreetMap
- Data Visualizations: Recharts
- Icons: Lucide React
- Animations: Motion