Skip to main content
Mohamed Amine MIDENI
All projects

VitaSensor

Real-time hospital IoT monitoring with AI-powered predictions

React 18TypeScriptTailwind CSSZustandReact Router
VitaSensor

About

Context, problem & solution

VitaSensor is a full-stack smart-hospital monitoring system that tracks patients' vital signs in real time (heart rate, SpO2, temperature, ECG) and uses machine learning to flag deterioration before it becomes an emergency.

Context and problem. In a hospital, the window between a patient's condition worsening and a clinician noticing can be critical. Raw monitors show what's happening now; they don't anticipate what's coming, and they don't route the right information to the right person. The challenge here was twofold: stream live data reliably to the people who need it, and turn that stream into something predictive rather than merely reactive.

Solution. The platform is built in three layers. A React + TypeScript frontend gives each role — admin, doctor, nurse — its own dashboard, updated live through Socket.IO. A Node.js/Express backend handles authentication (JWT), REST routes, and the real-time event layer, persisting everything to PostgreSQL through Prisma. A dedicated Python AI service runs the models: an LSTM that forecasts SpO2 thirty minutes ahead, a Random Forest that classifies patient status, an Isolation Forest for anomaly detection, and logistic regression for cardiac-risk scoring. On top of this sits a multi-level alert engine (critical/high/medium/low) with an acknowledgment-and-intervention workflow so alerts are actioned, not just displayed.

Engineering and quality focus. The system is intentionally organized around clear boundaries — the AI service is decoupled from the API, and the real-time layer is separated from the request/response layer — which keeps each part testable and independently evolvable. The README is honest about scope: some pieces (full Python-service integration, SMS/email notifications, multi-hospital support) are on the roadmap rather than shipped, documented openly rather than implied.

Architecture

How the system is built

architecture.diagram
Client
React Dashboard
Admin / Doctor / NurseLive vitals & alerts
API
Node + Express API
REST routesJWT auth
Socket.IO
Real-time pushPer-role channels
Intelligence
AI Service (Python)
LSTM: SpO2 +30minRandom Forest: status
Alert Engine
4 severity levelsAcknowledge workflow
Data
PostgreSQL
Prisma ORMPatients, vitals, alerts
Multi-role platform (admin / doctor / nurse)Real-time vitals over WebSocketLSTM predicts SpO2 30 minutes aheadRandom Forest & Isolation Forest for status / anomaliesMulti-level alerting with acknowledgmentPostgreSQL via Prisma

Tech stack

Technologies used

Frontend

React 18TypeScriptTailwind CSSZustandReact RouterRechartsAxios

Backend

Node.jsExpressTypeScriptSocket.IOJWTWinston

Database

PostgreSQLPrisma ORM

AI / ML

PythonTensorFlow / Keras (LSTM)scikit-learn (Random Forest, Isolation Forest, Logistic Regression)

Real-time

WebSocket (Socket.IO)Role-based live dashboards

Want to know more about VitaSensor?

The complete source code is available on GitHub, along with the history and deployment configuration.