How 0xsaadbinsultan/pharmacy-app works
This is a local Java Swing pharmacy sales demo. A staff user searches and filters a sample medicine catalog, selects dosage and quantity, adds items to a cart, reviews totals, then checks out with a customer name and simulated Cash/Card choice. Confirmation creates a receipt snapshot and clears the cart; receipts can be viewed, printed, saved, and reopened. The graph separates the UI workflow from its catalog and transaction model. PharmacyApp excerpts are partial, so uncertain internal call wiring is omitted; documented capabilities are retained.
Main entry points: PharmacyApp.java Swing dashboard · CartModel.java Cart and totals · MedicineImages.java Thumbnails · Medicine.java Medicine catalog
Components 12
Desktop workflow
- Swing dashboard
PharmacyApp.java - Search and filters
PharmacyApp.java - Medicine cards
PharmacyApp.java - Checkout dialog
PharmacyApp.java
Catalog
- Medicine catalog
Medicine.java - Thumbnails
MedicineImages.java
Cart and receipt
- Cart controls
PharmacyApp.java - Cart and totals
CartModel.java - Receipt snapshot
Receipt.java
Other components
- Staff user
- Local files
- Desktop printer
Connections 17
- Staff user → Swing dashboard: uses
- Swing dashboard → Search and filters: presents
- Search and filters → Medicine catalog: filters
- Swing dashboard → Medicine cards: displays
- Swing dashboard → Medicine catalog: loads samples
- Medicine cards → Thumbnails: loads thumbnails
- Thumbnails → Local files: reads images
- Medicine cards → Cart and totals: adds selections
- Swing dashboard → Cart controls: presents
- Cart controls → Cart and totals: updates
- Cart controls → Checkout dialog: opens
- Checkout dialog → Cart and totals: creates receipt
- Checkout dialog → Cart and totals: clears after confirmation
- Cart and totals → Receipt snapshot: snapshots order
- Swing dashboard → Receipt snapshot: shows latest
- Swing dashboard → Local files: saves text
- Swing dashboard → Desktop printer: prints receipt