SmartPOS ERP
Mobile Retail Point-of-Sale & Inventory System
The Engineering Challenge
Handling strict serial-number/IMEI tracking under rapid barcode scanning bursts with sub-second receipt printing and offline stock threshold reconciliation.
A cross-platform desktop POS application tailored for mobile phone stores and electronics retailers, featuring multi-attribute variant inventory tracking, unique IMEI device verification, fast checkout, printable receipts, and automated profit/loss margin calculations.
Core Architectural Responsibilities
- Architected offline-resilient local POS transaction engine using Laravel and NativePHP.
- Designed multi-attribute stock indexing for device color, storage, and carrier lock variants.
- Integrated real-time barcode reader event streams with instant checkout calculation.
- Constructed automated daily profit/loss reporting and low-stock telemetry alerts.
System Architecture
Desktop runtime communicates with local SQLite cache for instantaneous barcode scans, then synchronizes committed invoice batches with the central MySQL cluster upon network confirmation.
Desktop Host (NativePHP)
Cross-platform desktop application runtime with local hardware hooks.
Barcode/IMEI Scanner Pipe
Raw serial stream parser with debounced transaction accumulation.
Invoice Engine
Transactional receipt builder with tax and discount calculation.
Inventory Ledger
Multi-variant stock levels and serial track records.
Report Generator
Automated P&L statements and inventory reorder alerts.
Key Technical Decisions & Trade-Offs
NativePHP Desktop Packaging
Allowed shipping a unified Laravel codebase as a native desktop binary with direct access to barcode printers.
Optimistic Stock Reservation
Items are held with short lease timers in memory to prevent double-sale during concurrent register checkout.
Asynchronous PDF Receipt Streaming
Thermal printer rasterization occurs in a background worker, keeping register response time instantaneous.
Technologies Deployed
Lessons Learned & Retrospective
- Observation #1: Hardware barcode scanners emit rapid keystroke events requiring strict debouncing.
- Observation #2: IMEI checksum algorithms (Luhn formula) should be validated on the client before network dispatch.