How bigpumpum001/pharventory works
Pharventory is a pharmacy inventory system whose main workflow is staff authentication, inventory and batch management, dispensing, then receipt and stock-movement review. The Next.js interface presents these workflows; the NestJS API implements authentication and domain operations, with PostgreSQL as the documented primary store. Dashboard analytics, Excel import, image uploads, and user/role administration are additional capabilities. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled subsystem links are omitted rather than inferred.
Main entry points: inventory/page.tsx Inventory workspace · dispense.service.ts FEFO and transaction logic · dispense/page.tsx Dispensing workspace · dashboard/page.tsx Dashboard analytics
Components 21
Staff interface
- Sign in
frontend/app/login/page.tsx - Dashboard analytics
frontend/app/dashboard/page.tsx - Inventory workspace
frontend/app/inventory/page.tsx - Dispensing workspace
frontend/app/dispense/page.tsx - Receipt history
frontend/app/receipt/page.tsx - Stock movement view
frontend/app/stocklogs/page.tsx
Identity and access
- Authentication API
backend/src/modules/auth/auth.service.ts - User and role administration
backend/src/modules/users/users.service.ts
Inventory operations
- Medicine management
backend/src/modules/medicines/medicines.controller.ts - Batch management
backend/src/modules/medicine-batches/medicine-batches.controller.ts - Categories and units
backend/src/modules/category/category.service.ts - Spreadsheet import
backend/src/modules/import-excel/import-excel.service.ts - Medicine image upload
backend/src/modules/upload/upload.controller.ts
Dispensing and records
- Dispense processing
backend/src/modules/dispense/dispense.controller.ts - FEFO and transaction logic
backend/src/modules/dispense/dispense.service.ts - Receipt records
backend/src/modules/receipts/receipts.controller.ts - Stock movement records
backend/src/modules/stock-logs/stock-logs.controller.ts
API and persistence
- NestJS application
backend/src/main.ts - PostgreSQL store
- Google Cloud Storage
Other components
- Pharmacy staff
Connections 23
- Pharmacy staff → Sign in: signs in
- Pharmacy staff → Inventory workspace: manages stock
- Pharmacy staff → Dispensing workspace: dispenses medicines
- Pharmacy staff → Receipt history: reviews receipts
- Pharmacy staff → Stock movement view: reviews movements
- Dashboard analytics → Inventory workspace: summarizes stock
frontend/app/dashboard/page.tsx - Dashboard analytics → Dispensing workspace: summarizes sales
- Sign in → Authentication API: requests authentication
- Inventory workspace → Medicine management: manages medicines
- Inventory workspace → Batch management: manages batches
- Inventory workspace → Categories and units: maintains catalog
- Inventory workspace → Spreadsheet import: imports spreadsheet
- Inventory workspace → Medicine image upload: uploads images
- Dispensing workspace → Dispense processing: submits dispense
- Receipt history → Receipt records: retrieves history
- Stock movement view → Stock movement records: retrieves movements
- Authentication API → User and role administration: looks up user
backend/src/modules/auth/auth.service.ts - NestJS application → PostgreSQL store: persists domain data
- Dispense processing → FEFO and transaction logic: dispatches dispense
backend/src/modules/dispense/dispense.controller.ts - FEFO and transaction logic → Batch management: uses batch records
backend/src/modules/dispense/dispense.service.ts - FEFO and transaction logic → Receipt records: uses receipt records
backend/src/modules/dispense/dispense.service.ts - FEFO and transaction logic → Stock movement records: uses movement records
backend/src/modules/dispense/dispense.service.ts - Medicine image upload → Google Cloud Storage: uploads image
backend/src/modules/upload/upload.controller.ts