# mohamed-hadad/bank-system architecture

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

- Interactive diagram: https://gitdiagram.com/mohamed-hadad/bank-system
- Repository: https://github.com/mohamed-hadad/bank-system

## Overview

This repository presents the same console banking product in two designs: a single-file procedural version and a layered OOP version. The main OOP user journey is login, permission-checked menu navigation, and client, transaction, user-administration, or currency-exchange operations. Domain objects handle client, user, and currency behavior, with text files serving as persistence. The README documents further capabilities including transfer history, login records, lockout, password shifting, and number-to-text. Links for unsampled features reflect README descriptions or indexed references, not inspection of their full implementations.

Main entry points: [`V2_OOP/clsBankClient.h`](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsBankClient.h) (Bank Client), [`V2_OOP/clsMainScreen.h`](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsMainScreen.h) (Main Menu), [`V2_OOP/clsUser.h`](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsUser.h) (User And Access), [`V2_OOP/clsTransactionsScreen.h`](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransactionsScreen.h) (Transactions Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application Entry"]
  node_oopmain["OOP Entry Point"]
end

subgraph group_screens["Console Screens"]
  node_login["Login Screen<br/>[clsLoginScreen.h]"]
  node_mainmenu["Main Menu<br/>[clsMainScreen.h]"]
  node_clientops["Client Screens"]
  node_transactions["Transactions Menu"]
  node_deposit["Deposit And Withdraw<br/>[clsDepositScreen.h]"]
  node_transfer["Transfer Screen"]
  node_transferlog["Transfer History"]
  node_balances["Balance Summary"]
  node_userscreens["User Administration"]
  node_loginrecord["Login Register"]
  node_currencyscreens["Currency Exchange"]
end

subgraph group_domain["Banking Domain"]
  node_client["Bank Client<br/>[clsBankClient.h]"]
  node_user["User And Access<br/>[clsUser.h]"]
  node_currency["Currency Rates<br/>[clsCurrency.h]"]
  node_person["Person Base<br/>[clsPerson.h]"]
end

subgraph group_support["Persistence And Utilities"]
  node_clientsdata[("Client Records<br/>[Clients.txt]")]
  node_usersdata[("User Records<br/>[Users.txt]")]
  node_currencydata[("Currency Records<br/>[Currencies.txt]")]
  node_transferdata[("Transfer Records<br/>[TransferLog.txt]")]
  node_loginregdata[("Login Records<br/>[LoginRegister.txt]")]
  node_validation["Input Validation<br/>[clsValidateInput.h]"]
  node_screenbase["Screen Helpers<br/>[clsScreen.h]"]
  node_date["Date Utilities<br/>[clsDate.h]"]
  node_string["String Utilities<br/>[clsString.h]"]
  node_utility["Shared Utilities<br/>[clsUtility.h]"]
end

subgraph group_legacy["Procedural Version"]
  node_procedural["Procedural Banking<br/>[BankSystem.cpp]"]
  node_v1clients[("Procedural Client Data<br/>[ClientsData.txt]")]
  node_v1users[("Procedural User Data<br/>[Users.txt]")]
end

node_operator(("Bank Operator"))

node_operator -->|"starts"| node_oopmain
node_oopmain -->|"shows login"| node_login
node_login -->|"opens menu"| node_mainmenu
node_mainmenu -->|"dispatches client tasks"| node_clientops
node_mainmenu -->|"opens transactions"| node_transactions
node_mainmenu -->|"opens administration"| node_userscreens
node_mainmenu -->|"opens login register"| node_loginrecord
node_mainmenu -->|"opens exchange"| node_currencyscreens
node_transactions -->|"dispatches operations"| node_deposit
node_transactions -->|"dispatches transfers"| node_transfer
node_transactions -->|"opens history"| node_transferlog
node_transactions -->|"opens balances"| node_balances
node_clientops -->|"uses client records"| node_client
node_deposit -->|"updates balance"| node_client
node_transfer -->|"moves funds"| node_client
node_userscreens -->|"manages users"| node_user
node_login -->|"authenticates"| node_user
node_loginrecord -->|"reads login history"| node_user
node_currencyscreens -->|"uses rates"| node_currency
node_client -->|"inherits identity"| node_person
node_user -->|"inherits identity"| node_person
node_client -->|"reads and writes"| node_clientsdata
node_user -->|"reads and writes"| node_usersdata
node_currency -->|"reads and writes"| node_currencydata
node_client -->|"records transfers"| node_transferdata
node_operator -->|"runs alternative"| node_procedural
node_procedural -->|"uses sample data"| node_v1clients
node_procedural -->|"uses sample data"| node_v1users
node_clientops -->|"validates input"| node_validation
node_deposit -->|"checks amounts"| node_validation
node_screenbase -->|"formats screen date"| node_date
node_client -->|"uses shared helpers"| node_utility
node_user -->|"uses shared helpers"| node_utility
node_currency -->|"parses records"| node_string
node_loginrecord -.->|"records sessions"| node_loginregdata

click node_oopmain "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/BankSystem(OOP).cpp"
click node_login "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsLoginScreen.h"
click node_mainmenu "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsMainScreen.h"
click node_clientops "https://github.com/mohamed-hadad/bank-system/tree/main/V2_OOP"
click node_transactions "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransactionsScreen.h"
click node_deposit "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsDepositScreen.h"
click node_transfer "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransferScreen.h"
click node_transferlog "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransferLogScreen.h"
click node_balances "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTotalBalancesScreen.h"
click node_userscreens "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsManageUsersScreen.h"
click node_loginrecord "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsLoginRegisterScreen.h"
click node_currencyscreens "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsCurrencyExchangeMainScreen.h"
click node_client "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsBankClient.h"
click node_user "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsUser.h"
click node_currency "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsCurrency.h"
click node_person "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsPerson.h"
click node_clientsdata "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Clients.txt"
click node_usersdata "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Users.txt"
click node_currencydata "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Currencies.txt"
click node_transferdata "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/TransferLog.txt"
click node_loginregdata "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/LoginRegister.txt"
click node_validation "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsValidateInput.h"
click node_screenbase "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsScreen.h"
click node_date "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsDate.h"
click node_string "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsString.h"
click node_utility "https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsUtility.h"
click node_procedural "https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/BankSystem.cpp"
click node_v1clients "https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/ClientsData.txt"
click node_v1users "https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/Users.txt"

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_oopmain toneBlue
class node_login,node_mainmenu,node_clientops,node_transactions,node_deposit,node_transfer,node_transferlog,node_balances,node_userscreens,node_loginrecord,node_currencyscreens toneAmber
class node_client,node_user,node_currency,node_person toneMint
class node_clientsdata,node_usersdata,node_currencydata,node_transferdata,node_loginregdata,node_validation,node_screenbase,node_date,node_string,node_utility toneRose
class node_procedural,node_v1clients,node_v1users,node_operator toneIndigo
```

## Components

### Application Entry

- [OOP Entry Point](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/BankSystem(OOP).cpp): `V2_OOP/BankSystem(OOP).cpp`

### Console Screens

- [Login Screen](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsLoginScreen.h): `V2_OOP/clsLoginScreen.h`
- [Main Menu](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsMainScreen.h): `V2_OOP/clsMainScreen.h`
- [Client Screens](https://github.com/mohamed-hadad/bank-system/tree/main/V2_OOP): `V2_OOP`
- [Transactions Menu](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransactionsScreen.h): `V2_OOP/clsTransactionsScreen.h`
- [Deposit And Withdraw](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsDepositScreen.h): `V2_OOP/clsDepositScreen.h`
- [Transfer Screen](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransferScreen.h): `V2_OOP/clsTransferScreen.h`
- [Transfer History](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTransferLogScreen.h): `V2_OOP/clsTransferLogScreen.h`
- [Balance Summary](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsTotalBalancesScreen.h): `V2_OOP/clsTotalBalancesScreen.h`
- [User Administration](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsManageUsersScreen.h): `V2_OOP/clsManageUsersScreen.h`
- [Login Register](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsLoginRegisterScreen.h): `V2_OOP/clsLoginRegisterScreen.h`
- [Currency Exchange](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsCurrencyExchangeMainScreen.h): `V2_OOP/clsCurrencyExchangeMainScreen.h`

### Banking Domain

- [Bank Client](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsBankClient.h): `V2_OOP/clsBankClient.h`
- [User And Access](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsUser.h): `V2_OOP/clsUser.h`
- [Currency Rates](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsCurrency.h): `V2_OOP/clsCurrency.h`
- [Person Base](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsPerson.h): `V2_OOP/clsPerson.h`

### Persistence And Utilities

- [Client Records](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Clients.txt): `V2_OOP/Clients.txt`
- [User Records](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Users.txt): `V2_OOP/Users.txt`
- [Currency Records](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/Currencies.txt): `V2_OOP/Currencies.txt`
- [Transfer Records](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/TransferLog.txt): `V2_OOP/TransferLog.txt`
- [Login Records](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/LoginRegister.txt): `V2_OOP/LoginRegister.txt`
- [Input Validation](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsValidateInput.h): `V2_OOP/clsValidateInput.h`
- [Screen Helpers](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsScreen.h): `V2_OOP/clsScreen.h`
- [Date Utilities](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsDate.h): `V2_OOP/clsDate.h`
- [String Utilities](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsString.h): `V2_OOP/clsString.h`
- [Shared Utilities](https://github.com/mohamed-hadad/bank-system/blob/main/V2_OOP/clsUtility.h): `V2_OOP/clsUtility.h`

### Procedural Version

- [Procedural Banking](https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/BankSystem.cpp): `V1_Procedural/BankSystem.cpp`
- [Procedural Client Data](https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/ClientsData.txt): `V1_Procedural/ClientsData.txt`
- [Procedural User Data](https://github.com/mohamed-hadad/bank-system/blob/main/V1_Procedural/Users.txt): `V1_Procedural/Users.txt`

### Other components

- **Bank Operator**

## Connections

- Bank Operator → OOP Entry Point: starts (evidence: `README.md`)
- OOP Entry Point → Login Screen: shows login (evidence: `V2_OOP/BankSystem(OOP).cpp`)
- Login Screen → Main Menu: opens menu (evidence: `V2_OOP/clsLoginScreen.h`)
- Main Menu → Client Screens: dispatches client tasks (evidence: `V2_OOP/clsMainScreen.h`)
- Main Menu → Transactions Menu: opens transactions (evidence: `V2_OOP/clsMainScreen.h`)
- Main Menu → User Administration: opens administration (evidence: `V2_OOP/clsMainScreen.h`)
- Main Menu → Login Register: opens login register (evidence: `V2_OOP/clsMainScreen.h`)
- Main Menu → Currency Exchange: opens exchange (evidence: `V2_OOP/clsMainScreen.h`)
- Transactions Menu → Deposit And Withdraw: dispatches operations (evidence: `V2_OOP/clsTransactionsScreen.h`)
- Transactions Menu → Transfer Screen: dispatches transfers (evidence: `V2_OOP/clsTransactionsScreen.h`)
- Transactions Menu → Transfer History: opens history (evidence: `V2_OOP/clsTransactionsScreen.h`)
- Transactions Menu → Balance Summary: opens balances (evidence: `V2_OOP/clsTransactionsScreen.h`)
- Client Screens → Bank Client: uses client records (evidence: `V2_OOP/clsAddNewClientScreen.h`)
- Deposit And Withdraw → Bank Client: updates balance (evidence: `V2_OOP/clsDepositScreen.h`)
- Transfer Screen → Bank Client: moves funds (evidence: `V2_OOP/clsTransferScreen.h`)
- User Administration → User And Access: manages users
- Login Screen → User And Access: authenticates (evidence: `V2_OOP/clsLoginScreen.h`)
- Login Register → User And Access: reads login history (evidence: `V2_OOP/clsLoginRegisterScreen.h`)
- Currency Exchange → Currency Rates: uses rates (evidence: `V2_OOP/clsCurrencyExchangeMainScreen.h`)
- Bank Client → Person Base: inherits identity (evidence: `V2_OOP/clsBankClient.h`)
- User And Access → Person Base: inherits identity (evidence: `V2_OOP/clsUser.h`)
- Bank Client → Client Records: reads and writes (evidence: `V2_OOP/clsBankClient.h`)
- User And Access → User Records: reads and writes (evidence: `V2_OOP/clsUser.h`)
- Currency Rates → Currency Records: reads and writes (evidence: `V2_OOP/clsCurrency.h`)
- Bank Client → Transfer Records: records transfers (evidence: `V2_OOP/clsBankClient.h`)
- Bank Operator → Procedural Banking: runs alternative (evidence: `README.md`)
- Procedural Banking → Procedural Client Data: uses sample data (evidence: `README.md`)
- Procedural Banking → Procedural User Data: uses sample data (evidence: `README.md`)
- Client Screens → Input Validation: validates input (evidence: `V2_OOP/clsAddNewClientScreen.h`)
- Deposit And Withdraw → Input Validation: checks amounts (evidence: `V2_OOP/clsDepositScreen.h`)
- Screen Helpers → Date Utilities: formats screen date (evidence: `V2_OOP/clsScreen.h`)
- Bank Client → Shared Utilities: uses shared helpers (evidence: `V2_OOP/clsBankClient.h`)
- User And Access → Shared Utilities: uses shared helpers (evidence: `V2_OOP/clsUser.h`)
- Currency Rates → String Utilities: parses records (evidence: `V2_OOP/clsCurrency.h`)
- Login Register → Login Records: records sessions (evidence: `README.md`)
