AI-powered Water Health Intelligence Platform | Detect water safety risks before they become public health crises.
AquaGuard combines scattered water data from multiple sourcesβadvisories, flood warnings, contamination risks, infrastructure issues, and community reportsβinto one intelligent dashboard that helps communities make informed decisions about water safety.
When a user enters a location, they receive:
- Risk Level β Low / Medium-Low / Medium / Medium-High / High
- Confidence Score β How certain the system is (0-100%)
- AI-Generated Explanation β Plain English summary of findings
- Contributing Factors β What triggered the assessment
- Community Reports β Real-time alerts from residents
- Sustainability Insights β Aligned with global water safety goals
The AI does not randomly decide risk levels.
Instead, AquaGuard follows a transparent, evidence-based approach:
- Collect Evidence β Aggregate water advisories, weather alerts, news, reports, infrastructure data
- Calculate Risk β Score and confidence metrics based on real data
- Explain Results β IBM AI generates human-readable explanations backed by evidence
This makes the system explainable, transparent, and technically sound.
Scenario: Heavy rainfall near Windsor + boil-water advisory issued + shared sewage system + multiple brown water reports
Result:
Risk Level: Medium
Confidence: 78%
Explanation: "Recent environmental indicators suggest moderate
contamination risk due to nearby flooding, shared sewage
infrastructure, and multiple community reports."
User Input (Location)
β
Backend Aggregates Data:
β’ Water advisories
β’ Weather/flood alerts
β’ News articles
β’ Community reports
β’ Infrastructure data
β
Risk Engine Calculates:
β’ Score (0-100)
β’ Confidence level
β’ Risk classification
β
IBM watsonx.ai Generates:
β’ Explanation
β’ Recommendations
β’ Summary
β
Dashboard Displays Results
| Component | Technology |
|---|---|
| Frontend | React + Vite |
| Backend | Node.js + Express |
| AI | IBM watsonx.ai (Granite models) |
| Styling | Tailwind CSS |
| Cloud | IBM Cloud |
| Factor | Score |
|---|---|
| Boil-water advisory | +50 |
| Flood warning | +20 |
| Sewage overflow risk | +15 |
| Multiple community reports | +10 |
| Score | Classification |
|---|---|
| 0β24 | Low |
| 25β39 | Medium-Low |
| 40β59 | Medium |
| 60β79 | Medium-High |
| 80β100 | High |
Primary SDG: SDG 6 β Clean Water and Sanitation
Supporting SDGs:
- π₯ SDG 3 β Good Health and Well-Being
- ποΈ SDG 9 β Industry, Innovation and Infrastructure
- ποΈ SDG 11 β Sustainable Cities and Communities
- π‘οΈ SDG 13 β Climate Action
- Node.js 18+
- IBM watsonx.ai credentials (for live AI features)
# Clone and navigate
git clone <repo-url>
cd IBMZ_KYFHS/aquaguard
# Install dependencies
cd frontend && npm install
cd ../backend && npm install
# Configure backend
cd backend
cp .env.example .env
# Edit .env with your IBM watsonx credentialsTerminal 1 β Backend:
cd aquaguard/backend
npm start
# API runs on http://localhost:4000Terminal 2 β Frontend:
cd aquaguard/frontend
npm run dev
# Dashboard runs on http://localhost:5173# IBM watsonx.ai
WATSONX_API_KEY=<your-api-key>
WATSONX_PROJECT_ID=<your-project-id>
WATSONX_BASE_URL=https://us-south.ml.cloud.ibm.com
WATSONX_MODEL_ID=<optional>
WATSONX_TIMEOUT_MS=10000
# Optional security
API_SHARED_TOKEN=<optional-token-for-post-requests>Backend:
npm start # Start API server
npm run smoke # Run smoke tests
npm run test:contract # Validate API contractsFrontend:
npm run dev # Development server
npm run build # Production build
npm run preview # Preview production build| Issue | Solution |
|---|---|
EADDRINUSE: 4000 |
Kill the process on port 4000 and retry |
| Port 5173 conflict | Stop process on 5173 and retry frontend |
Base URL: http://localhost:4000
| Endpoint | Method | Input | Output |
|---|---|---|---|
/health |
GET | β | status, service |
/risk |
GET | location |
risk, confidence, riskScore, factors |
/alerts |
GET | location (optional) |
alerts[] |
/summary |
GET | location |
risk, summary, factors |
/report |
POST | location, issueType, description |
message, report |
/statistics/overview |
GET | β | totalCompanies, uniqueCountries |
/user/companies |
GET | limit (optional) |
Company[] |
/countries |
GET | β | Country[] |
# Get risk for a location
curl -sG "http://localhost:4000/risk" --data-urlencode "location=Mumbai, MH"
# Get AI summary
curl -sG "http://localhost:4000/summary" --data-urlencode "location=Mumbai, MH"
# Report a water issue
curl -X POST "http://localhost:4000/report" \
-H "Content-Type: application/json" \
-d '{
"location": "Mumbai, MH",
"issueType": "cloudy water",
"description": "Water appears cloudy this morning."
}'GET /risk?location=Mumbai, MH
{
"location": "Mumbai, MH",
"risk": "Safe",
"confidence": 71,
"riskScore": 30,
"factors": ["flood warning", "multiple community reports"],
"alerts": [],
"reports": [],
"generatedAt": "2026-05-09T23:40:00.000Z"
}| Policy | Limit |
|---|---|
/summary rate limit |
25 req/min per IP |
/report rate limit |
15 req/min per IP |
| Optional auth guard | API_SHARED_TOKEN header if configured |
ibmz_kyfhs/
βββ aquaguard/
β βββ backend/ # Node.js + Express API
β β βββ routes/ # API endpoints
β β βββ services/ # Business logic
β β βββ lib/ # Utilities (risk engine, etc.)
β β βββ data/ # Mock & config data
β β
β βββ frontend/ # React + Vite
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ api/ # API client
β β βββ services/ # Frontend utilities
β β
β βββ index.html # Entry point
β
βββ README.md # This file