Skip to content

valeriatoneva/iot-data-monitoring-system

Repository files navigation

IoT Data Monitoring System

Introduction

The IoT Data Monitoring System is designed to collect, process, and visualize data from various IoT sensors. This system is capable of handling large streams of data in real-time and provides a user-friendly dashboard for monitoring and alert notifications.

Features

  • Real-time data ingestion from IoT sensors
  • Data processing and storage using MongoDB
  • Real-time alerting based on predefined sensor thresholds
  • User authentication and management
  • Dashboard for data visualization and alert monitoring

System Architecture

The IoT Data Monitoring System is architected using a microservices approach for the backend and microfrontends for the frontend, ensuring scalability, maintainability, and a separation of concerns across different aspects of the system.

Backend Architecture

Our backend is composed of two primary microservices:

  1. Data Ingestion Service: Responsible for handling real-time data streams from IoT devices. It processes and validates incoming sensor data before storing it in the MongoDB database. This service ensures data integrity and provides an API for data retrieval.

  2. Alerting Service: Monitors the ingested data for specific conditions or thresholds. When a threshold is met, this service generates alerts and notifications. It also provides an API for managing and retrieving alerts.

Both services are designed to operate independently, with their own databases and APIs, facilitating easy updates and scaling.

Frontend Architecture

The frontend is split into several microfrontends, each serving a distinct feature of the dashboard:

  • Main Dashboard: Serves as the primary interface for users, displaying real-time data and alerts.
  • Settings: Allows users to configure various parameters and settings for the IoT devices and alert conditions.
  • Other Feature-Specific UIs: Additional microfrontends can be developed and integrated as needed, without impacting the rest of the frontend ecosystem.

This architecture is built to be modular, allowing for features to be updated or added with minimal disruption.

Communication

The microservices and microfrontends communicate over HTTP/HTTPS protocols. The backend services expose RESTful APIs that the frontend consumes to display data and interact with the backend.

Containerization

The entire system is containerized using Docker, which simplifies deployment and provides a consistent environment for development, testing, and production.

Docker Compose orchestrates the multi-container setup, ensuring that each service can be launched with a single command, maintaining the necessary inter-service links.

Development and Build Process

We use Lerna to manage multiple JavaScript packages in the same repository, streamlining the development process of our microservices and microfrontends.

Webpack compiles and bundles the frontend code, optimizing for performance and ensuring compatibility across different browsers and environments.

Prerequisites

  • Node.js
  • MongoDB
  • Docker (optional for containerization)

Installation

Backend

Navigate to each backend service directory and install dependencies:

cd backend/data-ingestion-service
npm install

cd backend/alerting-service
npm install

Frontend

Navigate to the frontend directory and install dependencies:

cd frontend/main
npm install

Running the Application

Backend Services

# Data Ingestion Service
cd backend/data-ingestion-service
npm start

# Alerting Service
cd backend/alerting-service
npm start

Frontend

# Main Dashboard
cd frontend/main
npm start

Access the dashboard at http://localhost:3000.

Conclusion and Next Steps

This IoT Data Monitoring System represents an ongoing project with core functionalities for real-time data handling and visualization. The system is designed with best practices and is built to be scalable, modular, and easy to maintain.

Current State

The current version of the system is in a functional state, with backend services ready to process and store incoming sensor data, and a frontend dashboard to visualize data and alerts. It's designed to be a starting point for a comprehensive IoT data monitoring platform.

Future Enhancements

Future enhancements may include:

  • Expanding the data processing capabilities to handle more complex analytics.
  • Enhancing the alerting mechanism with machine learning to predict anomalies.
  • Improving the user interface for a more interactive experience.
  • Integrating additional IoT protocols for broader device compatibility.

Evaluation and Feedback

Your expertise and feedback are invaluable to the continued development and improvement of this project. Whether it's code reviews, architecture optimization, feature suggestions, or potential collaboration, your input is highly appreciated.

Feel free to explore the system, run it locally, and delve into the code. Any feedback that can help improve the project or address potential gaps is welcome.

Licensing

This project is open-source and is provided under the MIT License. You are free to fork, modify, and use the code in accordance with the license.

Thank you for your interest in the IoT Data Monitoring System. I look forward to your insights and contributions to this project.


For more information on how to get started, or if you have any questions, please reach out.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published