# KenyaLend Intelligence
KenyaLend Intelligence is a backend platform for Kenyan digital lenders that combines customer intelligence, churn prediction, credit scoring, statement processing, and loan decisioning in a single FastAPI service. The project is designed as an API-first foundation for lenders that want to combine internal loan and customer data with M-Pesa statements, bank statements, and external macroeconomic datasets.
> **Project status:** Alpha (`0.1.0`). Several endpoints and integrations are scaffolded and documented for extension, while some workflows still use placeholder logic or TODO-backed implementations.
## Table of Contents
- What This Project Does
- Core Capabilities
- Architecture at a Glance
- Technology Stack
- Repository Layout
- Domain Model
- API Surface
- Machine Learning Components
- External Data and Integrations
- Configuration
- Prerequisites
- Quick Start: Local Python Environment
- Quick Start: Docker Compose
- Database Migrations
- Authentication and Authorization
- Running Tests and Quality Checks
- Deployment
- Operational Notes
- Development Workflow
- Security and Compliance Considerations
- Roadmap
- Troubleshooting
- Contributing
- License
## What This Project Does
KenyaLend Intelligence helps digital lending teams make more informed customer and loan decisions by providing APIs for:
1. **Customer management** - Create, search, update, and inspect borrower profiles.
2. **Loan lifecycle operations** - Submit applications, approve or reject loans, and summarize portfolio state.
3. **Credit decisioning** - Generate credit scores, risk levels, affordability estimates, default probabilities, and loan recommendations.
4. **Churn prediction** - Identify customers at risk of inactivity or attrition and segment customer cohorts.
5. **Retention actions** - Generate recommendations and track intervention actions for at-risk customers.
6. **Statement ingestion** - Upload M-Pesa and bank …