SimuSalama - Device Trust, Recovery and Financial Intelligence SaaS Platform for Africa
# π¨ SimuSalama
> **The Device Trust, Recovery & Financial Intelligence SaaS Platform for Africa.**
---
## 01. Overview
SimuSalama is an open-source device trust and SaaS financial intelligence platform built to make stolen smartphones impossible to resell, empower phone shops and retail businesses to avoid fraud loss, protect online marketplaces, and track device business revenue through M-Pesa.
SimuSalama combines two core engines:
1. **Engine A β Device Trust & Recovery Engine**: Multi-IMEI validation, Luhn checksums, signed Device Passports, theft reporting with Kenya Police OB numbers, and tamper-evident evidence chains of custody.
2. **Engine B β Financial Intelligence Engine**: Real-time SaaS MRR/ARR, gross/net revenue tracking, M-Pesa automated transaction ledgers, operating expense management, and Device Economics loss-avoidance intelligence.
---
## 02. Architecture & Monorepo Structure
```
simusalama/
βββ apps/
β βββ web/ # Next.js 15 App Router frontend & API routes
βββ packages/
β βββ database/ # Prisma schema (40+ models), client & seed
β βββ types/ # Shared TypeScript types & enums
β βββ validation/ # Zod validation schemas
β βββ imei/ # IMEI validation, Luhn algorithm & masking
β βββ finance/ # Financial calculations (MRR, ARR, margins, loss avoided)
β βββ payments/ # M-Pesa Daraja payment abstraction & mock provider
β βββ security/ # SHA-256 evidence hashing & chain-of-custody
β βββ ui/ # Styling utilities & icons
βββ package.json # Turborepo + pnpm workspace root
```
---
## 03. Key Features
- **Public IMEI Verification** (`/verify` & `GET /api/v1/verify/:imei`):
- 15-digit format check and Luhn algorithm checksum.
- Returns device model, blacklist state, and explainable risk score (0β100).
- Strict privacy rules: never exposes owner name, phone, email, or private evidence.
- **Theft Reporting & Cases** (`/report-theft` & `/da β¦