Identity verification microservice for Cameroon (CNI, Passeport, liveness, face match)
# webank-verify
Identity verification microservice for Cameroon — Didit.me-style KYC engine built on open-source ML.
> CI builds and pushes Docker images to GHCR on every merge to `master` (tagged `:latest`) and `develop` (tagged `:develop`).
## What it does
- **Document OCR**: Extract NOM, PRENOM, DOB, N°, expiry from Cameroonian CNI, récépissé and Passeport (easyocr, French)
- **MRZ parsing**: Machine-readable zone extraction from passports
- **Face matching**: Selfie vs ID photo comparison using deepface ArcFace (similarity score)
- **Passive liveness detection**: Multi-frame analysis — liveness score, face quality, occlusion, luminance
- **Duplicate face detection**: Warn when a face matches an existing approved user
- **Stable biometric `person_id`**: One key per real person (face-cluster), assigned on document approval and emitted in the KYC webhook for downstream identity dedup (ADR 0005)
- **IP intelligence**: Geolocation (MaxMind GeoLite2), VPN/proxy/Tor detection
- **Fraud risk scoring**: Weighted aggregate (0–100) with warnings engine
- **Operator dashboard**: Didit.me-style React SPA for reviewing and approving verifications
- **Webhook delivery**: HMAC-SHA256 signed events to the BFF (kyc.level2.approved, etc.)
- **Audit trail**: Full event log for every verification
## Relationship to webank-kyc-manager (deprecated)
webank-verify replaces the deprecated `webank-kyc-manager` service for identity
verification (document OCR, liveness, biometric dedup). It is **not** a drop-in
replacement — the BFF uses a separate `webankverify` client
(`bff/internal/webankverify/client.go`) pointed at `WEBANK_VERIFY_BASE_URL`.
OTP delivery is handled by a separate SMS gateway service
(`fineract-adorsys-sms-gateway`) via `SMS_GATEWAY_BASE_URL`.
## Quick start
```bash
cp .env.example .env
# Edit .env with your settings
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8070
# Admin dashboard
open
localhost
# Health check
curl …