How sukrerohit0409/integrated-hospital-management-system works
PulseCare IHMS is a role-based hospital management web app. Patients book appointments; staff handle registration, queues, consultation, prescriptions, billing, and attendance, while managers and admins oversee staff and finances. App.tsx resolves sessions and role-authorized workspace routes before displaying dashboards. Dashboards use a shared store, backed by browser-local demo data or Supabase records and realtime refreshes. The graph preserves documented billing, leave, analytics, and appointment capabilities. Some dashboard internals and API wiring were not sampled, so edges are limited to shown imports, calls, and README statements.
Main entry points: App.tsx App router · store.ts Shared records · LoginModal.tsx Login modal · PatientDashboard.tsx Patient portal
Components 27
App entry and access
- App router
src/App.tsx - Login modal
src/components/LoginModal.tsx - Workspace access
src/utils/workspaceRoutes.ts - Auth profile
src/data/auth.ts
Care workflows
- Patient portal
src/components/patient/PatientDashboard.tsx - Reception desk
src/components/receptionist/ReceptionistDashboard.tsx - Doctor portal
src/components/doctor/DoctorDashboard.tsx - Prescription print
src/components/PrintPrescriptionModal.tsx
Hospital operations
- Admin dashboard
src/components/admin/AdminDashboard.tsx - Manager dashboard
src/components/manager/ManagerDashboard.tsx - Staff portal
src/components/staff/StaffDashboard.tsx - Attendance marker
src/components/AttendanceMarker.tsx - Staff accounts
src/data/staffAccounts.ts
Shared data and services
- Shared records
src/data/store.ts - Supabase client
src/lib/supabase.ts - Supabase database
- Staff API
api/staff.ts - Phone login API
api/auth-login.ts
Shared domain logic
- Appointment sorting
src/utils/appointmentSorting.ts - Shift rules
src/utils/staffShifts.ts - Hospital dates
src/utils/hospitalDate.ts - Hospital date hook
src/hooks/useHospitalDate.ts - Workspace tab hook
src/hooks/useWorkspaceTab.ts - Input validation
src/utils/validation.ts - Phone input
src/components/IndianPhoneInput.tsx - User display
src/utils/userDisplay.ts
Other components
- Hospital user
Connections 30
- Hospital user → App router: opens app
README.md - App router → Auth profile: loads profile
src/App.tsx - App router → Shared records: initializes sync
src/App.tsx - App router → Workspace access: checks access
src/App.tsx - App router → Login modal: opens login
src/App.tsx - App router → Patient portal: renders portal
src/App.tsx - App router → Reception desk: renders portal
src/App.tsx - App router → Doctor portal: renders portal
src/App.tsx - App router → Admin dashboard: renders portal
src/App.tsx - App router → Manager dashboard: renders portal
src/App.tsx - App router → Staff portal: renders portal
src/App.tsx - Login modal → Phone input: collects phone
src/components/LoginModal.tsx - Login modal → Input validation: validates input
src/components/LoginModal.tsx - Login modal → Phone login API: resolves phone
README.md - Patient portal → Shared records: reads and writes
src/components/patient/PatientDashboard.tsx - Reception desk → Shared records: reads and writes
src/components/receptionist/ReceptionistDashboard.tsx - Doctor portal → Shared records: reads and writes
src/components/doctor/DoctorDashboard.tsx - Doctor portal → Prescription print: opens print
src/components/doctor/DoctorDashboard.tsx - Manager dashboard → Staff accounts: manages accounts
src/components/manager/ManagerDashboard.tsx - Staff portal → Attendance marker: records attendance
- Shared records → Supabase client: persists records
src/data/store.ts - Supabase client → Supabase database: reads and writes
README.md - Patient portal → Appointment sorting: sorts appointments
src/components/patient/PatientDashboard.tsx - Reception desk → Appointment sorting: sorts appointments
src/components/receptionist/ReceptionistDashboard.tsx - Shared records → Shift rules: calculates checkout
src/data/store.ts - Hospital date hook → Hospital dates: gets hospital date
src/hooks/useHospitalDate.ts - Patient portal → Workspace tab hook: syncs workspace tab
src/components/patient/PatientDashboard.tsx - Phone input → Input validation: normalizes phone
src/components/IndianPhoneInput.tsx - Shared records → User display: formats profile name
src/data/store.ts - Manager dashboard → Staff API: invites staff