# 1vanvolf/banksystem architecture

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

- Interactive diagram: https://gitdiagram.com/1vanvolf/banksystem
- Repository: https://github.com/1vanvolf/banksystem

## Overview

This is a Windows Forms banking simulation: users create and inspect banks and clients, operate deposit and credit accounts, and view event logs and periodic activity. The main workflow runs from the desktop form through BankController into factories, model state, and banking entities. Account rules and observer notifications form the principal internal domain layer. Timer-driven operations and bank-row animation are represented as capabilities from the source index; their detailed call paths are not inferred where excerpts do not show them.

Main entry points: [`WindowsFormsApp5/Controller/BankController.cs`](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Controller/BankController.cs) (Bank controller), [`WindowsFormsApp5/Model/Entities/Bank.cs`](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Bank.cs) (Bank), [`WindowsFormsApp5/View/MainForm.cs`](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/MainForm.cs) (Bank dashboard), [`WindowsFormsApp5/Model/Entities/Client.cs`](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Client.cs) (Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_program["Application startup<br/>[Program.cs]"]
  node_mainform["Bank dashboard<br/>[MainForm.cs]"]
  node_details["Client details"]
  node_bankrow["Bank row control<br/>[BankRowControl.cs]"]
end

subgraph group_control["Application Control"]
  node_controller["Bank controller<br/>[BankController.cs]"]
  node_timer["Timer controller<br/>[TimerController.cs]"]
  node_bankfactory["Bank factory<br/>[BankFactory.cs]"]
  node_clientfactory["Client factory<br/>[ClientFactory.cs]"]
end

subgraph group_domain["Banking Domain"]
  node_model["System model<br/>[BankSystemModel.cs]"]
  node_bank["Bank<br/>[Bank.cs]"]
  node_client["Client<br/>[Client.cs]"]
  node_individual["Individual client<br/>[Individual.cs]"]
  node_legal["Legal entity<br/>[LegalEntity.cs]"]
  node_account["Account<br/>[Account.cs]"]
  node_deposit["Deposit account<br/>[DepositAccount.cs]"]
  node_credit["Credit account<br/>[CreditAccount.cs]"]
end

subgraph group_events["Events"]
  node_isubject["Subject contract<br/>[ISubject.cs]"]
  node_iobserver["Observer contract<br/>[IObserver.cs]"]
  node_logobserver["Log observer<br/>[LogObserver.cs]"]
end

node_user(("Bank operator"))

node_user -->|"uses"| node_mainform
node_program -->|"starts"| node_mainform
node_mainform -->|"invokes"| node_controller
node_mainform -->|"reads banks"| node_model
node_mainform -->|"creates"| node_bankrow
node_mainform -->|"opens"| node_details
node_details -->|"invokes"| node_controller
node_details -->|"observes"| node_bank
node_controller -->|"creates bank"| node_bankfactory
node_controller -->|"creates client"| node_clientfactory
node_controller -->|"updates"| node_model
node_controller -->|"adds clients"| node_bank
node_controller -->|"opens or applies"| node_deposit
node_controller -->|"issues or repays"| node_credit
node_bankfactory -->|"constructs"| node_bank
node_clientfactory -->|"constructs"| node_individual
node_clientfactory -->|"constructs"| node_legal
node_model -->|"stores"| node_bank
node_client -->|"owns accounts"| node_account
node_individual -->|"inherits"| node_client
node_legal -->|"inherits"| node_client
node_account -->|"references owner"| node_client
node_deposit -->|"extends"| node_account
node_credit -->|"extends"| node_account
node_credit -->|"transfers remainder"| node_deposit
node_credit -->|"returns payments"| node_bank
node_bank -->|"notifies"| node_iobserver
node_client -->|"notifies"| node_iobserver
node_account -->|"notifies"| node_iobserver
node_bank -->|"implements"| node_isubject
node_client -->|"implements"| node_isubject
node_account -->|"implements"| node_isubject
node_timer -.->|"uses operations"| node_controller

click node_program "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Program.cs"
click node_mainform "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/MainForm.cs"
click node_details "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/ClientDetailsForm.cs"
click node_bankrow "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/Controls/BankRowControl.cs"
click node_controller "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Controller/BankController.cs"
click node_timer "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Controller/TimerController.cs"
click node_bankfactory "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Factory/BankFactory.cs"
click node_clientfactory "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Factory/ClientFactory.cs"
click node_model "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/BankSystemModel.cs"
click node_bank "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Bank.cs"
click node_client "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Client.cs"
click node_individual "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Individual.cs"
click node_legal "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/LegalEntity.cs"
click node_account "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Account.cs"
click node_deposit "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/DepositAccount.cs"
click node_credit "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/CreditAccount.cs"
click node_isubject "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/ISubject.cs"
click node_iobserver "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/IObserver.cs"
click node_logobserver "https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/LogObserver.cs"

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_program,node_mainform,node_details,node_bankrow toneBlue
class node_controller,node_timer,node_bankfactory,node_clientfactory toneAmber
class node_model,node_bank,node_client,node_individual,node_legal,node_account,node_deposit,node_credit toneMint
class node_isubject,node_iobserver,node_logobserver toneRose
class node_user toneIndigo
```

## Components

### Desktop UI

- [Application startup](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Program.cs): `WindowsFormsApp5/Program.cs`
- [Bank dashboard](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/MainForm.cs): `WindowsFormsApp5/View/MainForm.cs`
- [Client details](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/ClientDetailsForm.cs): `WindowsFormsApp5/View/ClientDetailsForm.cs`
- [Bank row control](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/View/Controls/BankRowControl.cs): `WindowsFormsApp5/View/Controls/BankRowControl.cs`

### Application Control

- [Bank controller](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Controller/BankController.cs): `WindowsFormsApp5/Controller/BankController.cs`
- [Timer controller](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Controller/TimerController.cs): `WindowsFormsApp5/Controller/TimerController.cs`
- [Bank factory](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Factory/BankFactory.cs): `WindowsFormsApp5/Factory/BankFactory.cs`
- [Client factory](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Factory/ClientFactory.cs): `WindowsFormsApp5/Factory/ClientFactory.cs`

### Banking Domain

- [System model](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/BankSystemModel.cs): `WindowsFormsApp5/Model/BankSystemModel.cs`
- [Bank](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Bank.cs): `WindowsFormsApp5/Model/Entities/Bank.cs`
- [Client](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Client.cs): `WindowsFormsApp5/Model/Entities/Client.cs`
- [Individual client](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Individual.cs): `WindowsFormsApp5/Model/Entities/Individual.cs`
- [Legal entity](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/LegalEntity.cs): `WindowsFormsApp5/Model/Entities/LegalEntity.cs`
- [Account](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/Account.cs): `WindowsFormsApp5/Model/Entities/Account.cs`
- [Deposit account](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/DepositAccount.cs): `WindowsFormsApp5/Model/Entities/DepositAccount.cs`
- [Credit account](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Model/Entities/CreditAccount.cs): `WindowsFormsApp5/Model/Entities/CreditAccount.cs`

### Events

- [Subject contract](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/ISubject.cs): `WindowsFormsApp5/Observer/ISubject.cs`
- [Observer contract](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/IObserver.cs): `WindowsFormsApp5/Observer/IObserver.cs`
- [Log observer](https://github.com/1vanvolf/banksystem/blob/master/WindowsFormsApp5/Observer/LogObserver.cs): `WindowsFormsApp5/Observer/LogObserver.cs`

### Other components

- **Bank operator**

## Connections

- Bank operator → Bank dashboard: uses
- Application startup → Bank dashboard: starts (evidence: `WindowsFormsApp5/Program.cs`)
- Bank dashboard → Bank controller: invokes (evidence: `WindowsFormsApp5/View/MainForm.cs`)
- Bank dashboard → System model: reads banks (evidence: `WindowsFormsApp5/View/MainForm.cs`)
- Bank dashboard → Bank row control: creates (evidence: `WindowsFormsApp5/View/MainForm.cs`)
- Bank dashboard → Client details: opens (evidence: `WindowsFormsApp5/View/MainForm.cs`)
- Client details → Bank controller: invokes (evidence: `WindowsFormsApp5/View/ClientDetailsForm.cs`)
- Client details → Bank: observes (evidence: `WindowsFormsApp5/View/ClientDetailsForm.cs`)
- Bank controller → Bank factory: creates bank (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank controller → Client factory: creates client (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank controller → System model: updates (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank controller → Bank: adds clients (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank controller → Deposit account: opens or applies (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank controller → Credit account: issues or repays (evidence: `WindowsFormsApp5/Controller/BankController.cs`)
- Bank factory → Bank: constructs (evidence: `WindowsFormsApp5/Factory/BankFactory.cs`)
- Client factory → Individual client: constructs (evidence: `WindowsFormsApp5/Factory/ClientFactory.cs`)
- Client factory → Legal entity: constructs (evidence: `WindowsFormsApp5/Factory/ClientFactory.cs`)
- System model → Bank: stores (evidence: `WindowsFormsApp5/Model/BankSystemModel.cs`)
- Client → Account: owns accounts (evidence: `WindowsFormsApp5/Model/Entities/Client.cs`)
- Individual client → Client: inherits (evidence: `WindowsFormsApp5/Model/Entities/Individual.cs`)
- Legal entity → Client: inherits (evidence: `WindowsFormsApp5/Model/Entities/LegalEntity.cs`)
- Account → Client: references owner (evidence: `WindowsFormsApp5/Model/Entities/Account.cs`)
- Deposit account → Account: extends (evidence: `WindowsFormsApp5/Model/Entities/DepositAccount.cs`)
- Credit account → Account: extends (evidence: `WindowsFormsApp5/Model/Entities/CreditAccount.cs`)
- Credit account → Deposit account: transfers remainder (evidence: `WindowsFormsApp5/Model/Entities/CreditAccount.cs`)
- Credit account → Bank: returns payments (evidence: `WindowsFormsApp5/Model/Entities/CreditAccount.cs`)
- Bank → Observer contract: notifies (evidence: `WindowsFormsApp5/Model/Entities/Bank.cs`)
- Client → Observer contract: notifies (evidence: `WindowsFormsApp5/Model/Entities/Client.cs`)
- Account → Observer contract: notifies (evidence: `WindowsFormsApp5/Model/Entities/Account.cs`)
- Bank → Subject contract: implements (evidence: `WindowsFormsApp5/Model/Entities/Bank.cs`)
- Client → Subject contract: implements (evidence: `WindowsFormsApp5/Model/Entities/Client.cs`)
- Account → Subject contract: implements (evidence: `WindowsFormsApp5/Model/Entities/Account.cs`)
- Timer controller → Bank controller: uses operations (evidence: `WindowsFormsApp5/Controller/TimerController.cs`)
