# MamaAlert Care Dashboard đź’śđź’š
MamaAlert is a smart maternal and neonatal emergency monitoring system designed for low-resource hospitals, CHPS compounds, and rural clinics in Ghana.
The web application functions as the central intelligence, telemetry tracking, and coordinator command center. It aggregates real-time signals from bedside ESP32 nodes (monitoring heart rate, SpOâ‚‚ saturation, and temperature) to identify critical thresholds, log emergency incidents, and audit nurse checkups.
---
## ⚡ Core Features
1. **Real-time Telemetry Grid:** Auto-synced moving vitals gauges and rolling physiological trends built with Recharts.
2. **Clinical Alarm Engine:** Audible and visual clinical buzzer alarms synthesized using the browser's Web Audio API (sine for warning, sawtooth for emergencies).
3. **Nurse Response Audit:** Logs response speeds and chronicles checkup logs to ensure accountability.
4. **Hardware Node Allocator:** Dynamically registers and maps ESP32 nodes to patients' bed numbers.
5. **District Reports:** Aggregated analytics graphs representing incident distributions and printable supervisor briefs.
6. **Built-in ESP32 Simulator:** A collapsible floating control deck enabling judges or developers to mock normal, warning, and emergency payloads.
7. **Offline-Demo Resilience:** Automatic fallback to a mock database driver if Firebase configurations are unconfigured, ensuring the app loads and operates perfectly during presentations.
---
## 🛠️ Tech Stack
- **Frontend Framework:** React + Vite
- **Styling UI:** Tailwind CSS (Plus Jakarta Sans font palette)
- **Visual Trends:** Recharts
- **Backend:** Firebase (Authentication & Realtime Database)
- **Icons:** Lucide React
---
## 🚀 Setup & Local Execution
### 1. Clone & Enter Directory
Open a terminal in the folder:
```bash
cd mamaAlert
```
### 2. Configure Environment Keys
Duplicate the `.env.example` file and rename it to `.env`:
```bash
cp .env.example .env
```
Fill in your Firebase credentials in …