A fintech platform that enables parents to pay school fees in flexible installments using the M-Pesa API. It also provides automated payment tracking and credit scoring to improve access to education.
# 📊 FlexiFees: AI-Powered Student Finance & Fraud Monitor
FlexiFees is a smart financial management ecosystem designed for educational institutions. It leverages the M-Pesa API for seamless fee collection and utilizes Machine Learning to detect fraudulent payment patterns in real-time.
---
## 📖 About the Project
**The Problem:** Many schools in Kenya face challenges with manual fee tracking and "ghost" payment claims. Verification is slow, and financial leakage often goes unnoticed.
**The Solution:** FlexiFees digitizes the payment lifecycle. By integrating an **ML Anomaly Detection engine**, the platform automatically flags suspicious transaction behaviors—such as unusual payment velocities or amount outliers—allowing administrators to intervene before losses occur.
---
## 🚨 Key Features
- **M-Pesa STK Push:** Direct, secure fee payments from the app to the school's till.
- **ML Fraud Monitor:** Uses an **Isolation Forest** model to identify high-risk transactions based on Z-scores and time-of-day patterns.
- **Live Analytics Dashboard:** Real-time visualization of collection rates, outstanding balances, and flagged anomalies.
- **Automated Pipeline:** Self-training ML model that updates its baseline as more transaction data is ingested.
---
## 🛠️ Tech Stack & AI Tools
- **Backend:** FastAPI (Python), SQLAlchemy, SQLite.
- **Data Science:** Scikit-Learn (Isolation Forest), Pandas, NumPy, Joblib.
- **Frontend/Dashboard:** Streamlit, Plotly, Streamlit-Autorefresh.
- **DevOps:** Docker & Docker Compose (WSL 2 Optimized).
- **AI Collaborator:** Gemini 3 Flash (used for architecture optimization and code refactoring).
---
## 👥 The Team
| Name | Role | Contact |
| :--- | :--- | :--- |
| **Maxwell Oduor** | Data Science & MLOps | maxwelloduor55@gmail.com |
| **Salha Benazir** | Backend Engineer | salhabenazir@gmail.com |
| **Leonida Jeptoo** | Frontend/UX Designer | jeptooleonida@gmail.com |
| **Bevon Mokua** | Backend & Database | bevonmokuas@gmail.com |
| **Pe …