Stage 1. User Login & Authentication
The authorized user logs into the Transaction Fraud Detection Application.
Keycloak verifies the user's identity and provides access to the appropriate application functions.
This project is about building a real-time fraud detection platform that uses Apache Kafka, Apache Flink, and BentoML to analyze financial transactions as they happen. The system processes transaction data, calculates risk factors, and uses a machine learning model to quickly identify suspicious or fraudulent transactions. It can also flag or block risky transactions and scale automatically during high transaction volumes.
To design and implement a scalable real-time fraud detection platform using Apache Kafka, Apache Flink, and BentoML to process financial transactions, calculate risk features, and detect fraudulent transactions within seconds.
The authorized user logs into the Transaction Fraud Detection Application.
Keycloak verifies the user's identity and provides access to the appropriate application functions.
The customer or financial system submits a transaction for processing.
The application receives transaction details such as account information, amount, location, and transaction time.
The application validates the submitted transaction.
The application checks the transaction details, account information, and required transaction conditions.
The application checks the transaction for potentially suspicious activity.
The application compares the transaction with predefined rules and available transaction history to identify unusual activity.
The application decides whether the transaction should be approved, held, or rejected.
Based on the fraud and risk checks, the application updates the transaction status and records the decision.
Suspicious transactions are flagged for further review.
The application records the suspicious transaction and displays the relevant information to the authorized user.
The user reviews transaction history and generates required reports.
The application retrieves transaction records and presents transaction history, fraud events, and risk information.
The user completes the activity and logs out of the application.
The application terminates the user's session through Keycloak.
Hosts the complete fraud detection platform. It manages Kafka, Flink, BentoML, and other application containers, controls namespaces, manages workloads, and automatically restarts failed containers.
Receives and manages large numbers of transaction messages in real time. It safely queues transaction data and connects transaction-producing systems with the processing services.
Processes transaction streams in real time. It calculates transaction features, checks time-based patterns, and generates risk-related metrics before sending the data to the machine learning model.
Packages the fraud detection model as a production-ready API. It receives processed transaction data and returns fast fraud or risk predictions.
Used to build and run the machine learning fraud detection model, including Isolation Forest algorithms.
Packages the Flink processing jobs, BentoML inference service, and supporting application components into containers so they run consistently across environments.
Provides the CPU and RAM required to run the self-hosted Kubernetes cluster and its fraud detection workloads.
Provides the standard Linux operating system across the Master Node and Worker Nodes.
Provides the secure private network for the platform and separates public-facing services from internal processing systems.
Control network access and protect the Kafka, Flink, Kubernetes, and machine learning services from unauthorized external access.
Stores transaction logs, historical training data, model files, and archived processing data.
The proposed solution is a real-time fraud detection platform that combines Apache Kafka, Apache Flink, and BentoML to process and detect fraudulent transactions quickly. It runs on a self-hosted Kubernetes cluster using cloud EC2 servers with Ubuntu Server 24.04 LTS, secured inside an cloud VPC. Transaction data first enters Apache Kafka, which safely receives and queues large numbers of transactions. Apache Flink then processes the transactions in real time and calculates important risk features. These features are sent to BentoML, which runs the Scikit-Learn fraud detection model inside Docker containers and provides a fast risk prediction. The platform also monitors transaction processing, model performance, and fraud detection results through a centralized dashboard. Kubernetes provides automatic recovery and scaling when the workload increases, helping maintain reliable and continuous fraud detection.