# ad1tya0478/credit_card_fraud_detection_analyzer architecture

> Architecture diagram of the GitHub repository ad1tya0478/credit_card_fraud_detection_analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ad1tya0478/credit_card_fraud_detection_analyzer
- Repository: https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer

## Overview

This repository is a credit-card fraud analysis product: notebooks prepare transaction data, train and evaluate classifiers, and produce artifacts consumed by a Streamlit dashboard. The user-facing workflow is dashboard overview, transaction exploration, interactive fraud prediction, and model-performance inspection. The sampled code shows dashboard pages calling shared loaders in `dashboard/utils.py`, which reads local model/results artifacts and downloads test or cleaned data from Hugging Face. Notebook implementations are empty or unsampled, so their internal calls and sequencing are not asserted; their artifact roles are documented by the utility mappings.

Main entry points: [`dashboard/utils.py`](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/utils.py) (Shared dashboard utilities), [`models`](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/models) (Model files), [`results`](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/results) (Evaluation results), [`NoteBooks/model_training.ipynb`](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/model_training.ipynb) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_modeling["Modeling workflow"]
  node_cleaning["Data cleaning"]
  node_preprocessing["Preprocessing"]
  node_training["Model training"]
  node_evaluation["Model evaluation<br/>[evaluation.ipynb]"]
end

subgraph group_dashboard["Dashboard"]
  node_overview["Overview dashboard<br/>[app.py]"]
  node_explorer["Transaction explorer"]
  node_predictor["Fraud prediction<br/>[Fraud_Detection.py]"]
  node_insights["Visual insights<br/>[Visual_Insights.py]"]
  node_shared["Shared dashboard utilities<br/>[utils.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_model_store[("Model files")]
  node_result_store[("Evaluation results")]
end

node_analyst(("Analyst"))
node_hf_dataset[("Hugging Face dataset")]
node_uploader["Dataset uploader<br/>[upload_data.py]"]

node_analyst -->|"opens dashboard"| node_overview
node_analyst -->|"explores transactions"| node_explorer
node_analyst -->|"tests prediction"| node_predictor
node_analyst -->|"reviews performance"| node_insights
node_overview -->|"loads data"| node_shared
node_explorer -->|"loads transactions"| node_shared
node_predictor -->|"loads artifacts"| node_shared
node_insights -->|"loads metrics"| node_shared
node_shared -->|"downloads data"| node_hf_dataset
node_shared -->|"reads models"| node_model_store
node_shared -->|"reads results"| node_result_store
node_cleaning -.->|"publishes CSVs"| node_hf_dataset
node_preprocessing -.->|"produces scalers"| node_model_store
node_training -.->|"produces models"| node_model_store
node_training -.->|"produces CV results"| node_result_store
node_evaluation -.->|"selects final model"| node_model_store
node_evaluation -.->|"produces metrics"| node_result_store
node_uploader -->|"uploads CSVs"| node_hf_dataset

click node_cleaning "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/data-cleaning.ipynb"
click node_preprocessing "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/preProcessing.ipynb"
click node_training "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/model_training.ipynb"
click node_evaluation "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/evaluation.ipynb"
click node_overview "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/app.py"
click node_explorer "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/transaction_Explorer.py"
click node_predictor "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/Fraud_Detection.py"
click node_insights "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/Visual_Insights.py"
click node_shared "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/utils.py"
click node_model_store "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/models"
click node_result_store "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/results"
click node_uploader "https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/upload_data.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cleaning,node_preprocessing,node_training,node_evaluation toneBlue
class node_overview,node_explorer,node_predictor,node_insights,node_shared,node_hf_dataset toneAmber
class node_model_store,node_result_store toneMint
class node_analyst toneIndigo
class node_uploader toneTeal
```

## Components

### Modeling workflow

- [Data cleaning](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/data-cleaning.ipynb): `NoteBooks/data-cleaning.ipynb`
- [Preprocessing](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/preProcessing.ipynb): `NoteBooks/preProcessing.ipynb`
- [Model training](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/model_training.ipynb): `NoteBooks/model_training.ipynb`
- [Model evaluation](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/NoteBooks/evaluation.ipynb): `NoteBooks/evaluation.ipynb`

### Dashboard

- [Overview dashboard](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/app.py): `dashboard/app.py`
- [Transaction explorer](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/transaction_Explorer.py): `dashboard/pages/transaction_Explorer.py`
- [Fraud prediction](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/Fraud_Detection.py): `dashboard/pages/Fraud_Detection.py`
- [Visual insights](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/pages/Visual_Insights.py): `dashboard/pages/Visual_Insights.py`
- [Shared dashboard utilities](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/dashboard/utils.py): `dashboard/utils.py`

### Model artifacts

- [Model files](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/models): `models`
- [Evaluation results](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/tree/main/results): `results`

### Other components

- **Analyst**
- **Hugging Face dataset**
- [Dataset uploader](https://github.com/ad1tya0478/credit_card_fraud_detection_analyzer/blob/main/upload_data.py): `upload_data.py`

## Connections

- Analyst → Overview dashboard: opens dashboard (evidence: `dashboard/app.py`)
- Analyst → Transaction explorer: explores transactions (evidence: `dashboard/pages/transaction_Explorer.py`)
- Analyst → Fraud prediction: tests prediction (evidence: `dashboard/pages/Fraud_Detection.py`)
- Analyst → Visual insights: reviews performance (evidence: `dashboard/pages/Visual_Insights.py`)
- Overview dashboard → Shared dashboard utilities: loads data (evidence: `dashboard/app.py`)
- Transaction explorer → Shared dashboard utilities: loads transactions (evidence: `dashboard/pages/transaction_Explorer.py`)
- Fraud prediction → Shared dashboard utilities: loads artifacts (evidence: `dashboard/pages/Fraud_Detection.py`)
- Visual insights → Shared dashboard utilities: loads metrics (evidence: `dashboard/pages/Visual_Insights.py`)
- Shared dashboard utilities → Hugging Face dataset: downloads data (evidence: `dashboard/utils.py`)
- Shared dashboard utilities → Model files: reads models (evidence: `dashboard/utils.py`)
- Shared dashboard utilities → Evaluation results: reads results (evidence: `dashboard/utils.py`)
- Data cleaning → Hugging Face dataset: publishes CSVs
- Preprocessing → Model files: produces scalers
- Model training → Model files: produces models
- Model training → Evaluation results: produces CV results
- Model evaluation → Model files: selects final model
- Model evaluation → Evaluation results: produces metrics
- Dataset uploader → Hugging Face dataset: uploads CSVs (evidence: `upload_data.py`)
