# mrmudasir05/bank-fraud-detection architecture

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

- Interactive diagram: https://gitdiagram.com/mrmudasir05/bank-fraud-detection
- Repository: https://github.com/mrmudasir05/bank-fraud-detection

## Overview

This is a PyQt5 desktop banking simulation with SQLite-backed registration, login, account actions, and transfers. The main user journey starts at the welcome screen, proceeds through sign-in or registration, and reaches a dashboard for balance checks, account deletion, logout, and transfers. Transfer.py also contains transaction-data preprocessing for fraud detection; the README documents a trained model in the notebook, but its implementation and runtime connection were not sampled. The README and source excerpts identify BankNH.db as the app database; MainLogin.py also initializes a separate BankMT.db at runtime.

Main entry points: [`MainLogin.py`](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainLogin.py) (Login), [`MainProfile.py`](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py) (Account dashboard), [`BankNH.db`](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/BankNH.db) (BankNH database), [`mainwelcom.py`](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/mainwelcom.py) (Welcome screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and authentication"]
  node_welcome["Welcome screen<br/>[mainwelcom.py]"]
  node_login["Login<br/>[MainLogin.py]"]
  node_registration["Registration<br/>[registrationNew.py]"]
end

subgraph group_account["Account management"]
  node_dashboard["Account dashboard<br/>[MainProfile.py]"]
  node_balance["Balance check<br/>[MainProfile.py]"]
  node_account_delete["Account deletion<br/>[MainProfile.py]"]
  node_logout["Logout<br/>[MainProfile.py]"]
end

subgraph group_transactions["Transactions and fraud"]
  node_transfer["Transfer processing<br/>[Transfer.py]"]
  node_fraud_prep["Fraud data prep<br/>[Transfer.py]"]
  node_fraud_model["Fraud model"]
end

subgraph group_storage["Data storage"]
  node_banknh[("BankNH database<br/>[BankNH.db]")]
  node_bankmt[("BankMT database")]
end

node_user(("Bank user"))

node_user -->|"starts at"| node_welcome
node_welcome -->|"opens login"| node_login
node_welcome -->|"opens registration"| node_registration
node_login -->|"opens registration"| node_registration
node_login -->|"opens dashboard"| node_dashboard
node_registration -->|"creates account"| node_banknh
node_login -->|"checks credentials"| node_banknh
node_dashboard -->|"offers action"| node_balance
node_dashboard -->|"offers action"| node_account_delete
node_dashboard -->|"offers action"| node_logout
node_dashboard -->|"opens transfer"| node_transfer
node_balance -->|"reads balance"| node_banknh
node_account_delete -->|"deletes account"| node_banknh
node_transfer -->|"updates balances"| node_banknh
node_transfer -->|"prepares features"| node_fraud_prep
node_fraud_prep -.->|"feeds model"| node_fraud_model
node_login -->|"initializes table"| node_bankmt

click node_welcome "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/mainwelcom.py"
click node_login "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainLogin.py"
click node_registration "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/registrationNew.py"
click node_dashboard "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py"
click node_balance "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py"
click node_account_delete "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py"
click node_logout "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py"
click node_transfer "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/Transfer.py"
click node_fraud_prep "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/Transfer.py"
click node_fraud_model "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/banking_app_ml.ipynb"
click node_banknh "https://github.com/mrmudasir05/bank-fraud-detection/blob/main/BankNH.db"

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_welcome,node_login,node_registration,node_user toneBlue
class node_dashboard,node_balance,node_account_delete,node_logout toneAmber
class node_transfer,node_fraud_prep,node_fraud_model toneMint
class node_banknh,node_bankmt toneRose
```

## Components

### Entry and authentication

- [Welcome screen](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/mainwelcom.py): `mainwelcom.py`
- [Login](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainLogin.py): `MainLogin.py`
- [Registration](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/registrationNew.py): `registrationNew.py`

### Account management

- [Account dashboard](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py): `MainProfile.py`
- [Balance check](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py): `MainProfile.py`
- [Account deletion](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py): `MainProfile.py`
- [Logout](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/MainProfile.py): `MainProfile.py`

### Transactions and fraud

- [Transfer processing](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/Transfer.py): `Transfer.py`
- [Fraud data prep](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/Transfer.py): `Transfer.py`
- [Fraud model](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/banking_app_ml.ipynb): `banking_app_ml.ipynb`

### Data storage

- [BankNH database](https://github.com/mrmudasir05/bank-fraud-detection/blob/main/BankNH.db): `BankNH.db`
- **BankMT database**

### Other components

- **Bank user**

## Connections

- Bank user → Welcome screen: starts at (evidence: `README.md`)
- Welcome screen → Login: opens login (evidence: `mainwelcom.py`)
- Welcome screen → Registration: opens registration (evidence: `mainwelcom.py`)
- Login → Registration: opens registration (evidence: `MainLogin.py`)
- Login → Account dashboard: opens dashboard (evidence: `MainLogin.py`)
- Registration → BankNH database: creates account (evidence: `registrationNew.py`)
- Login → BankNH database: checks credentials (evidence: `MainLogin.py`)
- Account dashboard → Balance check: offers action (evidence: `MainProfile.py`)
- Account dashboard → Account deletion: offers action (evidence: `MainProfile.py`)
- Account dashboard → Logout: offers action (evidence: `MainProfile.py`)
- Account dashboard → Transfer processing: opens transfer (evidence: `MainProfile.py`)
- Balance check → BankNH database: reads balance (evidence: `MainProfile.py`)
- Account deletion → BankNH database: deletes account (evidence: `MainProfile.py`)
- Transfer processing → BankNH database: updates balances (evidence: `Transfer.py`)
- Transfer processing → Fraud data prep: prepares features (evidence: `Transfer.py`)
- Fraud data prep → Fraud model: feeds model
- Login → BankMT database: initializes table (evidence: `MainLogin.py`)
