A comprehensive flood monitoring and disaster response system for the Philippines, featuring real-time monitoring, AI-powered predictions, and blockchain-based transparent relief distribution.
This system addresses the critical challenges of flood management in the Philippines through:
- Real-time Flood Monitoring: IoT sensors and community reporting
- AI-Powered Predictions: Machine learning models for flood risk assessment
- Emergency Alert System: Multi-channel notifications and evacuation guidance
- Blockchain Transparency: Immutable relief distribution tracking
- Cross-Platform Access: Web and mobile applications for all stakeholders
βββ web-app/ # React.js web application
βββ mobile-app/ # Flutter mobile application
βββ backend-api/ # Node.js/Express API server
βββ ai-prediction/ # Python Flask AI service
βββ blockchain-contracts/ # Ethereum smart contracts
βββ iot-monitoring/ # IoT sensor integration (future)
- IoT water level sensors integration
- Crowdsourced flood reporting with GPS
- Weather data integration (PAGASA API)
- Real-time dashboard updates via WebSocket
- Machine learning flood risk assessment
- 6-24 hour flood predictions
- Location-specific warnings
- Historical data analysis
- Automated alert notifications (SMS, Push, Email)
- Evacuation route planning
- Emergency shelter locator
- Multi-language support
- Blockchain-verified aid tracking
- QR code beneficiary verification
- Transparent distribution records
- Donor contribution monitoring
- Web: React.js, Material-UI, Chart.js, Socket.io
- Mobile: Flutter, Provider (state management)
- API Server: Node.js, Express.js, Socket.io
- Database: MongoDB Atlas
- Authentication: JWT, bcrypt
- Framework: Python Flask
- Libraries: scikit-learn, pandas, numpy
- Models: Random Forest for flood prediction
- Network: Ethereum Testnet (Sepolia)
- Language: Solidity
- Tools: Hardhat, Ethers.js
- Node.js 16+
- Python 3.8+
- MongoDB
- Flutter SDK
- Hardhat
- Git
git clone <repository-url>
cd smart-flood-systemcd backend-api
npm install
cp .env.example .env # Configure your environment variables
npm startEnvironment Variables (.env):
PORT=5000
MONGODB_URI=mongodb://localhost:27017/smart-flood
JWT_SECRET=your-secret-key
PAGASA_API_KEY=your-api-keycd ../ai-prediction
pip install -r requirements.txt
python app.pycd ../web-app
npm install
npm startcd ../mobile-app
flutter pub get
flutter runcd ../blockchain-contracts
npm install
npx hardhat compile
npx hardhat run scripts/deploy.js --network sepolia- Install MongoDB locally or use MongoDB Atlas
- Update connection string in backend
.env - Run database migrations (if any)
For IoT sensor integration:
// Example sensor data format
const sensorData = {
sensorId: "SENSOR_001",
barangay: "Centro",
location: {
latitude: 14.5995,
longitude: 120.9842
},
waterLevel: 2.5, // meters
temperature: 28.5,
humidity: 75,
rainfall: 12.5,
batteryLevel: 85
};Update hardhat.config.js with your network settings:
networks: {
sepolia: {
url: process.env.SEPOLIA_URL,
accounts: [process.env.PRIVATE_KEY]
}
}- Access at
http://localhost:3000 - Login with user credentials
- Monitor flood data in real-time
- Manage relief distribution
- View analytics and reports
- Install on Android/iOS device
- Login with same credentials
- Receive push notifications
- Submit flood reports with photos
- Track relief distribution
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/profile- Get user profile
GET /api/flood/status- Get all barangay flood statusPOST /api/flood/sensor-data- Record sensor dataPOST /api/flood/report- Submit crowd report
GET /api/relief- Get relief itemsPOST /api/relief- Create relief itemPUT /api/relief/:id/distribute- Record distribution
POST /ai/predict- Get flood predictionGET /ai/predict/:barangay- Get barangay prediction
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
cd backend-api
npm testcd ai-prediction
python test_model.pycd blockchain-contracts
npx hardhat test- JWT authentication with refresh tokens
- Input validation and sanitization
- Rate limiting on API endpoints
- Secure blockchain transactions
- Encrypted data storage
- Real-time WebSocket connections
- Database query optimization
- Caching layer for predictions
- CDN for static assets
- Mobile app offline capabilities
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Philippine Atmospheric, Geophysical and Astronomical Services Administration (PAGASA)
- Local Government Units (LGUs)
- Disaster response organizations
- Open-source community
Built for SDG 11: Sustainable Cities and Communities
Transforming flood disaster response through technology and transparency.