FlowState is a groundwater resource management system designed to help communities, researchers, and policymakers monitor, analyze, and manage water resources effectively. It integrates machine learning models with real-time data visualization, offering tailored dashboards for different user roles.
- 📊 Researchers Dashboard – Detailed analytics, trends, and exportable data.
- 🏛️ Policymakers Dashboard – High-level summaries, alerts, and decision insights.
- 🌍 Location Mapping – Interactive map to track water levels and quality across regions.
- 🤖 Machine Learning Integration – Predict water quality using trained
.kerasand.pklmodels. - 🔔 Alerts System – Real-time notifications for water scarcity or contamination risks.
- 👤 User Management – Role-based access (Researchers, Policymakers, Admins).
FlowState/
│
├─ backend/ # FastAPI backend
│ ├─ app/
│ │ ├─ main.py
│ │ ├─ database.py
│ │ ├─ models.py
│ │ ├─ schemas.py
│ │ ├─ auth.py
│ │ ├─ routes/
│ │ │ ├─ users.py
│ │ │ ├─ locations.py
│ │ │ ├─ water_data.py
│ │ │ └─ ml_predict.py
│ │ └─ utils.py
│ ├─ models/ # Trained ML models
│ │ ├─ groundwater_model.keras
│ │ └─ scaler.pkl
│ ├─ requirements.txt
│ └─ .env
│
├─ frontend/ # React frontend (UI)
│ ├─ src/
│ │ ├─ components/
│ │ ├─ pages/
│ │ └─ services/
│ └─ package.json
│
├─ guidelines.md # Development and design rules
├─ README.md # Project overview
└─ CONTRIBUTING.md # Contribution guidelines (optional)
Frontend: React, Axios, TailwindCSS (or your chosen UI lib) Backend: FastAPI, SQLAlchemy, JWT Auth Database: PostgreSQL / MySQL / SQLite (configurable) ML Models: TensorFlow/Keras (.keras), Scikit-learn (.pkl) Deployment: Docker, Nginx, or cloud platforms (AWS/GCP/Azure)
git clone https://github.com/your-username/flowstate.git
cd flowstatecd backend
pip install -r requirements.txt
uvicorn app.main:app --reloadBackend runs at: http://127.0.0.1:8000
cd frontend
npm install
npm startFrontend runs at: http://localhost:3000
Create a .env file inside backend/ with:
DATABASE_URL=postgresql://user:password@localhost:5432/flowstate
SECRET_KEY=your-secret-key
| Method | Endpoint | Description |
|---|---|---|
| POST | /users/register |
Register new user |
| POST | /users/login |
Authenticate user & get JWT |
| GET | /locations |
Get all locations |
| POST | /water |
Add new water data |
| POST | /ml/predict |
Predict water quality (ML model) |
- Researchers: Analytics charts, historical trends, detailed reports.
- Policymakers: High-level KPIs, alerts, and actionable insights.
Please read guidelines.md before contributing. It covers coding style, UI/UX rules, and system architecture.
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Commit with descriptive messages
- Open a Pull Request
MIT License – feel free to use, modify, and distribute with attribution.
FlowState aims to become a scalable water resource management tool that bridges the gap between scientific research and policy-making, ensuring sustainable groundwater use for future generations.