# đ°đȘ Kenya Localized ERP Suite (Core MVP)
An offline-first, double-entry Enterprise Resource Planning (ERP) prototype tailored specifically for the Kenyan regulatory and retail/wholesale ecosystem.
---
## đ Key Pillars & Features
* **Real-Time Double-Entry General Ledger:** Atomic transactions enforce strict balancing ($$\sum \text{Debits} = \sum \text{Credits}$$) across Assets, Liabilities, Equity, Revenue, and COGS on every checkout and restock.
* **Perpetual Inventory Valuation:** Automatically records Cost of Goods Sold (COGS) and decrements inventory asset value in real time on every checkout.
* **Mock KRA eTIMS SCU Engine:** Generates realistic cryptographic invoice signatures, Control Unit serial numbers, and scannable verification QR codes offline.
* **M-Pesa Daraja 3.0 Simulator:** Fast STK push emulation with automated reference tracking and one-click reconciliation.
* **Role-Based Separation:**
* **Cashier View (`/`):** Fast catalog search, barcode-ready basket, split tender, and printable thermal tax dockets without exposing business margins.
* **Admin Portal (`/admin`):** Protected by PIN (`1234`), providing live gross profit margins, inventory purchasing (PO) workflows, audit diagnostics, and General Ledger inspection.
---
## đïž System Architecture
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â Unified Frontend â
â (Cashier POS View | Protected Admin) â
âââââââââââââââââââââââââââââŹâââââââââââââââââââââââââââââ
â
âââââââââââââââââââââââââââââŒâââââââââââââââââââââââââââââ
â FastAPI Core Engine â
âââââââââââââââââââââââââââââŹâââââââââââââââââââââââââââââ€
â Double-Entry Accounting â KRA eTIMS Mock Signer â
â (Perpetual FIFO Ledger) â (HMAC SHA256 + QR Gen) â
âââââââââââââââââââââââââââââŒâââââââââââââââââââââââââââââ€
â M-Pesa Loopback Engine â Automated Audit Inspector â
â (Daraja Emulation Rails) â (Zero-Sum Integrity) â
â âŠ