Skip to content

rmdorsey/cc_fraud_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Credit Card Fraud Detection and Visualization

This application uses a machine learning model and Spark Structured Streaming to detect credit card fraud in real-time.

Table of Contents

Prerequisites

Install Docker and Docker Compose

Ensure both are installed on your machine:

Python Environment

  • Install Python 3.11.11
  • Install required libraries:
pip install -r requirements.txt

Setup Instructions

  1. Start Docker Containers
docker compose up
  1. Verify Services Are Running
    Ensure the following services are up:
  • cassandra
  • zookeeper
  • kafka
  • fastapi
  • dashboard
  • react-dashboard

Running the Code

Run the following steps:

  1. Initialize the database:
python -m app_initialization.main

(Note: You may need to wait for Cassandra to fully initialize before running this.)

  1. Start the Spark Structured Streaming application:
python -m spark-app-v2.structured_streaming_fraud_detection
  1. Start the transaction producer:
python -m producers.transaction_producer
  1. Set up the frontend dashboard:
    • Navigate to the dashboard-app folder:
cd dashboard-app
  • Install dependencies:
npm install
  • Start the development server:
npm run dev

Visualizing the Data

Open your browser and navigate to:

http://localhost:5174

to view the real-time fraud detection dashboard.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •