Back to projects

projects / POS-System

Point of Sale (POS) System

Fast, offline-tolerant checkout for retail counters.

  • React.js
  • Next.js
  • Node.js
  • Express.js
  • MySQL
Faster
Checkout time per transaction
Live
Inventory sync on every sale
Auditable
End-of-shift cash reconciliation

The challenge

A retail client needed a checkout system that stayed fast under real store conditions — quick item lookup, flexible discounts, and no data loss during brief connectivity drops.

The solution

Built a POS web app covering cart management, barcode-based product lookup, discounts/taxes, receipt printing, and shift/cash-drawer reconciliation, backed by a Node.js API and MySQL.

  • Checkout
  • Inventory Sync
  • Receipts
  • Shift Reports

System design

  1. FrontendReact/Next.js counter UI optimized for keyboard + barcode scanner input
  2. API GatewayExpress.js REST API handling sales, refunds, and shift sessions
  3. ServicesInventory service decrements stock on each completed sale
  4. DatabaseMySQL storing transactions, line items, and shift audit logs

Engineering notes

API design

How the system talks

  • Idempotent sale-creation endpoint so a retried request never double-charges a cart
  • Every sale, refund, and discount override written to an audit log for shift reconciliation

Performance

What keeps it fast

  • Local cart state kept in-memory so item scanning and totals update instantly
  • Product lookups indexed by barcode/SKU for near-instant search at the counter

Challenges

What was hard to get right

  • Keeping the checkout flow usable for non-technical cashiers under time pressure
  • Making sure stock counts stay accurate when sales and refunds happen back-to-back

Lessons learned

What I'd carry into the next project

  • UI speed at the counter matters as much as backend correctness — every extra click costs real time
  • Clear audit trails build staff trust in the system faster than any training session