Water Price Management is a web application developed for the Indore Municipal Corporation to optimize water supply and pricing. The project aims to reduce expenses by simulating and analyzing key parameters such as pipeline cost, distance, and temperature, which directly and indirectly affect water distribution costs.
- Price Optimization: Simulates parameters to help set optimized water prices within budget constraints.
- Heatmap Visualization: Displays complaint density for each area, aiding in targeted management.
- User Interface: Allows administrators to visualize data and adjust parameters in real-time.
- 📊 Predictive Analytics - ML-powered water pricing and supply forecasting
- 📝 Complaint Management - Multi-channel user feedback system
- 🗺️ Regional Analytics - Distribution pattern analysis and insights
- ⚡ Resource Optimization - Data-driven allocation recommendations
| Layer | Technology |
|---|---|
| 🧠 Machine Learning | XGBoost + scikit-learn |
| ⚙️ Backend | Node.js + Express + MongoDB |
| 💻 Web Frontend | React + Vite + Tailwind CSS |
| 📱 Mobile | Flutter (iOS & Android) |
| 🔧 Model Serving | Flask / FastAPI |
water-price-management/
│
├── 🧠 XGBoost/ # ML training pipeline
├── ⚙️ server/ # Express REST API
├── 💻 client/ # React web application
└── 📱 water_project/ # Flutter mobile app
┌─────────────┐
│ Mobile │──┐
│ App │ │
└─────────────┘ │
├──► ┌─────────────┐ ┌──────────────┐
┌─────────────┐ │ │ Express │ │ │
│ Web │──┼───►│ API │─────►│ MongoDB │
│ Frontend │ │ │ Server │ │ │
└─────────────┘ │ └─────────────┘ └──────────────┘
│ │
┌─────────────┐ │ │
│ Admin │──┘ ▼
│ Portal │ ┌──────────────┐
└─────────────┘ │ ML Model │
│ Service │
└──────────────┘
- 🐍 Python 3.8 or higher
- 📦 Node.js 16 or higher
- 🎯 Flutter 3.0 or higher
- 🗃️ MongoDB (Local or Atlas)
git clone <repository-url>
cd water-price-managementpython -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1pip install -r XGBoost/requirements.txt
cd server && npm install
cd ../client && npm installXGBoost/
├── 📄 app.py # Training script
├── 📊 Training_Data_1.xlsx # Sample dataset
├── 📋 requirements.txt # Dependencies
└── 🎯 xgboost_model.pkl # Trained model (generated)
The ML pipeline uses XGBoost with automated preprocessing for optimal predictions.
- pandas (≥1.5.0)
- scikit-learn (≥1.2.0)
- xgboost (≥1.7.0)
- joblib (≥1.2.0)
- numpy (≥1.23.0)
- openpyxl (≥3.0.0)
- 📥 Prepare your dataset in Excel format
- ✏️ Update dataset path in
app.py ▶️ Run training- ✅ Model artifact generated
- Trained Model:
xgboost_model.pkl - Console Reports: Sample predictions & feature importance
Deploy as a microservice for production-ready inference.
- Flask - Lightweight and simple
- FastAPI - Modern, fast, with auto documentation
- Docker - Containerized deployment
python XGBoost/inference_api.pyserver/
Express.js REST API providing authentication, complaint management, and analytics.
| Method | Endpoint | Description | 🔐 Auth |
|---|---|---|---|
| 📝 POST | /api/auth/signup |
User registration | ❌ |
| 🔑 POST | /api/auth/login |
User authentication | ❌ |
| 📮 POST | /api/complaints/submit |
Submit complaint + image | ✅ |
| 📊 GET | /api/complaints/regions |
Regional statistics | ✅ |
| 🗺️ GET | /parameters/:subRegion |
Regional parameters | ✅ |
Environment Variables (.env in server/)
PORT=5000
MONGODB_URI=mongodb://localhost:27017/water_management
JWT_SECRET=your_secret_key_here
ML_API_URL=http://localhost:5001cd server
npm install
npm startclient/
Modern React application with beautiful UI and responsive design.
- 🔐 Authentication - Secure user login/signup
- 👤 Profile Management - User dashboard
- 🗺️ Regional Visualization - Interactive water supply maps
- 📝 Complaint System - Easy submission with image upload
- 📊 Real-time Dashboards - Live data insights
- 📱 Responsive Design - Works on all devices
Environment Variables (.env in client/)
VITE_API_BASE_URL=http://localhost:5000/apicd client
npm install
npm run devnpm run buildwater_project/
Cross-platform mobile solution for iOS and Android.
cd water_project
flutter pub get
flutter runWe welcome contributions! Here's how to get started:
- 🍴 Fork the repository
- 🌿 Create feature branch (
feature/improvement) - ✏️ Commit your changes
- 📤 Push to your branch
- 🎯 Open a Pull Request
- 🐍 Python: Follow PEP 8
- 📜 JavaScript: Use ESLint config
- 🎯 Dart/Flutter: Follow official style guide
- ✅ Testing: Write unit tests for features
- 📚 Documentation: Update docs for changes
