Koperasi Kegelapan NFC Wallet — Specification Hub
This site contains the full specification for the Koperasi Kegelapan offline NFC wallet system: a tap-based payment system that operates without real-time backend connectivity, storing encrypted wallet state on NTAG215 NFC cards.
Spec Layers
| Layer | Status | Folder |
|---|---|---|
| 1. Product Spec | ✅ Complete | docs/product-spec/ |
| 2. System Design | ✅ Complete | docs/system-design/ |
| 3. Tech Specs | ✅ Complete | docs/tech-specs/ |
| 4. API Spec | ✅ Complete | docs/api-spec/ |
| 5. Data Spec | 🚧 Planned | docs/data-spec/ |
| 6. Security Spec | 🚧 Planned | docs/security-spec/ |
| 7. Test Spec | 🚧 Planned | docs/test-spec/ |
| ADRs | ✅ Complete | docs/adr/ |
Quick Links
- Core objective — What the system is and why it exists
- Acceptance criteria — AC-01 through AC-14
- Card state machine — IDLE → CHECKED_IN → CHECKED_OUT
- Cryptographic model — AES-256-GCM, HMAC-SHA256, HKDF
- API overview — Base URL, auth, error format
- Hardware constraints — NTAG215 / NTAG216 specs
Architecture Decision Records
Six key decisions are recorded in the ADR folder:
- A/B buffer write strategy — NFC write non-atomicity and recovery
- AES-GCM cipher choice — Web Crypto API constraint and AEAD rationale
- NTAG215 production baseline — Commodity hardware, byte budget
- Offline trust model — Session grants, deferred reconciliation
- Hash-chain log — Tamper-evident on-card transaction log
- Balance ceiling — uint32 with Rp 16 M operational cap