Logo Lanfrica

Gblack98/msme-alternative-credit-scoring

Domain:

socioeconomic

Record type:

software
Creator:
Gbl
Host:
Alternative credit scoring for MSMEs in Africa using mobile money & behavioral data โ€” Supabase + FastAPI + ML # ๐ŸŒ MSME Alternative Credit Scoring โ€” Africa > Real-time credit scoring API for micro/small businesses in Africa using **alternative data** (mobile money, behavioral signals) โ€” because **80% of MSMEs are unbanked** and excluded from traditional credit. ## Problem Traditional credit scoring requires: bank statements, tax records, collateral, credit history. In Sub-Saharan Africa, **60-80% of adults lack formal banking** โ€” but they do have: - ๐Ÿ“ฑ Mobile money history (Wave, M-Pesa, Orange Money, MoMo) - ๐Ÿ“ž Telecom behavioral data - ๐Ÿ›’ E-commerce transaction history - ๐Ÿ“ Geolocation patterns ## API โ€” Score a Business in Real-Time ```bash curl -X POST api.your-domain.com -H "Content-Type: application/json" -d '{ "business_id": "BIZ-001", "country_code": "SN", "sector": "retail", "years_in_operation": 2.5, "monthly_revenue_usd": 800, "requested_amount_usd": 1500, "loan_purpose": "inventory", "mobile_money": { "total_transactions_90d": 45, "total_volume_usd_90d": 3200, "has_regular_income": true } }' ``` **Response:** ```json { "credit_score": 680, "risk_band": "B", "decision": "approved", "max_loan_amount_usd": 1500, "recommended_rate_pct": 12.0, "explanation": [ "โœ… High mobile money activity โ€” strong financial engagement", "โœ… Business established for 2.5 years", "โœ… Regular income pattern detected" ] } ``` ## Stack ``` FastAPI โ†’ REST API (scoring endpoint, <100ms latency) Supabase โ†’ PostgreSQL + RLS + real-time audit log LightGBM โ†’ ML scoring model (trained on historical repayment data) dbt โ†’ Feature engineering from raw transactions ``` ## Countries Supported Senegal ๐Ÿ‡ธ๐Ÿ‡ณ ยท Cรดte d'Ivoire ๐Ÿ‡จ๐Ÿ‡ฎ ยท Nigeria ๐Ÿ‡ณ๐Ÿ‡ฌ ยท Kenya ๐Ÿ‡ฐ๐Ÿ‡ช ยท Ghana ๐Ÿ‡ฌ๐Ÿ‡ญ ยท Cameroon ๐Ÿ‡จ๐Ÿ‡ฒ ## Setup ```bash pip install -r requirements.txt cp .env.example .env # Add SUPABASE_URL, SUPABASE_KEY supabase db push # Apply migrations uvicorn app.main:app --reload ``` ## Author **Ibrahima Gabar Diop** โ€” GitHub ยท Kaggle