How aritradas2003/somnisense works
SomniSense is a healthcare monitoring frontend for authentication, patient and device workflows, and operational views. The evidenced workflow is sign-in, protected navigation, patient management or device assignment, and service-backed data retrieval. The tree also contains monitoring, alerts, analytics, and session views; their implementation details are not shown, so their connections are omitted. The README provides only the product name, and the supplied excerpts do not show a backend implementation.
Main entry points: router.jsx Protected routes · patientService.js Patient service · httpClient.js HTTP client · PatientsTable.jsx Patient table
Components 25
Application and access
- App bootstrap
frontend/src/App.jsx - Protected routes
frontend/src/app/router.jsx - Sign-in page
frontend/src/pages/auth/LoginPage.jsx - Auth hook
frontend/src/hooks/useAuth.js - Auth state
frontend/src/features/auth/authSlice.js - App layout
frontend/src/components/layout/AppLayout.jsx
Patient and monitoring
- Dashboard
frontend/src/pages/dashboard/DashboardPage.jsx - Patient list
frontend/src/pages/patients/PatientsPage.jsx - Add patient
frontend/src/pages/patients/AddPatientPage.jsx - Patient details
frontend/src/pages/patients/PatientDetailsPage.jsx - Patient table
frontend/src/components/common/PatientsTable.jsx - Live monitoring
frontend/src/pages/monitoring/LiveMonitoringPage.jsx - Alerts view
frontend/src/pages/alerts/AlertsPage.jsx - Analytics view
frontend/src/pages/analytics/AnalyticsPage.jsx - Sessions view
frontend/src/pages/sessions/SessionsPage.jsx
Device management
- Device inventory
frontend/src/pages/devices/DevicesPage.jsx
Services and API
- Auth service
frontend/src/services/authService.js - Patient service
frontend/src/services/patientService.js - Dashboard service
frontend/src/services/dashboardService.js - Device service
frontend/src/services/deviceService.js - Mock services
frontend/src/services/mocks - HTTP client
frontend/src/services/api/httpClient.js - API configuration
frontend/src/services/api/apiConfig.js
Other components
- Staff user
- SomniSense API
Connections 32
- Staff user → Sign-in page: enters credentials
frontend/src/pages/auth/LoginPage.jsx - App bootstrap → Protected routes: renders
frontend/src/App.jsx - Protected routes → Sign-in page: routes to
frontend/src/app/router.jsx - Protected routes → App layout: wraps protected views
frontend/src/app/router.jsx - Protected routes → Dashboard: routes to
frontend/src/app/router.jsx - Protected routes → Patient list: routes to
frontend/src/app/router.jsx - Protected routes → Add patient: routes to
frontend/src/app/router.jsx - Protected routes → Patient details: routes to
frontend/src/app/router.jsx - Protected routes → Device inventory: routes to
frontend/src/app/router.jsx - Sign-in page → Auth hook: uses
frontend/src/pages/auth/LoginPage.jsx - Protected routes → Auth hook: checks access
frontend/src/app/router.jsx - Auth hook → Auth state: dispatches sign-in
frontend/src/hooks/useAuth.js - Auth state → Auth service: calls login
frontend/src/features/auth/authSlice.js - Dashboard → Dashboard service: loads data
frontend/src/pages/dashboard/DashboardPage.jsx - Dashboard → Patient table: renders
frontend/src/pages/dashboard/DashboardPage.jsx - Patient list → Patient service: loads patients
frontend/src/pages/patients/PatientsPage.jsx - Patient list → Patient table: renders
frontend/src/pages/patients/PatientsPage.jsx - Add patient → Patient service: creates patient
frontend/src/pages/patients/AddPatientPage.jsx - Patient details → Patient service: loads overview
frontend/src/pages/patients/PatientDetailsPage.jsx - Device inventory → Device service: loads and assigns
frontend/src/pages/devices/DevicesPage.jsx - Device inventory → Patient service: loads patients
frontend/src/pages/devices/DevicesPage.jsx - Device service → HTTP client: requests API
frontend/src/services/deviceService.js - Patient service → HTTP client: requests API
frontend/src/services/patientService.js - Dashboard service → HTTP client: requests API
frontend/src/services/dashboardService.js - Auth service → HTTP client: requests API
frontend/src/services/authService.js - Device service → Mock services: uses in mock mode
frontend/src/services/deviceService.js - Patient service → Mock services: uses in mock mode
frontend/src/services/patientService.js - Dashboard service → Mock services: uses in mock mode
frontend/src/services/dashboardService.js - Auth service → Mock services: uses in mock mode
frontend/src/services/authService.js - HTTP client → API configuration: uses base URL
frontend/src/services/api/httpClient.js - HTTP client → SomniSense API: sends requests
frontend/src/services/api/httpClient.js - Patient table → Patient table: renders status badge
frontend/src/components/common/PatientsTable.jsx