How sadatsahaf/herv1. works
HERCULES is a React caregiver dashboard for monitoring patients’ safety. The main workflow is caregiver sign-in, loading patient and alert data, reviewing status and location, and responding with notes, resolved alerts, or on-demand AI insights. The README also documents device management and settings; these are represented within the root app because the sampled sources do not identify separate implementations. Map and chart behavior is partly simulated; wearable ingestion and automated alert generation are not evidenced in the sampled code.
Main entry points: App.tsx App Views and State · authService.ts Authentication · dataService.ts Patient and Alert Data · firebaseConfig.ts Firebase Setup
Components 20
Caregiver Dashboard
- React Entry
index.tsx - App Views and State
App.tsx - Alert Center
App.tsx - Devices and Settings
App.tsx
Patient Monitoring
- Patient Summary
components/PatientCard.tsx - Threat Status
components/ThreatBadge.tsx - Map and Geofences
components/MapWidget.tsx - Care Notes
components/NotesWidget.tsx - Vitals Charts
components/VitalsChart.tsx - Selected Patient
Identity and Data
- Authentication
services/authService.ts - Firebase Setup
firebaseConfig.ts - Patient and Alert Data
services/dataService.ts - Firestore
- Firebase Authentication
- Domain Types
types.ts - Demo Seed Data
constants.tsx
AI Insights
- Patient Analysis
services/geminiService.ts - Google Gemini
Other components
- Caregiver
Connections 26
- Caregiver → React Entry: opens
README.md - React Entry → App Views and State: renders
index.tsx - App Views and State → Authentication: handles auth
App.tsx - Authentication → Firebase Authentication: authenticates
services/authService.ts - Authentication → Firestore: reads and writes profiles
services/authService.ts - App Views and State → Patient and Alert Data: loads and updates
App.tsx - Patient and Alert Data → Firestore: subscribes and writes
services/dataService.ts - Patient and Alert Data → Demo Seed Data: seeds records
services/dataService.ts - Authentication → Firebase Setup: uses clients
services/authService.ts - Patient and Alert Data → Firebase Setup: uses client
services/dataService.ts - Firebase Setup → Firebase Authentication: initializes
firebaseConfig.ts - Firebase Setup → Firestore: initializes
firebaseConfig.ts - App Views and State → Alert Center: manages
App.tsx - App Views and State → Devices and Settings: presents
README.md - App Views and State → Patient Summary: renders
App.tsx - Patient Summary → Threat Status: renders
components/PatientCard.tsx - App Views and State → Map and Geofences: renders
App.tsx - App Views and State → Care Notes: renders
App.tsx - App Views and State → Vitals Charts: renders
App.tsx - App Views and State → Patient Analysis: requests analysis
App.tsx - Patient Analysis → Google Gemini: generates analysis
services/geminiService.ts - App Views and State → Selected Patient: selects and displays
App.tsx - Selected Patient → Map and Geofences: provides location history
- Selected Patient → Care Notes: provides note history
- Selected Patient → Patient Analysis: provides status data
- App Views and State → Domain Types: uses domain models
App.tsx