# tenysone/python_banking-system architecture

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

- Interactive diagram: https://gitdiagram.com/tenysone/python_banking-system
- Repository: https://github.com/tenysone/python_banking-system

## Overview

This is a command-line multi-account banking system. A user selects customer/account operations, transactions, month-end processing, search, statements, or reports in main.py; BankManager applies operations and retains in-memory customer, account, and transaction state. Account subclasses enforce type-specific rules, Transaction captures outcomes, and reporting utilities aggregate manager data. The excerpts show the principal calls and report dispatch; no README documentation or persistent storage/integrations are present in the supplied evidence.

Main entry points: [`manager/bank_manager.py`](https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py) (Bank manager), [`main.py`](https://github.com/tenysone/python_banking-system/blob/main/main.py) (Menu and workflows), [`dummy_data.py`](https://github.com/tenysone/python_banking-system/blob/main/dummy_data.py) (Demo data loader), [`models/account.py`](https://github.com/tenysone/python_banking-system/blob/main/models/account.py) (Account rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Banking interface"]
  node_cli["Menu and workflows<br/>[main.py]"]
  node_demo["Demo data loader<br/>[dummy_data.py]"]
  node_report_display["Report display<br/>[main.py]"]
end

subgraph group_operations["Bank operations"]
  node_manager["Bank manager<br/>[bank_manager.py]"]
  node_report_dispatch["Report dispatch<br/>[bank_manager.py]"]
end

subgraph group_domain["Banking domain"]
  node_customers["Customer records<br/>[customer.py]"]
  node_accounts["Account rules<br/>[account.py]"]
  node_transactions["Transaction records<br/>[transaction.py]"]
  node_exceptions["Banking errors<br/>[exceptions.py]"]
end

subgraph group_insights["Statements and reports"]
  node_statements["Account statements<br/>[bank_manager.py]"]
  node_reporting["Report calculations<br/>[reports.py]"]
end

node_user(("Banking user"))

node_user -->|"selects operations"| node_cli
node_cli -->|"requests banking actions"| node_manager
node_cli -->|"loads demo records"| node_demo
node_demo -->|"adds sample data"| node_manager
node_manager -->|"stores and updates"| node_customers
node_manager -->|"opens and operates"| node_accounts
node_manager -->|"records outcomes"| node_transactions
node_manager -->|"raises banking errors"| node_exceptions
node_accounts -->|"raises validation errors"| node_exceptions
node_manager -->|"retrieves account history"| node_statements
node_cli -->|"requests statements"| node_statements
node_cli -->|"requests reports"| node_report_dispatch
node_report_dispatch -->|"dispatches calculations"| node_reporting
node_reporting -->|"returns report data"| node_report_dispatch
node_cli -->|"renders report data"| node_report_display

click node_cli "https://github.com/tenysone/python_banking-system/blob/main/main.py"
click node_demo "https://github.com/tenysone/python_banking-system/blob/main/dummy_data.py"
click node_manager "https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py"
click node_customers "https://github.com/tenysone/python_banking-system/blob/main/models/customer.py"
click node_accounts "https://github.com/tenysone/python_banking-system/blob/main/models/account.py"
click node_transactions "https://github.com/tenysone/python_banking-system/blob/main/models/transaction.py"
click node_exceptions "https://github.com/tenysone/python_banking-system/blob/main/exceptions.py"
click node_statements "https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py"
click node_report_dispatch "https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py"
click node_reporting "https://github.com/tenysone/python_banking-system/blob/main/utils/reports.py"
click node_report_display "https://github.com/tenysone/python_banking-system/blob/main/main.py"

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_cli,node_demo,node_report_display,node_user toneBlue
class node_manager,node_report_dispatch toneAmber
class node_customers,node_accounts,node_transactions,node_exceptions toneMint
class node_statements,node_reporting toneRose
```

## Components

### Banking interface

- [Menu and workflows](https://github.com/tenysone/python_banking-system/blob/main/main.py): `main.py`
- [Demo data loader](https://github.com/tenysone/python_banking-system/blob/main/dummy_data.py): `dummy_data.py`
- [Report display](https://github.com/tenysone/python_banking-system/blob/main/main.py): `main.py`

### Bank operations

- [Bank manager](https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py): `manager/bank_manager.py`
- [Report dispatch](https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py): `manager/bank_manager.py`

### Banking domain

- [Customer records](https://github.com/tenysone/python_banking-system/blob/main/models/customer.py): `models/customer.py`
- [Account rules](https://github.com/tenysone/python_banking-system/blob/main/models/account.py): `models/account.py`
- [Transaction records](https://github.com/tenysone/python_banking-system/blob/main/models/transaction.py): `models/transaction.py`
- [Banking errors](https://github.com/tenysone/python_banking-system/blob/main/exceptions.py): `exceptions.py`

### Statements and reports

- [Account statements](https://github.com/tenysone/python_banking-system/blob/main/manager/bank_manager.py): `manager/bank_manager.py`
- [Report calculations](https://github.com/tenysone/python_banking-system/blob/main/utils/reports.py): `utils/reports.py`

### Other components

- **Banking user**

## Connections

- Banking user → Menu and workflows: selects operations (evidence: `main.py`)
- Menu and workflows → Bank manager: requests banking actions (evidence: `main.py`)
- Menu and workflows → Demo data loader: loads demo records (evidence: `main.py`)
- Demo data loader → Bank manager: adds sample data (evidence: `dummy_data.py`)
- Bank manager → Customer records: stores and updates (evidence: `manager/bank_manager.py`)
- Bank manager → Account rules: opens and operates (evidence: `manager/bank_manager.py`)
- Bank manager → Transaction records: records outcomes (evidence: `manager/bank_manager.py`)
- Bank manager → Banking errors: raises banking errors (evidence: `manager/bank_manager.py`)
- Account rules → Banking errors: raises validation errors (evidence: `models/account.py`)
- Bank manager → Account statements: retrieves account history (evidence: `manager/bank_manager.py`)
- Menu and workflows → Account statements: requests statements (evidence: `main.py`)
- Menu and workflows → Report dispatch: requests reports (evidence: `main.py`)
- Report dispatch → Report calculations: dispatches calculations (evidence: `manager/bank_manager.py`)
- Report calculations → Report dispatch: returns report data (evidence: `manager/bank_manager.py`)
- Menu and workflows → Report display: renders report data (evidence: `main.py`)
