This project is a real-time fraud detection system built using a modern data pipeline architecture. It integrates multiple tools for data ingestion, processing, modeling, and analysis, orchestrated with Docker and Apache Airflow.
- Bank System: Simulated transaction data source.
- Kafka: Real-time streaming platform to capture and forward transaction data.
- Apache Spark: Performs real-time processing and scoring of streaming data.
- Gmail API: Sends alert notifications when fraudulent activity is detected.
- MLflow: Used for model tracking, versioning, and experiment logging.
- Training Service: Responsible for training fraud detection models.
- MinIO: Object storage to save trained models (S3 compatible).
- PostgreSQL: Stores structured training data and metadata.
- Apache Airflow: Manages DAGs for ETL, training, and monitoring pipelines.
- PostgreSQL: Backend metadata database for Airflow.
- Celery + Redis: Used for distributed task queuing and execution in Airflow.
- Google BigQuery: Centralized data warehouse for transaction logs and model results.
- Power BI: Business Intelligence dashboard for fraud trend analysis and reporting.
All services are containerized with Docker for reproducibility and scalability:
airflow-webserver,airflow-scheduler,airflow-workermlflow-serverkafka,zookeeperpostgres,redis,miniospark,bigquery-connector
- Simulated transactions are sent to Kafka.
- Spark consumes the stream, processes it, and applies the fraud detection model.
- Detected frauds trigger email alerts and are logged into BigQuery.
- Airflow orchestrates batch jobs like retraining models or data ingestion.
- MLflow tracks experiment metadata and trained model performance.
- Power BI visualizes fraud statistics via BigQuery integration.
# Clone repository
git clone https://github.com/your-username/fraud-detection-realtime.git
cd fraud-detection-realtime
# Start the system
docker-compose up --buildEnsure
.envand credential files are properly configured (see.env.example).
🚫 Do not commit cloud credentials (e.g. GCP, AWS, service account .json) to this repository.
