Web Application
Year 3 (2026-2027)
PharmaCare: Pharmacy Inventory Management and Point-of-Sale (POS) System
Note: Source code ZIPs & GitHub links are protected. Please sign in to download source code.
Video Presentation & Short Movie Walkthrough
HD Video PlayerProject Overview
PharmaCare is a comprehensive, web-based Pharmacy Management and Point-of-Sale (POS) System developed using Laravel 11, MySQL, and server-side Blade templates with a custom Corporate Slate CSS design system. The application is designed for retail pharmacies to streamline daily operations, manage drug inventories, enforce patient safety via automated expiry monitoring, and process cashier sales using atomic database transactions.
1. System Architecture:
The application follows the classic Model-View-Controller (MVC) architectural pattern. It uses server-rendered Blade views without external API/JSON overhead, coupled with vanilla JavaScript for client-side state management (localStorage and sessionStorage). Routes and sensitive modules are protected using custom Role-Based Access Control (RBAC) middleware.
2. Database Design:
The relational schema comprises 5 core normalized tables:
- users: Stores staff credentials and system access roles (admin, pharmacist, cashier).
- categories: Classifies drugs into master therapeutic categories.
- medicines: Maintains the drug catalog including generic names, auto-generated barcodes, unit prices, purchase costs, current stock levels, expiry dates, image paths, and status flags.
- sales: Logs completed financial transactions, invoice numbers, customer IDs, cashier foreign keys, and payment methods (Cash, ABA / KHQR, Card).
- sale_items: Decouples past sales from future drug price fluctuations by recording transaction-level quantity, unit price, and subtotal at the exact second of purchase.
3. Core Software Modules:
- Authentication & RBAC Module: Restricts access so Cashiers access POS, Pharmacists manage inventory, and Admins oversee financial analytics. Public registration is disabled for enterprise security.
- Inventory Management Module: Handles full Category and Medicine CRUD operations, file uploads to local storage, and automatic SKU/barcode generation.
- Expiry & Safety Engine: Automatically categorizes drugs (Safe, Near Expiry within 30 days, Expired) and runs via an Artisan CLI command (pharmacy:check-expiry).
- Point-of-Sale (POS) Engine: Facilitates retail checkout with real-time stock deduction, concurrency row-level locking (lockForUpdate), and safety locks that block the sale of expired drugs.
- Sales & Invoicing Module: Generates thermal receipts with print-optimized styling (@media print) and maintains searchable sales audit logs.
1. System Architecture:
The application follows the classic Model-View-Controller (MVC) architectural pattern. It uses server-rendered Blade views without external API/JSON overhead, coupled with vanilla JavaScript for client-side state management (localStorage and sessionStorage). Routes and sensitive modules are protected using custom Role-Based Access Control (RBAC) middleware.
2. Database Design:
The relational schema comprises 5 core normalized tables:
- users: Stores staff credentials and system access roles (admin, pharmacist, cashier).
- categories: Classifies drugs into master therapeutic categories.
- medicines: Maintains the drug catalog including generic names, auto-generated barcodes, unit prices, purchase costs, current stock levels, expiry dates, image paths, and status flags.
- sales: Logs completed financial transactions, invoice numbers, customer IDs, cashier foreign keys, and payment methods (Cash, ABA / KHQR, Card).
- sale_items: Decouples past sales from future drug price fluctuations by recording transaction-level quantity, unit price, and subtotal at the exact second of purchase.
3. Core Software Modules:
- Authentication & RBAC Module: Restricts access so Cashiers access POS, Pharmacists manage inventory, and Admins oversee financial analytics. Public registration is disabled for enterprise security.
- Inventory Management Module: Handles full Category and Medicine CRUD operations, file uploads to local storage, and automatic SKU/barcode generation.
- Expiry & Safety Engine: Automatically categorizes drugs (Safe, Near Expiry within 30 days, Expired) and runs via an Artisan CLI command (pharmacy:check-expiry).
- Point-of-Sale (POS) Engine: Facilitates retail checkout with real-time stock deduction, concurrency row-level locking (lockForUpdate), and safety locks that block the sale of expired drugs.
- Sales & Invoicing Module: Generates thermal receipts with print-optimized styling (@media print) and maintains searchable sales audit logs.
Key System Features & Functionalities
- Role-Based Access Control (RBAC): Dedicated access permissions and UI visibility for Admin, Pharmacist, and Cashier roles enforced via custom middleware.
- Atomic POS Checkout Engine: Uses DB::beginTransaction and pessimistic row locking (lockForUpdate) to prevent race conditions and ensure negative stock quantities are impossible during concurrent checkouts.
- Medicine Expiry Safety Lock: Automated system-level safety rule that flags expired medications and strictly prevents cashiers from processing expired items at POS.
- Client-Side Cart & ID Persistence: Utilizes localStorage to keep the cashier cart intact across category filters and sessionStorage to maintain a unique chronological Customer ID (CUST-YYYYMMDDHHmmss).
- Inventory & Low-Stock Alerts: Automated visual warning badges and status updates when stock levels fall below safety thresholds (<= 10 units).
- Printable Invoice Receipts: Formatted receipt views with dedicated @media print CSS rules that hide navigation bars and print clean thermal customer receipts.
- Financial Audit Integrity (Price Decoupling): Captures historical unit prices in the sale_items table at checkout, preserving past financial reports against future price changes.
- Automated Background Expiry Scanner: Custom Artisan command (pharmacy:check-expiry) to scan catalog tables and update status flags.
- Executive Analytics Dashboard: Dynamic KPI cards displaying real-time calculations for Total Revenue, Today's Sales, Active Medicines, Low Stock, and Expired Drugs.
- Custom Slate Design System: Lightweight, framework-free CSS architecture (layout.css, dashboard.css, index.css, form.css, show.css) with Bootstrap vector icons.
- Atomic POS Checkout Engine: Uses DB::beginTransaction and pessimistic row locking (lockForUpdate) to prevent race conditions and ensure negative stock quantities are impossible during concurrent checkouts.
- Medicine Expiry Safety Lock: Automated system-level safety rule that flags expired medications and strictly prevents cashiers from processing expired items at POS.
- Client-Side Cart & ID Persistence: Utilizes localStorage to keep the cashier cart intact across category filters and sessionStorage to maintain a unique chronological Customer ID (CUST-YYYYMMDDHHmmss).
- Inventory & Low-Stock Alerts: Automated visual warning badges and status updates when stock levels fall below safety thresholds (<= 10 units).
- Printable Invoice Receipts: Formatted receipt views with dedicated @media print CSS rules that hide navigation bars and print clean thermal customer receipts.
- Financial Audit Integrity (Price Decoupling): Captures historical unit prices in the sale_items table at checkout, preserving past financial reports against future price changes.
- Automated Background Expiry Scanner: Custom Artisan command (pharmacy:check-expiry) to scan catalog tables and update status flags.
- Executive Analytics Dashboard: Dynamic KPI cards displaying real-time calculations for Total Revenue, Today's Sales, Active Medicines, Low Stock, and Expired Drugs.
- Custom Slate Design System: Lightweight, framework-free CSS architecture (layout.css, dashboard.css, index.css, form.css, show.css) with Bootstrap vector icons.
Ratings & Feedback
Project Ratings & Reviews
Ratings and feedback from students, faculty supervisors, and visitors.
4
out of 5 stars
Based on 1 review
5
0 (0%)
4
1 (100%)
3
0 (0%)
2
0 (0%)
1
0 (0%)
Want to rate or review this project?
Please log in with your Student or Lecturer account to leave star ratings and comments.
Reviews & Feedback (1)
Mr. Mon Minh
Faculty Supervisor
1 week ago
Academic Meta
Lecturer:
Mr. Mon Minh
Subject:
Web Application Development
Degree:
Bachelor of Science in Information Technology
Semester & Year:
Year 3 (2026-2027)