How mulgundsunil1918/mmcopd works
CureDesk HMS is an offline-first clinic and hospital-management desktop application built with Electron, React and SQLite. Clinic staff use routed modules for reception, appointments, clinical care, billing, pharmacy, diagnostics, inpatient care, accounts and analytics; the renderer communicates with the Electron main process, which owns local data and can proxy calls to a network host. The README documents the principal clinic workflows and routes. Some subsystem connections are omitted because their implementations were not sampled; edges below are limited to shown imports/calls or documented routes.
Main entry points: App.tsx App routing · main.ts Electron main · QuickBillModal.tsx Quick bill · PurchaseBillModal.tsx Purchase entry
Components 32
Application shell
- App routing
src/App.tsx - Clinic settings
src/pages/Settings.tsx
Clinic workflows
- Reception
src/pages/Reception.tsx - Appointments
src/pages/Appointments.tsx - Doctor queue
src/pages/DoctorDashboard.tsx - Inpatient care
src/pages/IPD.tsx - Laboratory
src/pages/Lab.tsx - Radiology
src/pages/Radiology.tsx - OPD slip
src/components/OpdSlip.tsx
Business operations
- Billing
src/pages/Billing.tsx - Quick bill
src/components/billing/QuickBillModal.tsx - Bill calculations
src/main/billing-engine.ts - Pharmacy
src/pages/Pharmacy.tsx - Purchase entry
src/components/pharmacy/PurchaseBillModal.tsx - Purchase review
src/components/pharmacy/billImport/ReviewScreen.tsx - Accounts
src/pages/Accounts.tsx - Analytics
src/pages/Analytics.tsx - WhatsApp
src/pages/WhatsApp.tsx - Bill import logic
src/lib/billImport/index.ts
Desktop and data platform
- Electron main
src/main.ts - SQLite database
src/db/db.ts - Settings storage
src/db/settings.ts - IPC handlers
src/main/ipc.ts - Network host
src/main/network-server.ts - Network proxy
src/main/network-client.ts
Shared capabilities
- Sign-in state
src/hooks/useAuth.tsx - Pharmacy arithmetic
src/lib/pharmacyMath.ts - Modal UI
src/components/Modal.tsx - Help tips
src/components/HelpTip.tsx - Slip templates
src/db/slip-templates.ts - Notifications
src/services/notifications.ts
Other components
- Clinic staff
Connections 30
- Clinic staff → App routing: uses
- App routing → Reception: routes to
src/App.tsx - App routing → Appointments: routes to
src/App.tsx - App routing → Doctor queue: routes to
src/App.tsx - App routing → Billing: routes to
src/App.tsx - App routing → Accounts: routes to
src/App.tsx - App routing → Analytics: routes to
src/App.tsx - App routing → Inpatient care: routes to
src/App.tsx - App routing → Laboratory: routes to
src/App.tsx - App routing → Radiology: routes to
src/App.tsx - App routing → Pharmacy: routes to
src/App.tsx - App routing → Clinic settings: routes to
src/App.tsx - App routing → WhatsApp: routes to
src/App.tsx - Quick bill → Modal UI: renders
src/components/billing/QuickBillModal.tsx - Quick bill → Billing: supports
- Purchase entry → Modal UI: uses
src/components/pharmacy/PurchaseBillModal.tsx - Purchase entry → Bill import logic: uses
src/components/pharmacy/PurchaseBillModal.tsx - Purchase review → Bill import logic: uses
src/components/pharmacy/billImport/ReviewScreen.tsx - Purchase entry → Help tips: renders
src/components/pharmacy/PurchaseBillModal.tsx - Purchase review → Help tips: renders
src/components/pharmacy/billImport/ReviewScreen.tsx - Electron main → SQLite database: gets database
src/main.ts - Electron main → Settings storage: reads settings
src/main.ts - Electron main → Network host: starts host
src/main.ts - Electron main → Network proxy: configures proxy
src/main.ts - Electron main → IPC handlers: runs backup
src/main.ts - Network proxy → IPC handlers: forwards handlers
src/main/network-client.ts - Bill calculations → Pharmacy arithmetic: uses arithmetic
src/main/billing-engine.ts - Quick bill → Billing: creates bills
- App routing → Sign-in state: uses session
src/App.tsx - OPD slip → Slip templates: uses templates
src/components/SlipPreviewLauncher.tsx