How shiiivam-01/pharmacy-management-system works
PMS is a menu-driven pharmacy operations application. Staff use the CLI to log in, manage medicines and deliveries, bill customers, and review alerts and reports; billing allocates non-expired stock by FEFO and records sales. The repository also contains a small FastAPI surface for authentication and medicine operations. The graph preserves the README’s major operational capabilities; arrows follow explicit README statements or relationships visible in indexed/read source. Several service implementations were not excerpted, so their internal calls are not expanded.
Main entry points: app.py CLI application · billing_service.py Billing and sales · medicine_service.py Medicine management · auth_service.py Authentication
Components 30
User interfaces
- CLI application
frontend/cli/app.py - Console helpers
frontend/cli/console.py - Medicine menu
frontend/cli/medicine_menu.py - Inventory menu
frontend/cli/inventory_menu.py - Billing menu
frontend/cli/billing_menu.py - Supplier menu
frontend/cli/supplier_menu.py - Employee menu
frontend/cli/employee_menu.py - Report menu
frontend/cli/report_menu.py - Audit menu
frontend/cli/audit_menu.py - HTTP API
api/main.py - Auth route
api/routers/auth.py - Medicine route
api/routers/medicines.py
Identity and access
- Authentication
backend/services/auth_service.py - Roles and passwords
backend/security.py
Pharmacy operations
- Medicine management
backend/services/medicine_service.py - Stock control
backend/services/inventory_service.py - Billing and sales
backend/services/billing_service.py - FEFO allocation
backend/services/fefo.py - Supplier management
backend/services/supplier_service.py - Employee management
backend/services/employee_service.py - Stock alerts
backend/services/alert_service.py - Reports
backend/services/report_service.py
Persistence and domain
- Medicine records
backend/repositories/medicine_repository.py - Batch records
backend/repositories/batch_repository.py - Employee records
backend/repositories/employee_repository.py - Supplier records
backend/repositories/supplier_repository.py - Sale records
backend/repositories/sale_repository.py - Domain models
backend/models.py - SQLite access
backend/database.py
Other components
- Pharmacy staff
Connections 37
- Pharmacy staff → CLI application: uses
README.md - CLI application → Authentication: authenticates
frontend/cli/app.py - CLI application → Stock alerts: loads alerts
frontend/cli/app.py - CLI application → Medicine menu: opens
frontend/cli/app.py - CLI application → Inventory menu: opens
frontend/cli/app.py - CLI application → Billing menu: opens
frontend/cli/app.py - CLI application → Supplier menu: opens
frontend/cli/app.py - CLI application → Employee menu: opens
frontend/cli/app.py - CLI application → Report menu: opens
frontend/cli/app.py - CLI application → Audit menu: opens
frontend/cli/app.py - Medicine menu → Medicine management: calls
frontend/cli/medicine_menu.py - Inventory menu → Stock control: calls
frontend/cli/inventory_menu.py - Inventory menu → Medicine management: calls
frontend/cli/inventory_menu.py - Billing menu → Billing and sales: calls
frontend/cli/billing_menu.py - Billing menu → Medicine management: calls
frontend/cli/billing_menu.py - Supplier menu → Supplier management: calls
frontend/cli/supplier_menu.py - Employee menu → Employee management: calls
frontend/cli/employee_menu.py - Report menu → Reports: calls
frontend/cli/report_menu.py - Audit menu → Roles and passwords: checks access
frontend/cli/audit_menu.py - HTTP API → Auth route: registers
api/main.py - HTTP API → Medicine route: registers
api/main.py - Auth route → Authentication: calls
api/routers/auth.py - Medicine route → Medicine management: calls
api/routers/medicines.py - Authentication → Employee records: reads and writes
backend/services/auth_service.py - Authentication → Roles and passwords: hashes passwords
backend/services/auth_service.py - Medicine management → Medicine records: reads and writes
backend/services/medicine_service.py - Stock control → Batch records: manages batches
backend/services/inventory_service.py - Stock control → Medicine records: reads medicines
backend/services/inventory_service.py - Billing and sales → Medicine records: reads medicines
backend/services/billing_service.py - Billing and sales → Batch records: allocates stock
backend/services/billing_service.py - Billing and sales → Sale records: records sales
backend/services/billing_service.py - Billing and sales → FEFO allocation: allocates FEFO
backend/services/billing_service.py - Employee management → Employee records: manages employees
backend/services/employee_service.py - Supplier management → Supplier records: manages suppliers
backend/services/supplier_service.py - HTTP API → SQLite access: initializes
api/main.py - CLI application → SQLite access: connects
frontend/cli/app.py - SQLite access → Domain models: stores records