Skip to content

M2 Fraud Detection is a real-time fraud detection platform for financial transactions.

License

Notifications You must be signed in to change notification settings

m-a-h-b-u-b/M2-Fraud-Detection-AI

Repository files navigation

M2 Fraud Detection System

A real-time fraud detection platform for financial transactions

Node.js Python Docker Redis

Overview

M2 Fraud Detection is a real-time fraud detection platform for financial transactions. It integrates:

  • Node.js API for transaction ingestion
  • Kafka for real-time streaming
  • Machine Learning (Isolation Forest) for anomaly detection
  • Redis for caching and blacklisting
  • Decision Engine for automatic actions (APPROVE, FLAG, BLOCK)
  • React/Next.js Dashboard for live monitoring

Contact


Features

  • Modular Architecture Includes modules for API, dashboard, decision engine, ML service, Kafka messaging, and Redis caching.
  • Real-Time Fraud Detection Processes transaction streams and applies ML models to identify suspicious activity.
  • Docker & Docker-Compose Support Containerized deployment for all services ensures easy setup and scaling.
  • Transaction Generator Simulate transactions for testing and ML model training.
  • Scalable Messaging System Uses Kafka for real-time transaction streaming and asynchronous processing.

Technologies Used

  • Backend: Node.js, Express.js
  • Frontend: React.js / Dashboard
  • Database & Cache: Redis
  • Messaging: Apache Kafka
  • ML Service: Python (Scikit-learn / TensorFlow / PyTorch)
  • Containerization: Docker & Docker-Compose
  • Other Tools: Git, ESLint, Prettier

Architecture of M2 Fraud Detection

+----------------+        +----------------+
|  Transaction   | ---->  |     API        | ----> CRUD & Stream
|   Generator    |        +----------------+
+----------------+                |
                                   v
                         +--------------------+
                         |  Decision Engine   | --> Fraud Detection Logic
                         +--------------------+
                                   |
                                   v
                         +--------------------+
                         |  ML Service        | --> Predicts Fraud Probability
                         +--------------------+
                                   |
                                   v
                          +------------------+
                          |   Kafka Broker    | --> Stream Processing
                          +------------------+
                                   |
                                   v
                         +--------------------+
                         |     Dashboard      | --> Real-time Visualization
                         +--------------------+

Setup & Installation

Prerequisites

  • Docker & Docker-Compose installed
  • Node.js & npm installed (for local development)
  • Python 3.x (for ML service)
  • Kafka & Redis (or via Docker containers)

Clone the Repository

git clone https://github.com/m-a-h-b-u-b/M2-Fraud-Detection.git
cd M2-Fraud-Detection

Running with Docker

docker-compose up --build

This will start all modules:

  • API server
  • Dashboard
  • Decision engine
  • ML service
  • Kafka broker
  • Redis server

Running Locally

  1. API Service
cd api
npm install
npm start
  1. Dashboard
cd dashboard
npm install
npm start
  1. ML Service
cd ml-service
pip install -r requirements.txt
python ml_service.py

Usage

  • Transaction Simulation: Use generate_transactions.js to simulate transactions:
node generate_transactions.js
  • Access Dashboard: Open http://localhost:3000 in your browser to monitor transactions in real-time.

  • API Endpoints: The API provides CRUD operations for transactions and fraud analysis. Example:

GET /api/transactions
POST /api/transactions
GET /api/fraud/:transactionId

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-name)
  3. Make your changes
  4. Commit your changes (git commit -m "Add feature")
  5. Push to the branch (git push origin feature-name)
  6. Create a Pull Request

Please ensure code follows the project’s style and ESLint rules.


License

Apache 2.0 License
Dual License

This project is dual-licensed:

  • Open-Source / Personal Use: Apache 2.0
  • Commercial / Closed-Source Use: Proprietary license required

For commercial licensing inquiries or enterprise use, please contact: mahbub.aaman.app@gmail.com

About

M2 Fraud Detection is a real-time fraud detection platform for financial transactions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published