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 β¦