How jibintech/pharmtech works
PharmTech is a pharmacy management and point-of-sale system: staff authenticate, manage medicine inventory, and bill customers; the billing flow records items, deducts stock, and calculates GST. The frontend also supports prescription scanning and PDF receipts, while the backend exposes REST endpoints and persists pharmacy data. The README documents OCR.space and MySQL; source excerpts do not show all controller routes or persistence configuration, so some frontend-to-backend links are documented at the system level rather than attributed to individual endpoints.
Main entry points: controller REST endpoints · App.jsx Routes and roles · BillingPage.jsx Billing POS · MedicineService.java Medicine inventory
Components 23
Web application
- Routes and roles
frontend/PharmTech/src/App.jsx - Login screen
frontend/PharmTech/src/pages/LoginPage.jsx - Auth state
frontend/PharmTech/src/context/AuthContext.jsx - Inventory console
frontend/PharmTech/src/pages/AdminMedicines.jsx - Billing POS
frontend/PharmTech/src/pages/BillingPage.jsx - API client
frontend/PharmTech/src/api/api.js
REST API
- REST endpoints
backend/pharmtech/src/main/java/com/pharmtech/controller - Auth endpoints
backend/pharmtech/src/main/java/com/pharmtech/controller/AuthController.java - Medicine endpoints
backend/pharmtech/src/main/java/com/pharmtech/controller/MedicineController.java - Billing endpoints
backend/pharmtech/src/main/java/com/pharmtech/controller/BillingController.java - OCR endpoint
backend/pharmtech/src/main/java/com/pharmtech/controller/OcrController.java - Admin endpoints
backend/pharmtech/src/main/java/com/pharmtech/controller
Pharmacy operations
- Medicine inventory
backend/pharmtech/src/main/java/com/pharmtech/service/MedicineService.java - Bill processing
backend/pharmtech/src/main/java/com/pharmtech/service/BillingService.java - Prescription matching
backend/pharmtech/src/main/java/com/pharmtech/service/OcrService.java - Domain records
backend/pharmtech/src/main/java/com/pharmtech/model - Data repositories
backend/pharmtech/src/main/java/com/pharmtech/repository
Identity and access
- Authentication
backend/pharmtech/src/main/java/com/pharmtech/service/AuthService.java - JWT tokens
backend/pharmtech/src/main/java/com/pharmtech/security/JwtService.java - JWT filtering
backend/pharmtech/src/main/java/com/pharmtech/security/JwtAuthenticationFilter.java
Other components
- Pharmacy staff
- MySQL database
- OCR.space
Connections 31
- Pharmacy staff → Routes and roles: uses
- Routes and roles → Login screen: routes
frontend/PharmTech/src/App.jsx - Routes and roles → Inventory console: routes
frontend/PharmTech/src/App.jsx - Routes and roles → Billing POS: routes
frontend/PharmTech/src/App.jsx - Routes and roles → Auth state: provides auth
frontend/PharmTech/src/App.jsx - Login screen → API client: authenticates via
frontend/PharmTech/src/pages/LoginPage.jsx - Login screen → Auth state: sets session
frontend/PharmTech/src/pages/LoginPage.jsx - Inventory console → API client: manages stock via
frontend/PharmTech/src/pages/AdminMedicines.jsx - Billing POS → API client: bills via
frontend/PharmTech/src/pages/BillingPage.jsx - Billing POS → Prescription matching: scans prescriptions
- Billing POS → Billing POS: generates PDF
frontend/PharmTech/src/pages/BillingPage.jsx - API client → REST endpoints: REST requests
- REST endpoints → Auth endpoints: dispatches auth
- REST endpoints → Medicine endpoints: dispatches inventory
- REST endpoints → Billing endpoints: dispatches billing
- REST endpoints → OCR endpoint: dispatches OCR
- REST endpoints → Admin endpoints: dispatches admin
- Auth endpoints → Authentication: delegates
backend/pharmtech/src/main/java/com/pharmtech/controller/AuthController.java - Medicine endpoints → Medicine inventory: delegates
backend/pharmtech/src/main/java/com/pharmtech/controller/MedicineController.java - Billing endpoints → Bill processing: delegates
backend/pharmtech/src/main/java/com/pharmtech/controller/BillingController.java - OCR endpoint → Prescription matching: delegates
backend/pharmtech/src/main/java/com/pharmtech/controller/OcrController.java - Authentication → JWT tokens: creates tokens
backend/pharmtech/src/main/java/com/pharmtech/service/AuthService.java - JWT filtering → JWT tokens: validates tokens
backend/pharmtech/src/main/java/com/pharmtech/security/JwtAuthenticationFilter.java - Authentication → Data repositories: stores users
backend/pharmtech/src/main/java/com/pharmtech/service/AuthService.java - Medicine inventory → Data repositories: reads and writes
backend/pharmtech/src/main/java/com/pharmtech/service/MedicineService.java - Bill processing → Data repositories: loads and saves
backend/pharmtech/src/main/java/com/pharmtech/service/BillingService.java - Prescription matching → Medicine inventory: matches medicines
backend/pharmtech/src/main/java/com/pharmtech/controller/OcrController.java - Prescription matching → OCR.space: extracts text
- Data repositories → MySQL database: persists records
- Medicine inventory → Domain records: operates on
backend/pharmtech/src/main/java/com/pharmtech/service/MedicineService.java - Bill processing → Domain records: creates bills
backend/pharmtech/src/main/java/com/pharmtech/service/BillingService.java