How manasbhaumik-web/mediclinic-enterprise works
Mediclinic Enterprise is a clinic operations application. Staff enter through role-based login; the App coordinates clinical work, including doctor queue and consultation, prescription dispensing, and billing, while supporting registration, appointments, administration, and reporting. The sampled sync and context code shows Supabase-backed patient, visit, appointment, inventory, and transaction data; payment-intent handlers integrate with Stripe. Several modules are present in the tree but their wiring was not sampled, so their internal relationships are not inferred.
Main entry points: App.tsx Application router · FinancialContext.tsx Financial service · supabase.ts Supabase · useSupabaseSync.ts Clinic data sync
Components 23
Entry and orchestration
- Application router
src/App.tsx - Authentication
src/context/AuthContext.tsx - Clinic landing
src/components/ClinicLandingPage.tsx - Staff login
src/components/LoginModule.tsx
Clinical operations
- Patient registration
src/components/PatientRegistrationModule.tsx - Triage
src/components/TriageModule.tsx - Appointments
src/components/AppointmentCalendarModule.tsx - Doctor workflow
src/components/DoctorDashboardModule.tsx - Consultation
src/components/ConsultationRoom.tsx - Clinical search
src/lib/vectorDb.ts - Dispensary
src/components/DispensaryDashboard.tsx
Clinic operations
- Billing desk
src/components/BillingDesk.tsx - Revenue cycle
src/components/RevenueCycleHub.tsx - Reports and analytics
src/components/ReportsAnalyticsModule.tsx - Administration
src/components/AdminModule.tsx
Data and integrations
- Inventory service
src/context/InventoryContext.tsx - Financial service
src/context/FinancialContext.tsx - Clinic data sync
src/hooks/useSupabaseSync.ts - Supabase
src/lib/supabase.ts - Payment intent API
server.js - Payment intent function
supabase/functions/payment-intent/index.ts
Other components
- Clinic staff
- Stripe
Connections 29
- Clinic staff → Clinic landing: opens clinic
- Clinic staff → Staff login: opens portal
- Clinic landing → Application router: navigates
- Staff login → Application router: signs in
- Application router → Authentication: checks session
- Application router → Clinic data sync: loads clinic data
- Application router → Financial service: records billing
- Application router → Doctor workflow: routes doctor view
- Application router → Patient registration: routes registration
- Application router → Triage: routes triage
- Application router → Appointments: routes appointments
- Application router → Dispensary: routes dispensary
- Application router → Billing desk: routes billing
- Application router → Reports and analytics: routes reports
- Application router → Administration: routes admin
- Doctor workflow → Consultation: opens consultation
- Consultation → Clinical search: searches diagnoses
- Application router → Inventory service: provides inventory
- Application router → Financial service: provides finances
- Clinic data sync → Supabase: reads and writes clinic records
- Inventory service → Supabase: reads and writes stock
- Financial service → Supabase: reads and writes transactions
- Clinical search → Supabase: queries embeddings
- Dispensary → Application router: reports dispense completion
- Application router → Clinic data sync: updates visit status
- Billing desk → Application router: reports settlement
- Payment intent API → Stripe: creates payment intent
- Payment intent function → Stripe: creates payment intent
- Revenue cycle → Financial service: manages claims