1 of 15

IoT-React-App

MERN Stack Website

2 of 15

Table of Content

  • About the Project
  • Requirements
  • System Flow
  • Main Features
  • React Redux Store and Data Models
  • Other Functionalities
  • Future Implementations
  • Challenges

​

​

​

3 of 15

About the Project

  • IoT Web App is designed and developed to control IoT Home Appliances devices.
  • The website is developed using MERN Stack development.
    • Python Scripts are developed to mimic IoT sensors and gateways

​

4 of 15

Requirements

  • NPM (Node and React Modules)
  • MongoDB Database
  • Python
  • Kafka Message Broker
  • MQTT Broker

5 of 15

System Flow

  1. Sensors communicate with Gateway via MQTT Broker.
  2. Gateway connects that data and forward it to server via Kafka message broker
  3. Node App transfer those information to database.
  4. React Web App requests data to Node API and displays it.

6 of 15

Main Features

  • Login

Authentication is required to access features of the react app.

The app will be redirected to login if authentication is not detected by the app.

​

Both Username and password is required. On click of login, request will be sent to server via REST POST method. Node App will confirm login authentication and send response with JWT token.

​

JWT token is required to make any other API requests.

7 of 15

Main Features

  • Home Page

Landing Page once user is authorized.

​

Displays all IoT Projects available so far.

​

8 of 15

Main Features

  • Control Light Project

Requests data from the Node Backend App.

Orange border represents lights on that room is off. Green border represents lights on that room is on.

On click of Turn on and off buttons, request will be forwarded to the node app. Backend node app will then forward that request to sensors via gateway.

Any changes made in sensor will be forwarded back to node app ,saved to database and displayed on react app.

9 of 15

Main Features

  • Control Garden Water Pump

Requests data from the Node Backend App.

On click on Water the Garden button, request will be forwarded to the node app. Backend node app will then forward that request to sensors via gateway.

Any changes made in sensor will be forwarded back to node app ,saved to database and displayed on react app.

10 of 15

React Redux Store

11 of 15

Data Models

sensor_lists

users

light_switch_sensors

garden_sensors

12 of 15

Other Functionalities

  • Security
    • Encrypted message transaction from Sensor scripts to gateways.
    • CORS controls to restrict access of APIs
    • User Authentication for database and website
    • JWT Authentication for API access control
  • Exception Handling
    • Error Boundaries
    • Try…Catch Exception Handling
  • Accessibility
    • Low (Everything is required to be hosted on local server, can only be accessed if connected to local Wi-Fi network)
  • User Friendly
    • Simple Login to authenticate and easy to navigate different projects.

​

13 of 15

Future Implementation

  • Logs to watch user interactions
  • IoT Projects for Home Security
  • SSL to secure Website and Kafka connections
  • Graphs and Charts to display historic data.

14 of 15

Challenges

  • Ensuring security of the data
  • Kafka Deployment on Windows (not recommended)
  • Data transfer between server and IoT Acting Scripts.
  • Connect Real IoT Sensors instead of using acting scripts.

​

​

15 of 15

Thank You

  • Thank you very much.
  • If You have any questions or curious to learn more, contact me on sshah1885@conestogac.on.ca or +1 705 465 2648.

​