A comprehensive web application for managing emergency responses, resources, and disaster preparedness. This system provides real-time monitoring, resource tracking, incident management, and communication tools for disaster management teams.
- Real-time Data Management: Full CRUD operations with instant updates
- Weather Monitoring: Dynamic weather data with AQI, UV index, and sunrise/sunset times
- Resource Tracking: Manage personnel, equipment, supplies, and vehicles
- Incident Management: Report, track, and manage emergency incidents
- Team Coordination: Deploy and manage response teams
- Communication Center: Internal messaging system
- Analytics Dashboard: Comprehensive insights and statistics
- Node.js (v18 or higher)
- Python 3.8 or higher
- MongoDB (local or cloud instance)
- OpenWeatherMap API key (optional, for real-time weather data)
- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will run on http://localhost:5173 (or the port specified by Vite).
- Navigate to the backend directory:
cd backend- Install Python dependencies:
pip install -r requirements.txt-
Set up environment variables:
- Create a
.envfile (optional) or set environment variables: MONGO_URI: MongoDB connection string (default:mongodb://localhost:27017/)OPENWEATHER_API_KEY: OpenWeatherMap API key (optional)
- Create a
-
Start the backend server:
python app.pyThe backend will run on http://localhost:5000
- Secure authentication system
- User registration on first login (auto-create account)
- Password visibility toggle (eye icon)
- Session management
- Password validation with security requirements
Features:
- Username/password authentication
- Show/hide password functionality
- Auto-account creation for new users
- Session persistence
- Overview of all critical information
- Real-time statistics and metrics
- Quick access to all modules
- Visual summaries with charts and cards
Features:
- Total alerts, resources, and incidents count
- Active incidents status
- Resource utilization metrics
- Recent alerts and incidents display
- Quick navigation to other pages
- Analytics integration
- Create, view, update, and delete emergency alerts
- Filter alerts by severity and status
- Search functionality
- Real-time alert management
Features:
- Create alerts with title, severity, type, location, and description
- Filter by severity (critical, high, medium, low)
- Filter by status (active, resolved, monitoring)
- Search alerts by title or location
- Update alert status
- Delete alerts
- Alert details view
- Manage emergency response resources
- Track resource availability and deployment
- Resource categorization and filtering
Features:
- Add resources (personnel, equipment, supplies, vehicles)
- Edit resource details (name, quantity, location, status)
- Delete resources
- Deploy resources to incidents
- Filter by type (personnel, equipment, supplies, vehicle)
- Filter by status (available, deployed, maintenance)
- Search resources by name or location
- Resource utilization tracking
- Availability metrics
- Report and manage emergency incidents
- Track incident status and progress
- Assign teams to incidents
Features:
- Create incident reports with details (title, type, severity, location, description)
- Update incident status (reported, investigating, responding, resolved)
- Filter incidents by severity and status
- Search incidents by title or location
- View incident details
- Track incident timeline
- Assign response teams
- Manage emergency response teams
- Deploy teams to locations
- Track team status and availability
Features:
- Create response teams (fire, medical, police, rescue, evacuation)
- Deploy teams to specific locations
- Recall deployed teams
- Filter teams by type and status
- Search teams by name or leader
- View team details (members, equipment, contact)
- Team status tracking (available, deployed, training)
- Create and manage evacuation plans
- Track evacuation routes and shelters
- Activate/deactivate evacuation plans
Features:
- Create evacuation plans with coverage area and capacity
- View plan details (shelters, routes)
- Activate/deactivate plans
- Delete plans
- Filter plans by status (active, inactive, under-review)
- Search plans by name or area
- Track plan capacity and resources
- Real-time weather data for multiple cities
- Air Quality Index (AQI) monitoring
- UV Index tracking
- Sunrise/sunset times
Features:
- View weather data for major Indian cities
- Real-time temperature, humidity, wind speed, visibility
- Air Quality Index with PM2.5 and PM10 readings
- UV Index with safety recommendations
- Sunrise and sunset times (city-specific)
- Weather forecast (3-day outlook)
- Weather alerts (heat waves, cold waves, rainfall)
- Search custom locations
- Fallback data when API is unavailable
- Dynamic data updates per city
- Internal messaging system
- Send messages between team members
- Message history and tracking
Features:
- Send messages to team members
- View message history
- Message filtering and search
- Priority levels (urgent, high, normal, low)
- Message status tracking (sent, delivered, read)
- Timestamp tracking
- Comprehensive statistics and insights
- Incident trends and patterns
- Resource utilization analytics
- Performance metrics
Features:
- Total incidents count
- Resolved vs active incidents
- Average response time
- Resource utilization percentage
- Monthly incident trends
- Incidents by type breakdown
- Visual charts and graphs
The application uses MongoDB to store:
- User accounts and authentication data
- Emergency alerts
- Resources
- Incidents
- Response teams
- Evacuation plans
- Messages
- Weather data cache
- React 18 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS - Styling
- Radix UI - UI components
- Lucide React - Icons
- Recharts - Data visualization
- Flask - Web framework
- Python - Backend language
- MongoDB - Database
- PyMongo - MongoDB driver
- Flask-CORS - Cross-origin resource sharing
- OpenWeatherMap API - Weather data
POST /api/auth/login- User login/registration
GET /api/alerts- Get all alertsGET /api/alerts/<id>- Get alert by IDPOST /api/alerts- Create alertPUT /api/alerts/<id>- Update alertDELETE /api/alerts/<id>- Delete alert
GET /api/resources- Get all resourcesPOST /api/resources- Create resourcePUT /api/resources/<id>- Update resourceDELETE /api/resources/<id>- Delete resource
GET /api/incidents- Get all incidentsPOST /api/incidents- Create incidentPUT /api/incidents/<id>- Update incidentDELETE /api/incidents/<id>- Delete incident
GET /api/teams- Get all teamsPOST /api/teams- Create teamPUT /api/teams/<id>- Update teamDELETE /api/teams/<id>- Delete team
GET /api/evacuation-plans- Get all plansPOST /api/evacuation-plans- Create planPUT /api/evacuation-plans/<id>- Update planDELETE /api/evacuation-plans/<id>- Delete plan
GET /api/weather/<location>- Get weather data for location
GET /api/messages- Get all messagesPOST /api/messages- Send message
GET /api/analytics- Get analytics data
Create a .env file in the backend directory (optional):
MONGO_URI=mongodb://localhost:27017/
OPENWEATHER_API_KEY=your_api_key_here- Real-time Updates: Data updates immediately without page refresh
- City-specific Weather Data: AQI, UV index, and sun times vary by city
- Fallback Data: Works without API keys using city-specific fallback data
- Responsive Design: Works on desktop and mobile devices
- Search & Filter: Advanced search and filtering across all modules
- Visual Analytics: Charts and graphs for better insights
- Session Management: Persistent login sessions
- Password Security: Password validation and visibility toggle
- Password validation (8+ chars, uppercase, lowercase, number, special char)
- Session-based authentication
- CORS protection
- Input validation
- Secure password handling
- All CRUD operations are fully functional
- Data persists in MongoDB
- Real-time state updates in the frontend
- Error handling and fallback mechanisms
- Data validation on both frontend and backend
This is a disaster management system project. Feel free to contribute improvements and new features.