INDEX
#03
SYSTEM INDEX03
TIMELINE2025 - 2026
ENGINEERING ROLEFull-Stack Engineer

PharmaSys

Enterprise Pharmacy Inventory & Multi-Branch POS System

PharmaSys screenshot
01 // THE PROBLEM

Local community pharmacies routinely suffer financial losses and safety hazards from untracked medication expirations, manual inventory errors, and unverified dispensing in paper registers.

02 // LOCAL CONSTRAINTS

Staff have diverse technical literacy; cashier checkouts must be fast, offline-tolerant, and require zero manual batch calculation during high-volume periods.

03 // ENGINEERED SOLUTION

Engineered a centralized ERP-level pharmacy management system featuring automated FEFO (First-Expiry First-Out) stock depletion, real-time expiry warning thresholds, multi-branch POS terminal transactions, purchasing orders, and role-based access control.

SYSTEMS DESIGN TOPOLOGY // VISUAL ARCHITECTURE

PharmaSys: Strict FEFO Inventory & POS Pipeline

Atomic batch-level depletion with First-Expiry First-Out row-locking

POS Terminal
Cashier / Branch Admin
01
RBAC Security
Role Authorization
02
FEFO Controller
Batch Allocator
03
Row Lock Engine
Atomic Isolation
04
MySQL Ledger
Products & Batches
05
REQUEST LIFECYCLE & EXECUTION PATH

When a cashier initiates a sale, the POS controller triggers an atomic transaction. Batches are selected strictly ordered by earliest expiry_date (ASC) with FOR UPDATE row locks. Stock decrements across consecutive batches until the requested volume is fulfilled, immediately logging an immutable audit record.

SYSTEM REACHReal-Time POS Checkout
RESILIENCE STRATEGY32% Expiry Loss Reduction & Immutable Audit Trail
[ARCHITECTURAL DECISIONS & ENGINEERING TRADEOFFS]
Strict FEFO Batch Allocation

Implemented automated database triggers and service checks that force stock dispensing from the nearest expiration batch, eliminating shelf spoilage.

Role-Based Audit Logging (RBAC)

Enforced separated permission tiers (Owner, Administrator, Cashier) with immutable change logs on all stock adjustments and cash registers.

Normalized Relational Schema

Structured batches, products, suppliers, and transaction line items in MySQL to guarantee audit consistency across multi-branch expansion.

[DEPLOYMENT MATRIX & STACK]
LaravelMySQLJavaScriptRBAC ArchitecturePOS TerminalChart.js