Skip to content

Decentralized smart air purification and hyperlocal monitoring system designed for Delhi NCR. It uses IoT sensors, AI-driven analytics, and real-time dashboards to combat air pollution.

License

Notifications You must be signed in to change notification settings

Saurabhtbj1201/AirNexa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirNexa: Clean Air, Smarter Delhi NCR

AirNexa is a decentralized smart air purification and hyperlocal monitoring system designed for Delhi NCR. It uses IoT sensors, AI-driven analytics, and real-time dashboards to combat air pollution through low-cost, localized solutions for homes, schools, buses, and communities.

Features

  • Real-Time Monitoring: Continuous air quality data from IoT sensors measuring PM2.5, PM10, CO, NOx, SOx, VOCs, temperature, humidity, and more.
  • AI-Driven Purification: Smart air purifiers that adapt based on sensor data and environmental conditions.
  • Interactive Dashboard: Web-based dashboard with live metrics, trends, pollutant composition, and device status.
  • Map Integration: Leaflet-based map showing device locations and AQI heatmaps.
  • Auto-Data Generation: Simulated data generation for testing and demonstration.
  • Socket.IO Updates: Real-time updates via WebSockets for live data refresh.

Tech Stack

  • Frontend: React, Chart.js, Leaflet, Socket.IO Client
  • Backend: Node.js, Express, Socket.IO
  • Database: MongoDB with Mongoose
  • Deployment: Docker-ready, environment-based configuration

Installation

  1. Clone the Repository:

    git clone https://github.com/Saurabhtbj1201/AirNexa.git
    cd airnexa
  2. Install Dependencies:

    • Backend: cd server && npm install
    • Frontend: cd client && npm install
  3. Environment Setup:

    • Copy .env files and configure:
      • server/.env: Set MONGODB_URI, PORT=4000, CORS_ORIGIN=http://localhost:5173
      • Ensure MongoDB is running locally or via cloud (e.g., MongoDB Atlas).
  4. Seed Database:

    cd server && npm run seed
  5. Run the Application:

    • Backend: cd server && npm start
    • Frontend: cd client && npm run dev
    • Access at http://localhost:5173

Usage

  • Home Page: Overview of the system, pollution sources, and interactive map.
  • Dashboard: Real-time metrics, charts, and device management.
  • API Endpoints: See below for available APIs.

API Endpoints

Device Management

  • POST /api/devices/register: Register a new device.
  • GET /api/devices: List all devices.
  • GET /api/devices/status: Get device statuses with locations.

Readings

  • POST /api/readings: Ingest sensor readings.
  • GET /api/aqi/live: Get live AQI averages.
  • GET /api/stats/trends: Get AQI trends (last 24h).
  • GET /api/stats/composition: Get pollutant composition averages.
  • GET /api/stats/comparison: Compare AQI before/after purification.
  • GET /api/stats/heatmap: Get heatmap data for devices.
  • GET /api/stats/summary: Get summary stats (devices, online, avg AQI).
  • GET /api/stats/total-readings: Get total readings in last 24h.
  • POST /api/generate-data: Generate random sample data (for testing).

WebSocket Events

  • reading:new: Emitted on new readings for real-time updates.

Project Structure

airnexa/
├── client/          # React frontend
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   └── services/
│   └── public/
├── server/          # Node.js backend
│   ├── src/
│   │   ├── models/
│   │   ├── routes/
│   │   └── scripts/
│   └── config/
├── README.md        # This file
└── package.json     # Root scripts

Contributing

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature-name.
  3. Commit changes: git commit -m 'Add feature'.
  4. Push to branch: git push origin feature-name.
  5. Open a pull request.

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License.

👨‍💻 Developer

© Made with ❤️ by Saurabh Kumar. All Rights Reserved 2025

Saurabh Profile GitHub Follow

🔗 Connect With Me

LinkedIn Twitter Instagram Facebook Portfolio WhatsApp


Made with ❤️ by Saurabh Kumar
⭐ Star this repo if you find it helpful!

Repo Views


💝 If you like this project, please give it a ⭐ and share it with others!

Happy Coding! 🚀

About

Decentralized smart air purification and hyperlocal monitoring system designed for Delhi NCR. It uses IoT sensors, AI-driven analytics, and real-time dashboards to combat air pollution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published