Skip to content

Byte-Builders-28/Aquabytes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AquaBytes Logo

πŸ’§ AquaBytes

Universal Rainwater Harvesting Portal

Check feasibility β€’ Explore analytics β€’ Monitor projects

Live Website YouTube Demo SIH Selected Ministry of Jal Shakti


Problem Statement by: Ministry of Jal Shakti (MoJS) Β· Central Ground Water Board (CGWB)
Category: Software Β· Theme: Smart Automation


πŸ“Œ Overview

AquaBytes is a SIH-selected full-stack web & mobile application that empowers citizens and communities to assess Rooftop Rainwater Harvesting (RTRWH) and Artificial Recharge (AR) potential β€” right from their smartphone or browser.

By entering simple inputs like location, roof area, population, and budget, users get personalized, GIS-powered feasibility reports with dimensions for recharge structures, cost estimates, and real-time water risk intelligence.

The platform pairs a live IoT sensor network (ESP32-based) with ML-driven water quality analysis to give users an end-to-end picture of their water situation β€” from the sky to the tank.


πŸ“Έ Screenshots

Home Screen Tools Available
Home Feasibility
Water Quality / WQI IOT in Action
WQI WaterHub
App in Action Possitive Response as Result
App1 App2

🎯 Problem Statement

Designing and development of an application for on-spot assessment of Rooftop Rainwater Harvesting (RTRWH) and Artificial Recharge potential and size of the RTRWH and AR structures.

Despite CGWB publishing detailed manuals on RTRWH, no user-friendly digital platform existed for individuals to directly assess their harvesting potential. AquaBytes fills that gap.


✨ Key Features

πŸ—οΈ Feasibility Calculator

Enter your location, roof area, number of dwellers, available open space, and budget to get:

  • Estimated rainwater collection volume
  • Recommended RTRWH / Artificial Recharge structure type
  • Dimensions of recharge pits, trenches, and shafts
  • Cost estimation and cost-benefit analysis
  • Principal aquifer information for the area
  • Depth to groundwater level
  • Local rainfall & runoff data

πŸ’‘ Water Hub β€” Smart Water Risk Intelligence

Tells you how efficiently to use your stored water based on upcoming rain:

  • Current tank level and capacity
  • Household consumption vs. need
  • 7-day rainfall forecast (live weather API)
  • Real-time sensor data (pH, TDS)
  • ML-predicted water risk score & actionable recommendations

πŸ”¬ Water Quality Check (Live Sensor + Manual)

Analyze water quality via live IoT sensor feed or manual input:

  • pH, TDS, Turbidity, Temperature, Dissolved Oxygen
  • Water Quality Index (WQI) calculation with safety category
  • Microbial risk classification (ML model)
  • Heavy metal risk classification (ML model)
  • Irrigation suitability verdict
  • Historical readings and alert management

⚠️ Risk Predictor

Uses sensor history and system data to predict:

  • Maintenance risk level
  • Contamination probability
  • Water scarcity forecast

πŸ€– Elsa β€” AI Chatbot

Powered by Google Gemini, Elsa is a domain-specific assistant:

  • Answers questions about water harvesting, recharge, and feasibility
  • Remembers your latest survey for personalized advice
  • Responds in the user's native language automatically

πŸ“Š Analytics Dashboard (Web)

  • Regional rainfall trends with interactive charts
  • India groundwater map with district-level data
  • Historical water quality trends per device

πŸ—ΊοΈ Resources & Downloads (Web)

  • CGWB manuals and scientific reports
  • Practical guides on RTRWH
  • Web tools: Feasibility Calculator, Risk Predictor, Water Quality Check

🌐 Multi-Language Support

AquaBytes supports 23 Indian languages out of the box, ensuring accessibility across the country:

English Hindi Bengali Assamese Gujarati Kannada Kashmiri Konkani
Maithili Malayalam Manipuri Marathi Nepali Odia Punjabi Sanskrit
Santali Sindhi Tamil Telugu Urdu Bodo Dogri


πŸ”Œ IoT Integration β€” Live Sensor Hardware

The ESP32-based sensor node measures water quality directly from the harvested tank and pushes data to the cloud in real time.

Sensor Parameter Pin
Analog pH Probe pH (0–14) GPIO 34
TDS Sensor Total Dissolved Solids (ppm) GPIO 35
Turbidity Sensor Turbidity (NTU) GPIO 32
(Configured) Dissolved Oxygen β€”

Data flow: ESP32 β†’ Wi-Fi β†’ FastAPI Backend β†’ ML Prediction β†’ Mobile / Web App


πŸ—οΈ Architecture

AquaBytes
β”œβ”€β”€ πŸ“± Mobile App (React Native / Expo Router)
β”‚   β”œβ”€β”€ Feasibility Assessment
β”‚   β”œβ”€β”€ Water Quality Monitor (Live + Manual)
β”‚   β”œβ”€β”€ Water Hub (Risk Intelligence)
β”‚   β”œβ”€β”€ History & Alerts
β”‚   └── Elsa AI Chatbot (Gemini)
β”‚
β”œβ”€β”€ 🌐 Website (HTML/CSS/JS)
β”‚   β”œβ”€β”€ Landing Page & Info
β”‚   β”œβ”€β”€ Feasibility Calculator Tool
β”‚   β”œβ”€β”€ Water Quality Check Tool
β”‚   β”œβ”€β”€ Risk Predictor Tool
β”‚   β”œβ”€β”€ Analytics Dashboard (Charts + Map)
β”‚   └── Resources & Downloads
β”‚
β”œβ”€β”€ βš™οΈ Backend (FastAPI / Python)
β”‚   β”œβ”€β”€ /api/v1/rtwh/feasibility        β†’ RTRWH feasibility engine
β”‚   β”œβ”€β”€ /api/v1/water-quality/predict    β†’ ML water quality analysis
β”‚   β”œβ”€β”€ /api/v1/water-risk/{device}      β†’ Smart water hub risk
β”‚   β”œβ”€β”€ /api/v1/devices/{id}/history     β†’ Sensor history
β”‚   β”œβ”€β”€ /api/v1/geocode                  β†’ GIS location lookup
β”‚   └── /api/v1/alerts                   β†’ Alert management
β”‚
└── πŸ”Œ IoT Firmware (ESP32 / Arduino)
    └── pH + TDS + Turbidity β†’ Wi-Fi β†’ Cloud API

