Logo Lanfrica

s0ulhacks/CoreTrust

Domaine:

digital infrastructure

Type de record:

software
Créateur:
s0u
Hôte:
An intelligent identity reconciliation engine built to bridge Nigeria's fragmented ID systems. Using fuzzy matching and automated conflict resolution, Resolv aligns NIN, BVN, and other mismatched records to prevent economic lockout and ensure seamless access to essential services. # CoreTrust > AI-powered fraud intelligence middleware for Nigerian payments. > Scores every transaction before it completes — so merchants decide, not algorithms alone. --- ## What It Does CoreTrust sits between your payment form and your payment processor (Squad). Before a single kobo moves, it analyzes the transaction using a hybrid fraud engine — rule-based scoring calibrated on the NIBSS dataset combined with a trained XGBoost machine learning model — then generates a plain-English AI explanation via Gemini. The merchant sees the risk score, the signals, the ML probability, and the reasoning — then decides to approve, flag, or block. Only on approval does Squad's checkout open for the customer. **Fraud stopped before it starts. Not cleaned up after.** --- ## The Flow ``` Customer fills checkout form ↓ CoreTrust scores transaction (rules + XGBoost ML + Gemini AI) ↓ Merchant sees risk dashboard immediately ↓ ┌────┴─────┬──────────┐ Approve Flag Block ↓ ↓ ↓ Squad Held — Killed — opens fraud team Squad never notified opens ``` --- ## Tech Stack | Layer | Technology | |---|---| | Frontend | React + Vite, React Router v6 | | Backend | Python, FastAPI | | Rule Engine | Rule-based scoring against NIBSS dataset (pandas) | | ML Model | XGBoost classifier trained on NIBSS fraud dataset | | AI Explanation | Google Gemini (`gemini-2.0-flash-lite`) | | Payment Processing | Squad sandbox API | | Dataset | NIBSS fraud dataset (1,000,000 transactions, 50k sampled at runtime) | --- ## Project Structure ``` coretrust/ │ ├── main.py # FastAPI app — all routes ├── models.py # Pydantic request/response models ├── fraud_engine.py # Ensemble scoring — rules + ML combined ├── ml_engine.py # XGBoost model loader + predict_fraud() ├── ai_explainer.py # Gemini explanation generator ├── dataset_loader.py # NIBSS CSV loader + stats computer ├── squad_client.py # A …