How aniketnandi2015-droid/hmis-project- works
PharmaAssist is a single-operator pharmacy counter and inventory application. The principal workflow is selecting medicines and batches, checking cart pricing and clinical safety, then recording a dispatch; separate workflows reconcile stock, recommend procurement, scan packages, and surface operational analytics. The graph reflects documented capabilities and source-index references. Some wiring and persistence details are unsampled, so uncertain connections are omitted rather than inferred.
Main entry points: App.tsx App coordinator · InsightsScreen.tsx Operational insights · cartService.ts Cart rules · LoginModal.tsx Login screen
Components 29
Application
- App coordinator
src/App.tsx - Login screen
src/components/LoginModal.tsx - Authentication rules
src/lib/domain/authentication/authService.ts - Navigation
src/components/Navbar.tsx
Counter Sales
- Counter POS
src/components/CounterPOS.tsx - Cart drawer
src/components/CartDrawer.tsx - Cart rules
src/lib/domain/pos/cartService.ts - Pricing rules
src/lib/domain/pricing/pricingDiscountService.ts - Safety checks
src/lib/domain/safety/safetyCheckService.ts - Invoice generation
src/components/InvoiceGeneratorModal.tsx - Receipt printing
src/components/ReceiptPrintModal.tsx
Inventory & Supply
- Inventory screen
src/components/InventoryScreen.tsx - Discrepancy review
src/components/StockDiscrepancyModal.tsx - Stock reconciliation
src/lib/domain/inventory/discrepancyService.ts - Expiry checks
src/lib/domain/inventory/nearExpiryService.ts - Procurement screen
src/components/ProcurementScreen.tsx - Order recommendations
src/lib/domain/procurement/procurementService.ts - Supplier quality
src/lib/domain/procurement/supplierQualityService.ts
Insights & Scanning
- Operational insights
src/components/InsightsScreen.tsx - Inventory alerts
src/lib/domain/inventory/inventoryAlertService.ts - Demand forecasting
src/lib/domain/analytics/timeSeriesForecastService.ts - Cross-sell analysis
src/lib/domain/analytics/crossSellService.ts - Package scanner
src/components/BarcodeScannerModal.tsx - Scan matching
src/lib/domain/ocr/smartScanService.ts
Shared Platform
- Local storage adapter
src/lib/offline/storageAdapter.ts - Offline synchronization
src/lib/domain/synchronization/offlineSyncService.ts - English & Hindi
src/lib/i18n/translations.ts
Other components
- Counter operator
- Supabase backend
Connections 28
- Counter operator → App coordinator: uses
README.md - App coordinator → Counter POS: renders
src/App.tsx - App coordinator → Inventory screen: renders
src/App.tsx - App coordinator → Procurement screen: renders
src/App.tsx - App coordinator → Operational insights: renders
src/App.tsx - App coordinator → Cart drawer: renders
src/App.tsx - Counter POS → Cart rules: uses
src/components/CounterPOS.tsx - Cart drawer → Cart rules: uses
src/components/CartDrawer.tsx - Cart rules → Safety checks: checks
src/lib/domain/pos/cartService.ts - Cart rules → Pricing rules: calculates
src/lib/domain/pos/cartService.ts - App coordinator → Local storage adapter: persists transactions
README.md - Inventory screen → Expiry checks: checks batches
src/components/InventoryScreen.tsx - Discrepancy review → Stock reconciliation: reconciles
src/components/StockDiscrepancyModal.tsx - App coordinator → Discrepancy review: opens
src/App.tsx - Procurement screen → Order recommendations: requests recommendations
src/components/ProcurementScreen.tsx - Operational insights → Inventory alerts: shows alerts
src/components/InsightsScreen.tsx - Operational insights → Demand forecasting: shows forecasts
src/components/InsightsScreen.tsx - Operational insights → Supplier quality: shows supplier events
src/components/InsightsScreen.tsx - Package scanner → Scan matching: matches scan
src/components/BarcodeScannerModal.tsx - App coordinator → Package scanner: opens
src/App.tsx - Login screen → Authentication rules: checks credentials
src/components/LoginModal.tsx - App coordinator → Login screen: renders
src/App.tsx - App coordinator → Offline synchronization: coordinates offline sync
src/App.tsx - Local storage adapter → Supabase backend: syncs queued changes
- Navigation → English & Hindi: uses labels
src/components/Navbar.tsx - Operational insights → Cross-sell analysis: presents suggestions
- App coordinator → Invoice generation: opens
src/App.tsx - App coordinator → Receipt printing: opens
src/App.tsx