NammaLakes, an IoT-powered distributed system designed to monitor the health and status of urban lakes. As urbanization grows, many freshwater bodies suffer from pollution, mismanagement, and neglect. NammaLakes takes a step toward smarter, data-driven lake conservation and management.
At its core, this system leverages a network of IoT devices and intelligent software to monitor lake parameters in real-time — from water quality to sensor-driven alerts. This allows stakeholders and authorities to take timely action, backed by accurate data and reliable insights.
The system provides:
- Real-time Monitoring: Continuous collection of water quality parameters
- Intelligent Analytics: ML-powered anomaly detection (Isolation Forest algorithm)
- Interactive Dashboard: User-friendly visualization of complex environmental data
- Automated Alerts: Instant notifications when parameters exceed safe thresholds
- Scalable Architecture: Built to monitor multiple water bodies simultaneously
Traditional approaches to lake monitoring have significant limitations:
- Delayed Response: Manual sampling causes critical delays in detecting contamination events
- Limited Data: Infrequent collection makes it impossible to identify subtle trends
- Low Visibility: Lack of centralized visualization prevents effective decision-making
- No Early Warning: Absence of automated alerts means pollution events often go unnoticed
The NammaLakes system consists of three primary layers:
- Hardware: ESP32 microcontrollers and Raspberry Pi devices
- Sensors: pH, turbidity, temperature, dissolved oxygen, conductivity
- Edge Processing: Initial data filtering and preprocessing
- Communication: MQTT protocol for efficient, lightweight data transmission
- Backend APIs: FastAPI (Python) for robust, high-performance data handling
- Databases:
- PostgreSQL for structured data (sensor metadata, users, alerts)
- SQLite for development/testing
- Message Broker: RabbitMQ for reliable communication between components
- Analytics: Machine learning models for identifying abnormal readings
- Frontend: React-based responsive dashboard
- Data Visualization: Interactive charts for parameter tracking
- Geospatial Interface: Map-based sensor location overview
- Documentation: Comprehensive guides with Docusaurus
Component | Technologies |
---|---|
Frontend | ReactJS, TypeScript, Tailwind CSS |
Backend | FastAPI (Python) |
Database | PostgreSQL |
IoT Communication | MQTT (Mosquitto broker) |
Message Queue | RabbitMQ |
Containerization | Docker |
Deployment | AWS |
Package Management | Poetry |
Logging | Loguru |
Documentation | Docusaurus |
This isn’t just a data dashboard. The system also uses trained machine learning models, such as the Isolation Forest, to detect anomalies in lake behavior — spotting irregular patterns in temperature, turbidity, or sensor activity.
Microservices are provided to allow alert messages to be sent via E-Mails, Whatsapp and Telegram to users
At a time when sustainability matters more than ever, NammaLakes aims to bridge the gap between smart city tech and environmental conservation. By creating a scalable, open system for lake monitoring, we hope to empower local communities, researchers, and administrators to keep our lakes healthy and thriving.
This is more than a tech stack — it’s a collective step toward ecological responsibility, one data point at a time.
Whether you’re a developer, environmentalist, or curious citizen, we welcome contributions, feedback, and ideas. Dive into the code, check out the docs, or spin up your own deployment. There’s a lot to build — and a lot more to protect.
Prerequisites
- Python 3.9+
- Node.js 16+
- Docker and Docker Compose
- Poetry (Python dependency management)
To get started locally:
git clone https://github.com/NammaLakes/nammalakes.git
cd nammalakes
Install Python packages:
cd backend
poetry install
Spin up containers (RabbitMQ, DB, API):
sudo docker compose up --build
For the dashboard:
cd dashboard
npm install
npm run dev
And for documentation:
cd docs
npm install
npm run start
The project is organized into the following core folders:
NammaLakes/
├── backend/ # FastAPI backend service
│ ├── data/ # Data storage and logs
│ ├── lakewatch/ # Core application code
│ │ ├── db/ # Database models and DAOs
│ │ ├── services/ # External service integrations
│ │ └── web/ # API endpoints and server config
│ ├── tests/ # Backend test suite
│ └── deploy/ # Deployment configurations
├── dashboard/ # React frontend application
│ ├── src/ # Source code
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities
│ │ └── pages/ # Page components
├── docs/ # Documentation site
│ └── docs/ # Markdown documentation files
├── node/ # IoT sensor node service
│ ├── node/ # Node application code
│ │ ├── read/ # GPIO sensor reading functionality
│ │ ├── transmit/ # RabbitMQ transmission logic
│ │ └── logger/ # Logging configuration
│ └── tests/ # Node test suite
└── .github/ # GitHub configuration files
└── profile/ # Organization profile
We welcome contributions from developers, researchers, and curious minds alike.
To contribute:
- Fork this repository.
- Create a new branch:
git checkout -b your-feature-branch
- Make your changes and commit:
git commit -m "Add your message here"
- Push to your fork and open a Pull Request:
git push origin your-feature-branch
We review PRs regularly and are happy to collaborate.
For questions, collaboration, or demo access, reach out at:
[email protected]
Or open an issue on this repository.