# ssoad/bankingsystem architecture

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

- Interactive diagram: https://gitdiagram.com/ssoad/bankingsystem
- Repository: https://github.com/ssoad/bankingsystem

## Overview

This is a Java Swing banking application. Users launch the app, reach a menu, and create accounts, deposit, withdraw, or view the account list; account operations are handled by the bank model and saved to a local serialized file. Account subclasses and validation exceptions provide the main internal domain layer. The README also claims transaction history, but the sampled sources and tree do not identify a transaction-history implementation, so it is not mapped as a component. Edges reflect shown calls or references; unsampled implementation details are omitted.

Main entry points: [`src/GUI/GUIForm.java`](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/GUIForm.java) (Window registry), [`src/Bank/Bank.java`](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/Bank.java) (Bank registry), [`src/Data/FileIO.java`](https://github.com/ssoad/bankingsystem/blob/master/src/Data/FileIO.java) (Serialized storage), [`src/Bank/BankAccount.java`](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/BankAccount.java) (Base account)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Swing interface"]
  node_app["Application entry<br/>[Application.java]"]
  node_gui["Window registry<br/>[GUIForm.java]"]
  node_login["Login<br/>[Login.java]"]
  node_menu["Bank menu<br/>[Menu.java]"]
  node_add["Account creation<br/>[AddAccount.java]"]
  node_addcurrent["Current account form"]
  node_addsavings["Savings account form"]
  node_addstudent["Student account form"]
  node_deposit["Deposit form<br/>[DepositAcc.java]"]
  node_withdraw["Withdrawal form<br/>[WithdrawAcc.java]"]
  node_display["Account list view<br/>[DisplayList.java]"]
end

subgraph group_domain["Banking domain"]
  node_bank["Bank registry<br/>[Bank.java]"]
  node_account["Base account<br/>[BankAccount.java]"]
  node_savings["Savings account"]
  node_current["Current account"]
  node_student["Student account"]
end

subgraph group_storage["Persistence"]
  node_fileio[("Serialized storage<br/>[FileIO.java]")]
end

subgraph group_errors["Validation errors"]
  node_notfound["Account not found<br/>[AccNotFound.java]"]
  node_invalid["Invalid amount<br/>[InvalidAmount.java]"]
  node_maxbalance["Balance limit<br/>[MaxBalance.java]"]
  node_maxwithdraw["Withdrawal limit<br/>[MaxWithdraw.java]"]
end

node_user(("User"))

node_user -->|"launches"| node_app
node_app -->|"starts"| node_gui
node_gui -->|"registers"| node_login
node_gui -->|"registers"| node_menu
node_gui -->|"registers"| node_add
node_gui -->|"registers"| node_addcurrent
node_gui -->|"registers"| node_addsavings
node_gui -->|"registers"| node_addstudent
node_gui -->|"registers"| node_deposit
node_gui -->|"registers"| node_withdraw
node_gui -->|"registers"| node_display
node_menu -->|"opens forms"| node_gui
node_menu -->|"loads and saves"| node_fileio
node_addcurrent -->|"updates bank"| node_fileio
node_addsavings -->|"updates bank"| node_fileio
node_addstudent -->|"updates bank"| node_fileio
node_deposit -->|"requests deposit"| node_fileio
node_withdraw -->|"requests withdrawal"| node_fileio
node_display -->|"reads account list"| node_fileio
node_fileio -->|"loads and stores"| node_bank
node_bank -->|"manages accounts"| node_account
node_bank -->|"creates"| node_savings
node_bank -->|"creates"| node_current
node_bank -->|"creates"| node_student
node_savings -->|"extends"| node_account
node_current -->|"extends"| node_account
node_student -->|"extends"| node_savings
node_bank -->|"throws"| node_notfound
node_bank -->|"throws"| node_invalid
node_bank -->|"throws"| node_maxbalance
node_bank -->|"throws"| node_maxwithdraw
node_account -->|"throws"| node_invalid
node_account -->|"throws"| node_maxbalance
node_savings -->|"throws"| node_maxwithdraw

click node_app "https://github.com/ssoad/bankingsystem/blob/master/src/Application.java"
click node_gui "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/GUIForm.java"
click node_login "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/Login.java"
click node_menu "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/Menu.java"
click node_add "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddAccount.java"
click node_addcurrent "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddCurrentAccount.java"
click node_addsavings "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddSavingsAccount.java"
click node_addstudent "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddStudentAccount.java"
click node_deposit "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/DepositAcc.java"
click node_withdraw "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/WithdrawAcc.java"
click node_display "https://github.com/ssoad/bankingsystem/blob/master/src/GUI/DisplayList.java"
click node_bank "https://github.com/ssoad/bankingsystem/blob/master/src/Bank/Bank.java"
click node_account "https://github.com/ssoad/bankingsystem/blob/master/src/Bank/BankAccount.java"
click node_savings "https://github.com/ssoad/bankingsystem/blob/master/src/Bank/SavingsAccount.java"
click node_current "https://github.com/ssoad/bankingsystem/blob/master/src/Bank/CurrentAccount.java"
click node_student "https://github.com/ssoad/bankingsystem/blob/master/src/Bank/StudentAccount.java"
click node_fileio "https://github.com/ssoad/bankingsystem/blob/master/src/Data/FileIO.java"
click node_notfound "https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/AccNotFound.java"
click node_invalid "https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/InvalidAmount.java"
click node_maxbalance "https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/MaxBalance.java"
click node_maxwithdraw "https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/MaxWithdraw.java"

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_app,node_gui,node_login,node_menu,node_add,node_addcurrent,node_addsavings,node_addstudent,node_deposit,node_withdraw,node_display,node_user toneBlue
class node_bank,node_account,node_savings,node_current,node_student toneAmber
class node_fileio toneMint
class node_notfound,node_invalid,node_maxbalance,node_maxwithdraw toneRose
```

## Components

### Swing interface

- [Application entry](https://github.com/ssoad/bankingsystem/blob/master/src/Application.java): `src/Application.java`
- [Window registry](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/GUIForm.java): `src/GUI/GUIForm.java`
- [Login](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/Login.java): `src/GUI/Login.java`
- [Bank menu](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/Menu.java): `src/GUI/Menu.java`
- [Account creation](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddAccount.java): `src/GUI/AddAccount.java`
- [Current account form](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddCurrentAccount.java): `src/GUI/AddCurrentAccount.java`
- [Savings account form](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddSavingsAccount.java): `src/GUI/AddSavingsAccount.java`
- [Student account form](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/AddStudentAccount.java): `src/GUI/AddStudentAccount.java`
- [Deposit form](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/DepositAcc.java): `src/GUI/DepositAcc.java`
- [Withdrawal form](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/WithdrawAcc.java): `src/GUI/WithdrawAcc.java`
- [Account list view](https://github.com/ssoad/bankingsystem/blob/master/src/GUI/DisplayList.java): `src/GUI/DisplayList.java`

### Banking domain

- [Bank registry](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/Bank.java): `src/Bank/Bank.java`
- [Base account](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/BankAccount.java): `src/Bank/BankAccount.java`
- [Savings account](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/SavingsAccount.java): `src/Bank/SavingsAccount.java`
- [Current account](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/CurrentAccount.java): `src/Bank/CurrentAccount.java`
- [Student account](https://github.com/ssoad/bankingsystem/blob/master/src/Bank/StudentAccount.java): `src/Bank/StudentAccount.java`

### Persistence

- [Serialized storage](https://github.com/ssoad/bankingsystem/blob/master/src/Data/FileIO.java): `src/Data/FileIO.java`

### Validation errors

- [Account not found](https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/AccNotFound.java): `src/Exceptions/AccNotFound.java`
- [Invalid amount](https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/InvalidAmount.java): `src/Exceptions/InvalidAmount.java`
- [Balance limit](https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/MaxBalance.java): `src/Exceptions/MaxBalance.java`
- [Withdrawal limit](https://github.com/ssoad/bankingsystem/blob/master/src/Exceptions/MaxWithdraw.java): `src/Exceptions/MaxWithdraw.java`

### Other components

- **User**

## Connections

- User → Application entry: launches (evidence: `README.md`)
- Application entry → Window registry: starts (evidence: `src/Application.java`)
- Window registry → Login: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Bank menu: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Account creation: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Current account form: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Savings account form: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Student account form: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Deposit form: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Withdrawal form: registers (evidence: `src/GUI/GUIForm.java`)
- Window registry → Account list view: registers (evidence: `src/GUI/GUIForm.java`)
- Bank menu → Window registry: opens forms (evidence: `src/GUI/Menu.java`)
- Bank menu → Serialized storage: loads and saves (evidence: `src/GUI/Menu.java`)
- Current account form → Serialized storage: updates bank (evidence: `src/GUI/AddCurrentAccount.java`)
- Savings account form → Serialized storage: updates bank (evidence: `src/GUI/AddSavingsAccount.java`)
- Student account form → Serialized storage: updates bank (evidence: `src/GUI/AddStudentAccount.java`)
- Deposit form → Serialized storage: requests deposit (evidence: `src/GUI/DepositAcc.java`)
- Withdrawal form → Serialized storage: requests withdrawal (evidence: `src/GUI/WithdrawAcc.java`)
- Account list view → Serialized storage: reads account list (evidence: `src/GUI/DisplayList.java`)
- Serialized storage → Bank registry: loads and stores (evidence: `src/Data/FileIO.java`)
- Bank registry → Base account: manages accounts (evidence: `src/Bank/Bank.java`)
- Bank registry → Savings account: creates (evidence: `src/Bank/Bank.java`)
- Bank registry → Current account: creates (evidence: `src/Bank/Bank.java`)
- Bank registry → Student account: creates (evidence: `src/Bank/Bank.java`)
- Savings account → Base account: extends (evidence: `src/Bank/SavingsAccount.java`)
- Current account → Base account: extends (evidence: `src/Bank/CurrentAccount.java`)
- Student account → Savings account: extends (evidence: `src/Bank/StudentAccount.java`)
- Bank registry → Account not found: throws (evidence: `src/Bank/Bank.java`)
- Bank registry → Invalid amount: throws (evidence: `src/Bank/Bank.java`)
- Bank registry → Balance limit: throws (evidence: `src/Bank/Bank.java`)
- Bank registry → Withdrawal limit: throws (evidence: `src/Bank/Bank.java`)
- Base account → Invalid amount: throws (evidence: `src/Bank/BankAccount.java`)
- Base account → Balance limit: throws (evidence: `src/Bank/BankAccount.java`)
- Savings account → Withdrawal limit: throws (evidence: `src/Bank/SavingsAccount.java`)
