/Esp32-Hospital-Monitoring-System

My college final year project that combine Esp32 with ReactJs

Primary LanguageTypeScript

ESP32 Hospital rooms monitoring system

The Live version might not working because the Hardware probably turned off

As a project for my college degree, a react app modifying Hospital monitoing dashboard by DamascenoRafael by changing it from MQTT protocols into using Firebase Realtime Database combined with Espressif ESP32 to get Heartrate, Spo2, and Temperature. Also migrate using Next.js

Features

  • CRUD
  • Realtime monitor
  • Downloadable readings history with timestamp (.xlsx)
  • Color coded notification in card header

Color Reference for Card's Heading

Color Hex
Danger (All Sensor Readings below parameter) #FF706F #FF706F
Warning (1 or 2 of sensor readings below parameter) #FED597 #FED597
Normal #5F8D4E #5F8D4E
No data #C9C9C9 #C9C9C9

Environment Variables

To connect to firebase RTDB, you will need to add the following environment variables to your .env file

NEXT_PUBLIC_FirebaseApiKey="apiKey"

NEXT_PUBLIC_FirebaseDatabaseURL="databaseURL"

NEXT_PUBLIC_FirebaseProjectId="firebaseProjectId"

and env for the server side

FirebaseApiKey="apiKey"

FirebaseDatabaseURL="databaseURL"

FirebaseProjectId="firebaseProjectId"

You can find the config Firebase Console under Project Settings or if you want to directly edit the firebase.config.js it's the same.

Tech

Library for used sensor in this project

Firebase realtime database JSON format

JSON format for firebase realtime databse

[
  "userId": { //main node path for react query firebase hook
    "1": { // sensor id
      "nama": "nama pasien",
      "nilai": {
        "-NHFthuz-7J7H71noisX": { //this node name will randomly created by ESP32
          "beat": 0,
          "spo2": 0,
          "temp": 0,
          "timestamp": 0
        }
  }
]