# hayk364/banking-system-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/hayk364/banking-system-desktop
- Repository: https://github.com/hayk364/banking-system-desktop

## Overview

Bank is a Qt desktop banking client backed by a local Node.js HTTP service. The main workflow restores a saved session or authenticates, collects wallet details after registration, then presents account information and supports transfers and transaction history. The C++ backend performs HTTP requests for these operations; QSettings retains session and account values. The server file is indexed as read, but its implementation details were not provided, so its internal stages and persistence are not expanded.

Main entry points: [`homewindow.cpp`](https://github.com/hayk364/banking-system-desktop/blob/main/homewindow.cpp) (Account dashboard), [`mainwindow.cpp`](https://github.com/hayk364/banking-system-desktop/blob/main/mainwindow.cpp) (Login and registration), [`NodeServer/server.js`](https://github.com/hayk364/banking-system-desktop/blob/main/NodeServer/server.js) (Node HTTP service), [`main.cpp`](https://github.com/hayk364/banking-system-desktop/blob/main/main.cpp) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop client"]
  node_entry["App startup<br/>[main.cpp]"]
  node_auth["Login and registration<br/>[mainwindow.cpp]"]
  node_wallet_form["Wallet details form<br/>[createwallet.cpp]"]
  node_dashboard["Account dashboard<br/>[homewindow.cpp]"]
  node_transfer_form["Transfer form<br/>[sendform.cpp]"]
  node_history_view["Transaction history view<br/>[history.cpp]"]
end

subgraph group_domain["Banking operations"]
  node_backend_auth["Authentication requests<br/>[backend.cpp]"]
  node_backend_wallet["Wallet creation request<br/>[backend.cpp]"]
  node_backend_account["Account data and balance<br/>[backend.cpp]"]
  node_backend_transfer["Transfer request<br/>[backend.cpp]"]
  node_backend_history["History retrieval<br/>[backend.cpp]"]
  node_settings[("Saved account settings<br/>[mainwindow.cpp]")]
end

subgraph group_service["Local service"]
  node_api["Node HTTP service<br/>[server.js]"]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"shows when signed out"| node_auth
node_entry -->|"shows when signed in"| node_dashboard
node_auth -->|"authenticates"| node_backend_auth
node_auth -->|"saves session"| node_settings
node_auth -->|"opens after registration"| node_wallet_form
node_auth -->|"opens after login"| node_dashboard
node_wallet_form -->|"submits details"| node_backend_wallet
node_wallet_form -->|"opens on success"| node_dashboard
node_dashboard -->|"loads and refreshes"| node_backend_account
node_dashboard -->|"opens"| node_transfer_form
node_dashboard -->|"opens"| node_history_view
node_transfer_form -->|"submits transfer"| node_backend_transfer
node_history_view -->|"loads transactions"| node_backend_history
node_backend_auth -->|"HTTP requests"| node_api
node_backend_wallet -->|"HTTP request"| node_api
node_backend_account -->|"HTTP requests"| node_api
node_backend_transfer -->|"HTTP request"| node_api
node_backend_history -->|"HTTP requests"| node_api

click node_entry "https://github.com/hayk364/banking-system-desktop/blob/main/main.cpp"
click node_auth "https://github.com/hayk364/banking-system-desktop/blob/main/mainwindow.cpp"
click node_wallet_form "https://github.com/hayk364/banking-system-desktop/blob/main/createwallet.cpp"
click node_dashboard "https://github.com/hayk364/banking-system-desktop/blob/main/homewindow.cpp"
click node_transfer_form "https://github.com/hayk364/banking-system-desktop/blob/main/sendform.cpp"
click node_history_view "https://github.com/hayk364/banking-system-desktop/blob/main/history.cpp"
click node_backend_auth "https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp"
click node_backend_wallet "https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp"
click node_backend_account "https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp"
click node_backend_transfer "https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp"
click node_backend_history "https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp"
click node_settings "https://github.com/hayk364/banking-system-desktop/blob/main/mainwindow.cpp"
click node_api "https://github.com/hayk364/banking-system-desktop/blob/main/NodeServer/server.js"

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_entry,node_auth,node_wallet_form,node_dashboard,node_transfer_form,node_history_view,node_user toneBlue
class node_backend_auth,node_backend_wallet,node_backend_account,node_backend_transfer,node_backend_history,node_settings toneAmber
class node_api toneMint
```

## Components

### Desktop client

- [App startup](https://github.com/hayk364/banking-system-desktop/blob/main/main.cpp): `main.cpp`
- [Login and registration](https://github.com/hayk364/banking-system-desktop/blob/main/mainwindow.cpp): `mainwindow.cpp`
- [Wallet details form](https://github.com/hayk364/banking-system-desktop/blob/main/createwallet.cpp): `createwallet.cpp`
- [Account dashboard](https://github.com/hayk364/banking-system-desktop/blob/main/homewindow.cpp): `homewindow.cpp`
- [Transfer form](https://github.com/hayk364/banking-system-desktop/blob/main/sendform.cpp): `sendform.cpp`
- [Transaction history view](https://github.com/hayk364/banking-system-desktop/blob/main/history.cpp): `history.cpp`

### Banking operations

- [Authentication requests](https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp): `backend.cpp`
- [Wallet creation request](https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp): `backend.cpp`
- [Account data and balance](https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp): `backend.cpp`
- [Transfer request](https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp): `backend.cpp`
- [History retrieval](https://github.com/hayk364/banking-system-desktop/blob/main/backend.cpp): `backend.cpp`
- [Saved account settings](https://github.com/hayk364/banking-system-desktop/blob/main/mainwindow.cpp): `mainwindow.cpp`

### Local service

- [Node HTTP service](https://github.com/hayk364/banking-system-desktop/blob/main/NodeServer/server.js): `NodeServer/server.js`

### Other components

- **User**

## Connections

- User → App startup: launches (evidence: `main.cpp`)
- App startup → Login and registration: shows when signed out (evidence: `main.cpp`)
- App startup → Account dashboard: shows when signed in (evidence: `main.cpp`)
- Login and registration → Authentication requests: authenticates (evidence: `mainwindow.cpp`)
- Login and registration → Saved account settings: saves session (evidence: `mainwindow.cpp`)
- Login and registration → Wallet details form: opens after registration (evidence: `mainwindow.cpp`)
- Login and registration → Account dashboard: opens after login (evidence: `mainwindow.cpp`)
- Wallet details form → Wallet creation request: submits details (evidence: `createwallet.cpp`)
- Wallet details form → Account dashboard: opens on success (evidence: `createwallet.cpp`)
- Account dashboard → Account data and balance: loads and refreshes (evidence: `homewindow.cpp`)
- Account dashboard → Transfer form: opens (evidence: `homewindow.cpp`)
- Account dashboard → Transaction history view: opens (evidence: `homewindow.cpp`)
- Transfer form → Transfer request: submits transfer (evidence: `sendform.cpp`)
- Transaction history view → History retrieval: loads transactions (evidence: `history.cpp`)
- Authentication requests → Node HTTP service: HTTP requests (evidence: `backend.cpp`)
- Wallet creation request → Node HTTP service: HTTP request (evidence: `backend.cpp`)
- Account data and balance → Node HTTP service: HTTP requests (evidence: `backend.cpp`)
- Transfer request → Node HTTP service: HTTP request (evidence: `backend.cpp`)
- History retrieval → Node HTTP service: HTTP requests (evidence: `backend.cpp`)
