# muneebhassan437/vaultguard- architecture

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

- Interactive diagram: https://gitdiagram.com/muneebhassan437/vaultguard-
- Repository: https://github.com/muneebhassan437/vaultguard-

## Overview

VaultGuard AI is a transaction-fraud prediction app. A user enters transaction features in the Streamlit form; the UI derives flags and either returns a local non-fraud result for most transaction types or posts the payload to the FastAPI prediction endpoint. The API validates the request, builds a dataframe, and runs the loaded model. The tree also contains DVC-tracked datasets and EDA/modeling notebooks, but their internal behavior and connections are not shown. The graph reflects only relationships visible in the supplied excerpts.

Main entry points: [`app/main.py`](https://github.com/muneebhassan437/vaultguard-/blob/main/app/main.py) (Prediction API), [`UI/streamlit.py`](https://github.com/muneebhassan437/vaultguard-/blob/main/UI/streamlit.py) (Feature form and routing), [`app/validation.py`](https://github.com/muneebhassan437/vaultguard-/blob/main/app/validation.py) (Input schema), [`models/logistic_regression_model.joblib.dvc`](https://github.com/muneebhassan437/vaultguard-/blob/main/models/logistic_regression_model.joblib.dvc) (Fraud model artifact)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_form["Feature form and routing<br/>[streamlit.py]"]
end

subgraph group_service["Prediction service"]
  node_api["Prediction API<br/>[main.py]"]
  node_validation["Input schema<br/>[validation.py]"]
end

subgraph group_ml["ML assets and analysis"]
  node_model["Fraud model artifact"]
  node_transactions["Transaction dataset"]
  node_modelling["Modeling notebook<br/>[Modelling.ipynb]"]
  node_eda["EDA notebook<br/>[EDA.ipynb]"]
end

node_user(("Transaction user"))

node_user -->|"enters features"| node_form
node_form -->|"posts prediction"| node_api
node_api -->|"validates input"| node_validation
node_api -->|"loads and predicts"| node_model
node_api -->|"returns result"| node_form

click node_form "https://github.com/muneebhassan437/vaultguard-/blob/main/UI/streamlit.py"
click node_api "https://github.com/muneebhassan437/vaultguard-/blob/main/app/main.py"
click node_validation "https://github.com/muneebhassan437/vaultguard-/blob/main/app/validation.py"
click node_model "https://github.com/muneebhassan437/vaultguard-/blob/main/models/logistic_regression_model.joblib.dvc"
click node_transactions "https://github.com/muneebhassan437/vaultguard-/blob/main/Data/Transactions.csv.dvc"
click node_modelling "https://github.com/muneebhassan437/vaultguard-/blob/main/Notebooks/Modelling.ipynb"
click node_eda "https://github.com/muneebhassan437/vaultguard-/blob/main/Notebooks/EDA.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_form,node_user toneBlue
class node_api,node_validation toneAmber
class node_model,node_transactions,node_modelling,node_eda toneMint
```

## Components

### User interface

- [Feature form and routing](https://github.com/muneebhassan437/vaultguard-/blob/main/UI/streamlit.py): `UI/streamlit.py`

### Prediction service

- [Prediction API](https://github.com/muneebhassan437/vaultguard-/blob/main/app/main.py): `app/main.py`
- [Input schema](https://github.com/muneebhassan437/vaultguard-/blob/main/app/validation.py): `app/validation.py`

### ML assets and analysis

- [Fraud model artifact](https://github.com/muneebhassan437/vaultguard-/blob/main/models/logistic_regression_model.joblib.dvc): `models/logistic_regression_model.joblib.dvc`
- [Transaction dataset](https://github.com/muneebhassan437/vaultguard-/blob/main/Data/Transactions.csv.dvc): `Data/Transactions.csv.dvc`
- [Modeling notebook](https://github.com/muneebhassan437/vaultguard-/blob/main/Notebooks/Modelling.ipynb): `Notebooks/Modelling.ipynb`
- [EDA notebook](https://github.com/muneebhassan437/vaultguard-/blob/main/Notebooks/EDA.ipynb): `Notebooks/EDA.ipynb`

### Other components

- **Transaction user**

## Connections

- Transaction user → Feature form and routing: enters features (evidence: `UI/streamlit.py`)
- Feature form and routing → Prediction API: posts prediction (evidence: `UI/streamlit.py`)
- Prediction API → Input schema: validates input (evidence: `app/main.py`)
- Prediction API → Fraud model artifact: loads and predicts (evidence: `app/main.py`)
- Prediction API → Feature form and routing: returns result (evidence: `UI/streamlit.py`)
