Smart Water Management Platform for Solapur
IoT Sensor Telemetry • Citizen Complaints • Automated Ticketing • Equity Tracking
JalSetu is a comprehensive, real-time water management platform designed to monitor water distribution, handle citizen complaints, and ensure equitable water supply across wards.
It seamlessly bridges the gap between on-ground IoT sensors, citizen reporting, and municipal operators by unifying data into a single, intelligent dashboard.
- 📡 Real-Time IoT Telemetry: MQTT-driven simulator for continuous sensor and complaint streams.
- 🗺️ Live Operator Dashboard: Interactive water network map with sensor and complaint markers using MapLibre.
- 📱 Citizen Complaint Portal: Geo-enabled complaint reporting form with optional photo support.
- 🎟️ Automated Ticketing: Intelligent ticket creation with priority and SLA context.
- ⚖️ Ward Equity Monitoring: Analytics for service fairness and pressure distribution.
- ⚡ Live Event System: WebSocket connectivity for real-time alerts, sensor anomalies, and dashboard updates.
- 🎭 Hackathon Demo Controller: Full end-to-end storytelling flow from complaint to resolution.
| Category | Technologies |
|---|---|
| Frontend | React, React Router, Axios, Recharts, MapLibre, Socket.IO Client |
| Backend | Node.js, Express, Socket.IO, MQTT |
| Database | PostgreSQL, PostGIS |
| Simulation | Node.js, MQTT, Axios |
graph TD;
A[Citizen / Simulator] -->|Submits Complaint| B(Backend API);
S[IoT Sensors / Simulator] -->|MQTT| C(MQTT Broker);
C -->|Sensor Data| B;
B -->|Reads/Writes| D[(PostgreSQL + PostGIS)];
B -->|Calculates Equity & Priority| B;
B -->|Socket.IO| E[React Dashboard];
E -->|Visualizes Data| Operator[Municipal Operator];
jalsetu/
├── backend/ # Node.js Express API & MQTT Client
│ ├── controllers/
│ ├── database/ # schema.sql (PostgreSQL + PostGIS)
│ ├── routes/
│ └── services/
├── frontend/ # React Operator Dashboard
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ └── services/
└── simulator/ # IoT Sensor & Complaint Event Generator
- Node.js (v16 or newer) & npm
- PostgreSQL (v12 or newer) with PostGIS extension enabled
- MQTT Broker (e.g., Eclipse Mosquitto)
- Create a PostgreSQL database named
jalsetu. - Enable the PostGIS extension in your database:
CREATE EXTENSION postgis;
- Execute the schema script:
psql -d jalsetu -f backend/database/schema.sql
Create a .env file in the backend/ directory:
DATABASE_URL=postgres://user:password@localhost:5432/jalsetu
PORT=5000
MQTT_BROKER=mqtt://localhost:1883
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token(Optional) Frontend .env in frontend/:
REACT_APP_API=http://localhost:5000/api
REACT_APP_WS_URL=http://localhost:5000(Optional) Simulator .env in simulator/:
MQTT_BROKER=mqtt://localhost:1883You need to start all three services in separate terminal instances.
Backend Server
cd backend
npm install
npm startAPI running at http://localhost:5000/api
Frontend Dashboard
cd frontend
npm install
npm startReact app running at http://localhost:3000
IoT Simulator
cd simulator
npm install
npm start| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
System health check |
GET/POST |
/api/complaints |
Fetch or submit citizen complaints |
GET |
/api/tickets |
Retrieve active work tickets |
GET |
/api/sensors |
Fetch current sensor statuses |
GET |
/api/analytics/equity |
Get ward equity metrics |
POST |
/api/demo/start |
Trigger the hackathon demo sequence |
The dashboard listens for real-time updates via Socket.IO:
- Alerts:
alert,critical_alert,sensor_anomaly - Data Updates:
sensor_data,new_complaint - Ticketing:
ticket_created,ticket_updated - Demo Flow:
demo_event,demo_started,demo_step_result,demo_completed
The built-in demo mode is tailored for presentations and hackathons, illustrating a complete automated workflow:
- Intake: Citizen complaint is submitted via the simulator.
- Ticketing: Automatic creation and prioritization of the work ticket.
- Correlation: System correlates complaint with nearby IoT sensor data.
- Assignment: Junior Engineer (JE) is assigned.
- Action: Field repair initiated.
- Verification: AI photo verification of the resolved issue (mocked).
- Resolution: Ticket closed and equity scores updated dynamically.
- The WhatsApp/Twilio integration is currently mocked for demo purposes.
- Geographic functionalities (wards, sensors, leak events) rely heavily on PostGIS.
- MQTT is the live transport used by the simulator and backend services.
- No license file is currently included in the repository.