Skip to content

Latest commit

ย 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ง Water Price Management System

Project Overview

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.

Key Features

  • 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.

Project objective screenshot


๐ŸŽฏ Key Features

  • ๐Ÿ“Š 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

๐Ÿ› ๏ธ Technology Stack

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

๐Ÿ—๏ธ Architecture

water-price-management/
โ”‚
โ”œโ”€โ”€ ๐Ÿง  XGBoost/              # ML training pipeline
โ”œโ”€โ”€ โš™๏ธ server/               # Express REST API
โ”œโ”€โ”€ ๐Ÿ’ป client/               # React web application
โ””โ”€โ”€ ๐Ÿ“ฑ water_project/        # Flutter mobile app

๐Ÿ”„ System Flow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Mobile    โ”‚โ”€โ”€โ”
โ”‚     App     โ”‚  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
                 โ”œโ”€โ”€โ–บ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚    โ”‚   Express   โ”‚      โ”‚              โ”‚
โ”‚     Web     โ”‚โ”€โ”€โ”ผโ”€โ”€โ”€โ–บโ”‚     API     โ”‚โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   MongoDB    โ”‚
โ”‚   Frontend  โ”‚  โ”‚    โ”‚   Server    โ”‚      โ”‚              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ”‚           โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚           โ”‚
โ”‚   Admin     โ”‚โ”€โ”€โ”˜           โ–ผ
โ”‚   Portal    โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚  ML Model    โ”‚
                        โ”‚   Service    โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

  • ๐Ÿ Python 3.8 or higher
  • ๐Ÿ“ฆ Node.js 16 or higher
  • ๐ŸŽฏ Flutter 3.0 or higher
  • ๐Ÿ—ƒ๏ธ MongoDB (Local or Atlas)

โšก Quick Setup

1๏ธโƒฃ Clone Repository

git clone <repository-url>
cd water-price-management

2๏ธโƒฃ Python Environment

python -m venv .venv
source .venv/bin/activate  # Windows: .\.venv\Scripts\Activate.ps1

3๏ธโƒฃ Install Dependencies

pip install -r XGBoost/requirements.txt
cd server && npm install
cd ../client && npm install

๐Ÿค– Machine Learning Pipeline

๐Ÿ“‚ Directory Structure

XGBoost/
โ”œโ”€โ”€ ๐Ÿ“„ app.py                    # Training script
โ”œโ”€โ”€ ๐Ÿ“Š Training_Data_1.xlsx      # Sample dataset
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt          # Dependencies
โ””โ”€โ”€ ๐ŸŽฏ xgboost_model.pkl        # Trained model (generated)

๐ŸŽ“ Training Process

The ML pipeline uses XGBoost with automated preprocessing for optimal predictions.

๐Ÿ“ฆ Required Dependencies

  • 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)

๐Ÿ”ง Training Steps

  1. ๐Ÿ“ฅ Prepare your dataset in Excel format
  2. โœ๏ธ Update dataset path in app.py
  3. โ–ถ๏ธ Run training
  4. โœ… Model artifact generated

๐Ÿ“ค Output

  • Trained Model: xgboost_model.pkl
  • Console Reports: Sample predictions & feature importance

๐ŸŒ Model Serving

Deploy as a microservice for production-ready inference.

๐ŸŽฏ Deployment Options

  • Flask - Lightweight and simple
  • FastAPI - Modern, fast, with auto documentation
  • Docker - Containerized deployment

๐Ÿšฆ Starting Inference Server

python XGBoost/inference_api.py

๐Ÿ”Œ Backend API

๐Ÿ“ Location

server/

๐ŸŽฏ Core Capabilities

Express.js REST API providing authentication, complaint management, and analytics.

๐Ÿ›ฃ๏ธ API Endpoints

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 โœ…

โš™๏ธ Configuration

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:5001

โ–ถ๏ธ Starting Server

cd server
npm install
npm start

๐ŸŒ Web Frontend

๐Ÿ“ Location

client/

Modern React application with beautiful UI and responsive design.

โœจ Key Features

  • ๐Ÿ” 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

โš™๏ธ Configuration

Environment Variables (.env in client/)

VITE_API_BASE_URL=http://localhost:5000/api

๐Ÿš€ Development

cd client
npm install
npm run dev

๐Ÿ“ฆ Production Build

npm run build

๐Ÿ“ฑ Mobile Application

๐Ÿ“ Location

water_project/

Cross-platform mobile solution for iOS and Android.

๐Ÿ—๏ธ Building

cd water_project
flutter pub get
flutter run

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

๐Ÿ”„ Workflow

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create feature branch (feature/improvement)
  3. โœ๏ธ Commit your changes
  4. ๐Ÿ“ค Push to your branch
  5. ๐ŸŽฏ Open a Pull Request

๐Ÿ“ Code Standards

  • ๐Ÿ 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

๐ŸŒŸ Project Status

Status Version License

Last Updated: October 2025


Made with ๐Ÿ’™ for better water management

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages