POS for Retail Chain
POS Chuỗi Cửa hàng Bán lẻ
Multi-branch POS with real-time stock & revenue sync, 80mm thermal printing, e-invoice.
Problem
A 22-store accessories chain with patchy internet. The old POS was online-only → lost sales when the network dropped. Management had no real-time revenue view. Accounting reconciled MISA manually every month-end.
Architecture
Electron POS → local SQLite (WAL) → background delta-sync to cloud Postgres every 30 s over HTTP/2 → SSE to HQ dashboard. MISA integration via webhook. VNPT e-invoice auto-issued for orders >200k VND.
Stack & rationale
- Local-first SQLite: POS works fully offline; syncs when online.
- Delta sync (cursor-based diffs): ~100× bandwidth savings vs full snapshot.
- Electron over web: needs USB thermal printers, staff is used to Windows.
Results (1 year)
| Metric | Value |
|---|---|
| Stores deployed | 22 |
| Avg orders / day | 4,200 |
| Revenue reporting variance | <0.05% |
| POS-caused downtime | 0 (sales continue offline) |
Lessons
Local-first is magic for retail POS in Vietnam — internet is still flaky. SSE is enough for one-way HQ dashboards (no WebSocket). MISA's API rate limits are strict → queue + exponential retry.