pos-systemslisted
Install: claude install-skill rkaliev/eng-kit
# POS systems
A POS must keep selling when the network, the server or a device fails, and every sale must end up correct in the books and with the tax authority. Load payments-and-money too. It governs amounts, idempotency and card data.
## Offline-first
- **The local store is the source of truth at the till.** Sales, receipts and shift state are written durably on the device first (SQLite/Room/Core Data, with WAL and transactions), then synced.
- **Sync queue:**
- operations get client-generated UUIDs and are idempotent on the server;
- retry with backoff;
- the server keeps an ordering per device;
- conflicts resolve by explicit rules (catalog: server wins; sales: append-only, never overwritten).
- **Time:** the device clock drifts. Store both the device time and the server receive time. Never trust device time for security decisions.
- **Catalog and prices** are cached with a version. The receipt snapshots the price, tax and discount that applied at sale time.
- Test by killing the process mid-sale, cutting the network mid-payment, filling the disk, and restoring from backup.
## Fiscalization and receipts
- **Receipts are immutable.** Mistakes are fixed with a refund or correction receipt, never by editing. Fiscal documents are numbered sequentially without gaps.
- The fiscal rules depend on the jurisdiction. **Identify it and ask.** In Russia, 54-ФЗ applies:
- an online cash register (ККТ) with a fiscal drive (ФН);
- transmission through an ОФД;
- the f