# anant2025grad/finguard architecture

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

- Interactive diagram: https://gitdiagram.com/anant2025grad/finguard
- Repository: https://github.com/anant2025grad/finguard

## Overview

FinGuard is a single-file synthetic financial transaction data generator, not a transaction-processing service. Its principal workflow creates account and transaction data, injects labeled fraud scenarios, engineers model-ready features, validates the resulting dataset, and saves it. The excerpt documents these stages and the script entry point; omitted portions limit certainty about some internal call details and the output path.

Main entry points: [`src/data_generator.py`](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py) (Generation entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Script user"))
node_main["Generation entry point<br/>[data_generator.py]"]
node_accounts["Account generation<br/>[data_generator.py]"]
node_transactions["Transaction generation<br/>[data_generator.py]"]
node_fraud["Fraud injection<br/>[data_generator.py]"]
node_features["Feature engineering<br/>[data_generator.py]"]
node_validation["Dataset validation<br/>[data_generator.py]"]
node_saving["Dataset saving<br/>[data_generator.py]"]
node_dataset["Generated dataset"]

node_user -->|"runs"| node_main
node_main -->|"generates"| node_accounts
node_main -->|"generates"| node_transactions
node_accounts -->|"supplies accounts"| node_transactions
node_main -->|"injects fraud"| node_fraud
node_main -->|"engineers features"| node_features
node_main -->|"validates data"| node_validation
node_main -->|"saves data"| node_saving
node_saving -->|"writes"| node_dataset

click node_main "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_accounts "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_transactions "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_fraud "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_features "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_validation "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py"
click node_saving "https://github.com/anant2025grad/finguard/blob/main/src/data_generator.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_user toneBlue
class node_main,node_accounts,node_transactions,node_fraud,node_features,node_validation,node_saving toneTeal
class node_dataset toneIndigo
```

## Components

### Other components

- **Script user**
- [Generation entry point](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Account generation](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Transaction generation](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Fraud injection](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Feature engineering](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Dataset validation](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- [Dataset saving](https://github.com/anant2025grad/finguard/blob/main/src/data_generator.py): `src/data_generator.py`
- **Generated dataset**

## Connections

- Script user → Generation entry point: runs
- Generation entry point → Account generation: generates
- Generation entry point → Transaction generation: generates
- Account generation → Transaction generation: supplies accounts
- Generation entry point → Fraud injection: injects fraud
- Generation entry point → Feature engineering: engineers features
- Generation entry point → Dataset validation: validates data
- Generation entry point → Dataset saving: saves data
- Dataset saving → Generated dataset: writes
