A comprehensive disaster preparedness and emergency management system designed for schools and colleges. This platform provides interactive learning modules, real-time alerts, emergency coordination, and gamification features to enhance disaster preparedness education and response.
- Gaming Modules on disaster types (earthquake, flood, fire, cyclone, tsunami, etc.)
- Interactive Quizzes with immediate feedback and scoring
- Animated Simulations for realistic disaster scenarios
- Region-specific Content tailored to local disaster risks
- Badges & Achievements for completing modules and milestones
- Points System with leaderboards for healthy competition
- Progress Tracking with detailed analytics
- Streak Rewards for consistent learning
- Weather Alerts integrated with IMD/NDMA APIs
- Emergency SOS Button for instant alerts to teachers/admin
- Push Notifications for critical updates
- AI-based Scenario Simulation for training
- Preparedness Score calculation based on NDMA guidelines
- Student/Staff Participation tracking in drills and training
- Compliance Reports and analytics
- Emergency Response Coordination
- Real-time Alerts about child's safety during emergencies
- Progress Monitoring of child's learning journey
- Emergency Notifications with location updates
- SOS System with GPS location tracking
- Disaster Response Team Coordination
- Emergency Contact Management
- Drill Scheduling & Management
- Node.js with Express.js
- MongoDB with Mongoose ODM
- Socket.io for real-time communication
- JWT for authentication
- Axios for external API integration
- Nodemailer for email notifications
- React 18 with functional components and hooks
- React Router for navigation
- Tailwind CSS for styling
- Framer Motion for animations
- Lucide React for icons
- React Hot Toast for notifications
- Recharts for data visualization
- Weather API (OpenWeatherMap)
- NDMA API for disaster alerts
- SMS Service (Twilio) for emergency notifications
- Email Service for parent notifications
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn package manager
git clone <repository-url>
cd disaster-preparedness-system# Install root dependencies
npm install
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm installCreate a .env file in the server directory:
NODE_ENV=development
PORT=5000
MONGODB_URI=mongodb://localhost:27017/disaster-preparedness
CLIENT_URL=http://localhost:3000
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRE=7d
# Email configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_app_password
# Weather API
WEATHER_API_KEY=your_weather_api_key
WEATHER_API_URL=https://api.openweathermap.org/data/2.5
# NDMA API (if available)
NDMA_API_KEY=your_ndma_api_key
NDMA_API_URL=https://api.ndma.gov.in
# SMS Service (Twilio)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number# Start both server and client concurrently
npm run dev
# Or start them separately:
# Terminal 1 - Backend
npm run server
# Terminal 2 - Frontend
npm run clientThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Access to learning modules and quizzes
- View personal progress and achievements
- Participate in emergency drills
- Send emergency SOS alerts
- View leaderboard and badges
- All student permissions
- Create and manage emergency alerts
- View class progress and analytics
- Conduct emergency drills
- Access institutional dashboard
- All teacher permissions
- Manage users and institutions
- Configure system settings
- View comprehensive analytics
- Manage emergency response teams
- Monitor child's learning progress
- Receive emergency notifications
- View child's safety status
- Access emergency contact information
- Receive emergency alerts
- Coordinate with institutions
- Access real-time emergency data
- Manage emergency responses
- Interactive Content: Engaging multimedia content with animations
- Adaptive Learning: Content adjusts based on user's age and knowledge level
- Progress Tracking: Detailed tracking of learning progress and time spent
- Assessment: Quizzes and simulations to test knowledge retention
- Real-time Alerts: Instant notifications for weather and disaster alerts
- SOS System: One-click emergency alert with GPS location
- Coordination: Seamless communication between institutions and response teams
- Drill Management: Scheduled and ad-hoc emergency drills
- Preparedness Scores: Calculated based on NDMA compliance guidelines
- Participation Metrics: Track engagement in learning and drills
- Performance Analytics: Detailed insights into learning effectiveness
- Compliance Reports: Generate reports for regulatory compliance
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current userPUT /api/auth/profile- Update profilePOST /api/auth/change-password- Change password
GET /api/learning/modules- Get all modulesGET /api/learning/modules/:id- Get specific modulePOST /api/learning/modules/:id/start- Start modulePOST /api/learning/modules/:id/quiz- Submit quizPOST /api/learning/modules/:id/simulation- Submit simulation
GET /api/gamification/leaderboard- Get leaderboardGET /api/gamification/badges- Get available badgesGET /api/gamification/user-badges- Get user's badgesPOST /api/gamification/check-badges- Check for new badges
POST /api/emergency/sos- Send emergency SOSGET /api/emergency/active- Get active emergenciesPOST /api/emergency/:id/respond- Respond to emergency
GET /api/alerts/weather- Get weather alertsGET /api/alerts/ndma- Get NDMA alertsGET /api/alerts/institution- Get institution alertsPOST /api/alerts/institution- Create institution alert
- Mobile-first approach with responsive layouts
- Touch-friendly interface for mobile devices
- Accessible design following WCAG guidelines
- Smooth animations and transitions
- Real-time updates without page refresh
- Intuitive navigation and user flows
- Progress indicators and loading states
- Toast notifications for user actions
- Color-coded status indicators
- JWT-based authentication
- Role-based access control
- Input validation and sanitization
- Rate limiting for API endpoints
- CORS configuration
- Helmet.js for security headers
- User: User profiles and authentication
- Institution: School/college information
- LearningModule: Educational content
- UserProgress: Learning progress tracking
- Badge: Achievement system
- EmergencyAlert: Emergency notifications
- UserBadge: User achievements
# Build the client
cd client
npm run build
# Start production server
cd ../server
npm startEnsure all production environment variables are properly configured:
- Database connection strings
- API keys for external services
- Email and SMS service credentials
- JWT secrets and expiration times
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- Mobile app development (React Native)
- AI-powered personalized learning paths
- Integration with more weather and disaster APIs
- Advanced analytics and machine learning insights
- Multi-language support
- Offline mode for emergency situations
- Integration with IoT devices for real-time monitoring
- NDMA (National Disaster Management Authority) for guidelines
- IMD (India Meteorological Department) for weather data
- Open source community for various libraries and tools
- Educational institutions for feedback and requirements
DisasterPrep - Building a safer tomorrow through education and preparedness! ๐ก๏ธ