AI-Powered Disaster Relief Coordination System A cutting-edge platform built to streamline disaster response through intelligent mapping, instant alerts, automated damage assessment, and secure coordination. Real-time coordination between victims, volunteers, and authorities via live mapping (Leaflet.js) and secure communication.
- Interactive live maps powered by Leaflet.js
- Visualize affected zones, resource locations, and volunteer positions
- Personalized, adaptive evacuation routes using AI
- Considers live terrain, road status, and infrastructural data
- Emergency SMS alerts via Twilio
- Email updates and in-app notifications
- Analyzes satellite & social media data post-disaster
- Generates real-time damage and impact reports using AI/ML
- Match victims with volunteers using smart filters
- Role-based access with Clerk authentication
git clone https://github.com/your-username/rescueconnect-ai.git
npm install2οΈβ£ Configure Environment Variables
Create a .env.local file in the root directory and add the following:
# Database Configuration (Required)
DATABASE_URL=postgresql://username:password@host:5432/database_name
# JWT Secret for Authentication (Required)
JWT_SECRET=your_super_secure_jwt_secret_key_here
# Cloudinary Configuration (Optional - for image uploads)
CLOUDINARY_CLOUD_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Twilio SMS Configuration (Optional - for emergency alerts)
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
# Email Configuration (Optional - for notifications)
NODEMAILER_EMAIL=your_email@example.com
NODEMAILER_PASSWORD=your_app_password3οΈβ£ Initialize Database
npm run init-db4οΈβ£ Run Locally
npm run dev
# OR for complete setup:
npm run setup5οΈβ£ Access Application
Visit: http://localhost:3000- Next.js β React-based framework for SSR & SSG
- Tailwind CSS β Utility-first CSS framework for rapid UI development
- Framer Motion β Smooth and powerful animations for React
- Express.js β Minimal and flexible Node.js web application framework
- PostgreSQL β Powerful, open-source relational database
- NeonDB β Serverless PostgreSQL database with autoscaling and branching support
- JWT (JSON Web Tokens) β For stateless and secure authentication
- Cloudinary β Image storage and transformation
- Twilio β SMS notification system
- Nodemailer β For email services
- Leaflet β Interactive map implementation
- Database Connection: Standardized PostgreSQL connection pooling across all API routes
- API Endpoints: Fixed missing
/api/volunteersendpoint (was causing 404 errors) - Request Processing: Improved
/api/requestswith consistent database handling - Alert System: Enhanced
/api/alertswith proper resource management - Code Quality: Removed syntax errors and improved error handling
- Complete schema with users, staff, volunteers, requests, disasters, alerts tables
- Proper indexing for optimal performance
- Foreign key constraints for data integrity
- Sample data included for immediate testing
- Automated database initialization:
npm run init-db - Complete setup command:
npm run setup - Environment template provided
- Comprehensive error handling and logging
- β
GET/POST /api/volunteers- Volunteer management - β
GET /api/requests- Emergency requests - β
POST /api/alerts- Multi-channel emergency alerts - β
POST /api/user/login- User authentication - β
POST /api/staff/login- Staff authentication - β
POST /api/staff/requests- Request submission
The backend is now fully functional and ready for presentation with:
- Real-time disaster tracking
- Volunteer coordination system
- Emergency alert distribution
- Image upload capabilities
- Geolocation-based services
To enable automatic WhatsApp message sending, you need to set up CallMeBot API:
- Add CallMeBot to your WhatsApp contacts:
+34 644 59 71 67 - Send a WhatsApp message to CallMeBot with the text:
I allow callmebot to send me messages - You'll receive a reply with your API key
Add to your .env.local file:
CALLMEBOT_API_KEY=your_api_key_here
The system will automatically send WhatsApp messages when configured properly.
- Click on the WhatsApp links in the alert success message
- This opens WhatsApp Web with pre-filled message
- Click "Send" to deliver the message
For production use, consider WhatsApp Business API for more reliable delivery.
π€ Contributing
git clone https://github.com/your-username/project-name.git cd project-name
git checkout -b feature-name
git add . git commit -m "Add feature"
git push origin feature-name
By : Team Synergy