# ra-manuth/financial_fraud_detection-system architecture

> Architecture diagram of the GitHub repository ra-manuth/financial_fraud_detection-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ra-manuth/financial_fraud_detection-system
- Repository: https://github.com/ra-manuth/financial_fraud_detection-system

## Overview

This is a small fraud-classification application: a user enters transaction details in a Streamlit interface, requests a prediction, and sees a fraud/valid result. The README also describes an analysis and training workflow that targets TRANSFER and CASH_OUT transactions and produces a preprocessing-plus-logistic-regression pipeline. The notebook was not sampled, so its internal steps and the exact training-to-artifact wiring are documented rather than source-verified.

Main entry points: [`fraud_detection_model.pkl`](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl) (Trained pipeline), [`fraud_detection.py`](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py) (Streamlit interface), [`analysis_model.ipynb`](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/analysis_model.ipynb) (EDA and training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Prediction app"]
  node_interface["Streamlit interface<br/>[fraud_detection.py]"]
  node_prediction["Prediction request<br/>[fraud_detection.py]"]
  node_result["Prediction result<br/>[fraud_detection.py]"]
end

subgraph group_model["Model pipeline"]
  node_artifact["Trained pipeline"]
  node_preprocessing["Feature preprocessing"]
  node_classifier["Logistic regression"]
end

subgraph group_training["Analysis and training"]
  node_notebook["EDA and training"]
  node_targeting["High-risk filtering"]
end

node_user(("Transaction user"))
node_dataset[("Kaggle transaction data")]

node_user -->|"enters details"| node_interface
node_interface -->|"loads pipeline"| node_artifact
node_interface -->|"submits input"| node_prediction
node_prediction -->|"predicts with"| node_artifact
node_prediction -->|"displays prediction"| node_result
node_dataset -.->|"supplies data"| node_notebook
node_notebook -.->|"analyzes transactions"| node_targeting
node_notebook -.->|"trains pipeline"| node_artifact
node_artifact -.->|"includes"| node_preprocessing
node_artifact -.->|"includes"| node_classifier

click node_interface "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py"
click node_prediction "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py"
click node_result "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py"
click node_artifact "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl"
click node_preprocessing "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl"
click node_classifier "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl"
click node_notebook "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/analysis_model.ipynb"
click node_targeting "https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/analysis_model.ipynb"

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_interface,node_prediction,node_result,node_user toneBlue
class node_artifact,node_preprocessing,node_classifier,node_dataset toneAmber
class node_notebook,node_targeting toneMint
```

## Components

### Prediction app

- [Streamlit interface](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py): `fraud_detection.py`
- [Prediction request](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py): `fraud_detection.py`
- [Prediction result](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection.py): `fraud_detection.py`

### Model pipeline

- [Trained pipeline](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl): `fraud_detection_model.pkl`
- [Feature preprocessing](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl): `fraud_detection_model.pkl`
- [Logistic regression](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/fraud_detection_model.pkl): `fraud_detection_model.pkl`

### Analysis and training

- [EDA and training](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/analysis_model.ipynb): `analysis_model.ipynb`
- [High-risk filtering](https://github.com/ra-manuth/financial_fraud_detection-system/blob/main/analysis_model.ipynb): `analysis_model.ipynb`

### Other components

- **Transaction user**
- **Kaggle transaction data**

## Connections

- Transaction user → Streamlit interface: enters details (evidence: `fraud_detection.py`)
- Streamlit interface → Trained pipeline: loads pipeline (evidence: `fraud_detection.py`)
- Streamlit interface → Prediction request: submits input (evidence: `fraud_detection.py`)
- Prediction request → Trained pipeline: predicts with (evidence: `fraud_detection.py`)
- Prediction request → Prediction result: displays prediction (evidence: `fraud_detection.py`)
- Kaggle transaction data → EDA and training: supplies data (evidence: `Readme.md`)
- EDA and training → High-risk filtering: analyzes transactions (evidence: `Readme.md`)
- EDA and training → Trained pipeline: trains pipeline (evidence: `Readme.md`)
- Trained pipeline → Feature preprocessing: includes (evidence: `Readme.md`)
- Trained pipeline → Logistic regression: includes (evidence: `Readme.md`)
