FraudSense is a real-time fraud detection system built to enhance the security of mobile money transactions in Sub-Saharan Africa. Using an LSTM-based neural network and microservices architecture, the system detects anomalies with high accuracy and supports real-time monitoring, alert management, and reporting.
# FraudSense – Mobile Money Fraud Detection System
FraudSense is a real-time fraud detection system tailored to the mobile money ecosystem. It integrates Apache Kafka, XGBoost, FastAPI, PostgreSQL, and a Flutter web dashboard to help banks and regulators identify fraudulent transactions as they happen.
---
## 📁 Project Structure
- **Backend/** – Python-based backend logic
- `kafka/` – Kafka producer & consumer
- `model_serving/` – Model loading and prediction
- `venv/` – Python virtual environment
- `requirements.txt` – Python package dependencies
- `test.json` – Sample transaction data
- **lib/** – Flutter app logic and UI components
- **assets/** – Images and design assets
- **android/**, **ios/**, **macos/**, **linux/**, **web/** – Platform-specific Flutter targets
- **test/** – Testing files
- **pubspec.lock** – Flutter dependency lock file
---
## Key Features
- Real-time fraud detection using Kafka streaming
- ML model powered by XGBoost
- REST API built with FastAPI
- Flutter web dashboard for alerts
- PostgreSQL for alert storage and reporting
- Deployment-ready on DigitalOcean
---
## Technology Stack
- **Backend**: Python, FastAPI, Kafka, XGBoost
- **Frontend**: Flutter (Web)
- **Database**: PostgreSQL
- **DevOps**: DigitalOcean, SCP, pm2/systemctl
---
## Getting Started
### 1. Clone the Repository
```bash
git clone
github.com
cd Fraud-detection-app
```
---
## 🛠️ Backend Setup
```bash
cd Backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn fastapi_app:app --reload
```
---
## PostgreSQL Setup
Create a new database:
```bash
psql -U postgres
CREATE DATABASE fraudsense_db;
```
Restore the schema:
```bash
psql -U postgres -d fraudsense_db < fraudsense_backup.sql
```
---
## Kafka Setup
Start Zookeeper and Kafka:
```bash
./bin/zookeeper-server-start.sh -daemon ./config/zookeeper.properties
./bin/kafka-server-start.sh -daemon ./config/server.properties …