How holosion/neoguard-ai works
NeoGuard is a neonatal monitoring and clinical decision-support product: staff register patients, assign bedside devices to monitoring sessions, review incoming readings and risk information, and manage alerts; administrators also manage devices, users, and sessions. The main workflow spans the React staff interface, authenticated API, device-sync and clinical services, and persistent domain data. A separate neonatal-dashboard directory contains a standalone dashboard UI. README content was not provided, and several service and frontend API implementations were not excerpted, so uncertain relationships are omitted.
Main entry points: router.py API router · deps.py Auth dependencies · devices.py Device endpoints · patients.js Patient API
Components 29
Staff interface
- Role-based routes
frontend/src/App.jsx - Patient workflows
frontend/src/pages/PatientsPage.jsx - Triage view
frontend/src/pages/nurse/TriagePage.jsx - Session actions
frontend/src/components/patients/SessionModals.jsx - Fetch state
frontend/src/hooks/useFetch.js - Patient API
frontend/src/api/patients.js - HTTP client
frontend/src/api/client.js - Backend adapter
frontend/src/api/backend.js - Mock API
frontend/src/api/mock.js - Session API
frontend/src/api/sessions.js
Backend API
- API router
backend/app/api/v1/router.py - Authentication
backend/app/api/v1/endpoints/auth.py - Device endpoints
backend/app/api/v1/endpoints/devices.py - Patient endpoints
backend/app/api/v1/endpoints/patients.py - Session endpoints
backend/app/api/v1/endpoints/sessions.py - Alert endpoints
backend/app/api/v1/endpoints/alerts.py - Admin endpoints
backend/app/api/v1/endpoints/admin.py - Auth dependencies
backend/app/api/deps.py - API schemas
backend/app/schemas/resources.py
Clinical domain
- Risk scoring
backend/app/services/risk.py - Alert logic
backend/app/services/alerts.py - Audit logging
backend/app/services/audit.py - Clinical records
backend/app/models/entities.py - Database sessions
backend/app/core/database.py
Risk modeling
- Risk features
backend/app/services/risk_features.py - Risk model
backend/app/services/risk_model.py
Standalone dashboard
- Ward dashboard
neonatal-dashboard/src/App.tsx - Vital chart
neonatal-dashboard/src/VitalChart.tsx
Other components
- Clinical staff
Connections 37
- Clinical staff → Role-based routes: uses
frontend/src/App.jsx - Role-based routes → Patient workflows: routes to
frontend/src/App.jsx - Role-based routes → Triage view: routes to
frontend/src/App.jsx - Patient workflows → Patient API: requests data
frontend/src/pages/PatientsPage.jsx - Patient workflows → Session actions: opens
frontend/src/pages/PatientsPage.jsx - Session actions → Fetch state: loads devices
frontend/src/components/patients/SessionModals.jsx - Session actions → Patient API: creates patient
frontend/src/components/patients/SessionModals.jsx - Session actions → Session API: manages sessions
frontend/src/components/patients/SessionModals.jsx - Patient API → HTTP client: uses client
frontend/src/api/patients.js - Patient API → Backend adapter: delegates
frontend/src/api/patients.js - Patient API → Mock API: supports mock mode
frontend/src/api/patients.js - HTTP client → Backend adapter: HTTP transport
- API router → Authentication: registers
backend/app/api/v1/router.py - API router → Device endpoints: registers
backend/app/api/v1/router.py - API router → Patient endpoints: registers
backend/app/api/v1/router.py - API router → Session endpoints: registers
backend/app/api/v1/router.py - API router → Alert endpoints: registers
backend/app/api/v1/router.py - API router → Admin endpoints: registers
backend/app/api/v1/router.py - Authentication → Auth dependencies: depends on
backend/app/api/v1/endpoints/auth.py - Device endpoints → Auth dependencies: depends on
backend/app/api/v1/endpoints/devices.py - Patient endpoints → Auth dependencies: depends on
backend/app/api/v1/endpoints/patients.py - Session endpoints → Auth dependencies: depends on
backend/app/api/v1/endpoints/sessions.py - Alert endpoints → Auth dependencies: depends on
backend/app/api/v1/endpoints/alerts.py - Admin endpoints → Auth dependencies: depends on
backend/app/api/v1/endpoints/admin.py - Auth dependencies → Database sessions: gets sessions
backend/app/api/deps.py - Database sessions → Clinical records: maps records
backend/app/core/database.py - Device endpoints → Alert logic: uses
backend/app/api/v1/endpoints/devices.py - Device endpoints → Risk scoring: uses
backend/app/api/v1/endpoints/devices.py - Patient endpoints → Risk scoring: uses
backend/app/api/v1/endpoints/patients.py - Device endpoints → Audit logging: uses
backend/app/api/v1/endpoints/devices.py - Patient endpoints → Audit logging: uses
backend/app/api/v1/endpoints/patients.py - Session endpoints → Audit logging: uses
backend/app/api/v1/endpoints/sessions.py - Alert endpoints → Audit logging: uses
backend/app/api/v1/endpoints/alerts.py - Risk scoring → Risk features: computes features
- Risk scoring → Risk model: scores risk
- API router → API schemas: endpoint contracts
- Ward dashboard → Vital chart: renders
neonatal-dashboard/src/App.tsx