🧠 Machine Learning Models

Model Type Purpose
heavy_metal_rf.joblib Random Forest Heavy metal contamination risk
microbial_rf.joblib Random Forest Microbial contamination risk
WQI Calculator Algorithmic Water Quality Index scoring
Water Risk Model Regression + Rules Tank water sufficiency & risk
Rainfall Budget Model ML + Weather API Water budget forecasting

Training datasets: rainfall.csv, synthetic_training.csv, water_dataX.csv


πŸ› οΈ Tech Stack

Layer Technologies
Mobile App React Native, Expo Router, i18next, Gemini AI, react-native-chart-kit
Website HTML5, CSS3, Vanilla JS, Chart.js, Leaflet Maps
Backend FastAPI, Python, Pydantic, Uvicorn
ML / AI scikit-learn, NumPy, Pandas, joblib, Google Generative AI
IoT Firmware Arduino C++ (ESP32), Wi-Fi, HTTPClient
Geo / Weather GeoPy, Open-Meteo / weather API
Deployment Netlify (web), Render (backend), Expo (mobile)

πŸš€ Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Expo CLI (npm install -g expo-cli)
  • (Optional) Arduino IDE for IoT firmware

1. Backend

cd src/backend
pip install -r requirements.txt
uvicorn main:app --reload

API: http://localhost:8000 Β· Swagger docs: http://localhost:8000/docs


2. Mobile App

cd src/frontend/android_app
npm install
npx expo start

Scan the QR code with Expo Go (Android / iOS) or run on an emulator.


3. Website

Open src/frontend/website/index.html directly in a browser, or serve statically:

npx serve src/frontend/website

4. IoT Firmware

  1. Open IOT/EVS_Project.ino in Arduino IDE
  2. Set your Wi-Fi credentials (ssid, password) and point apiURL to your backend
  3. Flash to your ESP32 board
  4. The device will begin streaming sensor readings to the backend automatically

πŸ“‚ Project Structure

AquaBytes/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ IOT/
β”‚   β”‚   └── EVS_Project.ino       # ESP32 sensor firmware
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   β”œβ”€β”€ main.py               # FastAPI entry point
β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”œβ”€β”€ database.json         # Lightweight local store
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ models.py         # Pydantic data models
β”‚   β”‚   β”‚   └── routes.py         # All API endpoints
β”‚   β”‚   β”œβ”€β”€ algo/
β”‚   β”‚   β”‚   └── sim_rainwater.py  # RTRWH algorithm engine
β”‚   β”‚   β”œβ”€β”€ ml/
β”‚   β”‚   β”‚   β”œβ”€β”€ predictor.py      # WQI + risk predictor
β”‚   β”‚   β”‚   β”œβ”€β”€ water_budget_model.py
β”‚   β”‚   β”‚   β”œβ”€β”€ datasets/         # Training CSVs
β”‚   β”‚   β”‚   └── models/           # Trained .joblib models
β”‚   β”‚   └── utils/
β”‚   β”‚       β”œβ”€β”€ rainfall_engine.py
β”‚   β”‚       β”œβ”€β”€ weather.py        # Live weather forecast
β”‚   β”‚       └── location.py       # GIS geocoding
β”‚   └── frontend/
β”‚       β”œβ”€β”€ android_app/          # React Native / Expo app
β”‚       β”‚   β”œβ”€β”€ app/              # Expo Router screens
β”‚       β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚       β”‚   β”œβ”€β”€ locales/          # 23 language JSON files
β”‚       β”‚   └── utils/            # Chatbot & helpers
β”‚       β”œβ”€β”€ website/              # Static web portal
β”‚       β”‚   β”œβ”€β”€ index.html
β”‚       β”‚   β”œβ”€β”€ tools/            # Calculator, Quality, Risk tools
β”‚       β”‚   └── stat/             # Analytics (charts + map)
β”‚       └── screenshots/          # App screenshots
└── README.md

🌍 Live Links

Platform URL
🌐 Website aquabytes.netlify.app
▢️ YouTube Demo youtube.com/watch?v=g-DGNQVrjl8
βš™οΈ Backend API Docs aquabytes.onrender.com/docs

πŸ† Recognition

  • βœ… Selected at Smart India Hackathon (SIH)
  • πŸ›οΈ Organization: Ministry of Jal Shakti (MoJS)
  • πŸ”¬ Department: Central Ground Water Board (CGWB)
  • πŸ“‚ Problem Category: Software β€” Smart Automation

πŸ‘₯ Contributors

Listed in alphabetical order.


🀝 Contributing

Contributions are welcome! Please read CODE_of_CONTACT.md before submitting a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the terms in the LICENSE file.


Built with ❀️ for India's groundwater future

AquaBytes β€” Empowering every citizen to conserve, harvest, and sustain water.

Visit aquabytes.netlify.app