# vinay6697/bank-account-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/vinay6697/bank-account-management-system
- Repository: https://github.com/vinay6697/bank-account-management-system

## Overview

This is a console-based bank account management application. A user selects account creation, update, lookup, deletion, listing, deposit, balance check, withdrawal, transfer, or name search; the console delegates to a service for basic validation and then to JDBC-backed DAO operations. Account data is represented by BankAccount and stored in PostgreSQL. The README is empty, so capability coverage comes from the console menu and sampled service/DAO code; DAO excerpts are partial, so some database details remain unspecified.

Main entry points: [`src/main/java/service/BankAccountService.java`](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/service/BankAccountService.java) (Account service), [`src/main/java/util/DataBaseConnection.java`](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/util/DataBaseConnection.java) (JDBC connection), [`src/main/java/dao/BankAccountDao.java`](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java) (Account changes), [`src/main/java/main/BankManagementSystem.java`](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/main/BankManagementSystem.java) (Management console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Console interface"]
  node_console["Management console"]
end

subgraph group_domain["Account domain"]
  node_service["Account service"]
  node_account["Account record<br/>[BankAccount.java]"]
end

subgraph group_persistence["Persistence"]
  node_account_ops["Account changes"]
  node_account_lookup["Account queries"]
  node_balance_ops["Balance operations"]
  node_transfer["Funds transfer"]
  node_connection["JDBC connection"]
end

node_user(("Bank operator"))
node_postgres[("PostgreSQL database")]

node_user -->|"chooses operation"| node_console
node_console -->|"calls operations"| node_service
node_console -->|"creates account"| node_account
node_service -->|"delegates changes"| node_account_ops
node_service -->|"delegates queries"| node_account_lookup
node_service -->|"delegates balance work"| node_balance_ops
node_service -->|"delegates transfers"| node_transfer
node_account_ops -->|"maps account data"| node_account
node_account_lookup -->|"returns account data"| node_account
node_account_ops -->|"opens connection"| node_connection
node_account_lookup -->|"opens connection"| node_connection
node_balance_ops -->|"opens connection"| node_connection
node_transfer -->|"opens connection"| node_connection
node_connection -->|"connects via JDBC"| node_postgres
node_account_ops -->|"reads and writes"| node_postgres
node_account_lookup -->|"queries accounts"| node_postgres
node_balance_ops -->|"reads and updates balances"| node_postgres
node_transfer -->|"updates both balances"| node_postgres

click node_console "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/main/BankManagementSystem.java"
click node_service "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/service/BankAccountService.java"
click node_account "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/entity/BankAccount.java"
click node_account_ops "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java"
click node_account_lookup "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java"
click node_balance_ops "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java"
click node_transfer "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java"
click node_connection "https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/util/DataBaseConnection.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_console toneBlue
class node_service,node_account,node_postgres toneAmber
class node_account_ops,node_account_lookup,node_balance_ops,node_transfer,node_connection toneMint
class node_user toneIndigo
```

## Components

### Console interface

- [Management console](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/main/BankManagementSystem.java): `src/main/java/main/BankManagementSystem.java`

### Account domain

- [Account service](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/service/BankAccountService.java): `src/main/java/service/BankAccountService.java`
- [Account record](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/entity/BankAccount.java): `src/main/java/entity/BankAccount.java`

### Persistence

- [Account changes](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java): `src/main/java/dao/BankAccountDao.java`
- [Account queries](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java): `src/main/java/dao/BankAccountDao.java`
- [Balance operations](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java): `src/main/java/dao/BankAccountDao.java`
- [Funds transfer](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/dao/BankAccountDao.java): `src/main/java/dao/BankAccountDao.java`
- [JDBC connection](https://github.com/vinay6697/bank-account-management-system/blob/main/src/main/java/util/DataBaseConnection.java): `src/main/java/util/DataBaseConnection.java`

### Other components

- **Bank operator**
- **PostgreSQL database**

## Connections

- Bank operator → Management console: chooses operation (evidence: `src/main/java/main/BankManagementSystem.java`)
- Management console → Account service: calls operations (evidence: `src/main/java/main/BankManagementSystem.java`)
- Management console → Account record: creates account (evidence: `src/main/java/main/BankManagementSystem.java`)
- Account service → Account changes: delegates changes (evidence: `src/main/java/service/BankAccountService.java`)
- Account service → Account queries: delegates queries (evidence: `src/main/java/service/BankAccountService.java`)
- Account service → Balance operations: delegates balance work (evidence: `src/main/java/service/BankAccountService.java`)
- Account service → Funds transfer: delegates transfers (evidence: `src/main/java/service/BankAccountService.java`)
- Account changes → Account record: maps account data (evidence: `src/main/java/dao/BankAccountDao.java`)
- Account queries → Account record: returns account data (evidence: `src/main/java/dao/BankAccountDao.java`)
- Account changes → JDBC connection: opens connection (evidence: `src/main/java/dao/BankAccountDao.java`)
- Account queries → JDBC connection: opens connection (evidence: `src/main/java/dao/BankAccountDao.java`)
- Balance operations → JDBC connection: opens connection (evidence: `src/main/java/dao/BankAccountDao.java`)
- Funds transfer → JDBC connection: opens connection (evidence: `src/main/java/dao/BankAccountDao.java`)
- JDBC connection → PostgreSQL database: connects via JDBC (evidence: `src/main/java/util/DataBaseConnection.java`)
- Account changes → PostgreSQL database: reads and writes (evidence: `src/main/java/dao/BankAccountDao.java`)
- Account queries → PostgreSQL database: queries accounts (evidence: `src/main/java/dao/BankAccountDao.java`)
- Balance operations → PostgreSQL database: reads and updates balances (evidence: `src/main/java/dao/BankAccountDao.java`)
- Funds transfer → PostgreSQL database: updates both balances (evidence: `src/main/java/dao/BankAccountDao.java`)
