# π°πͺ 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) β
β β¦