# lea-rn/banks-project architecture

> Architecture diagram of the GitHub repository lea-rn/banks-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lea-rn/banks-project
- Repository: https://github.com/lea-rn/banks-project

## Overview

This is a small browser-based banking demo. The principal workflow is to log in to an in-memory account, view its movements and summary, and perform transfers, loans, or account closure; movement sorting is also available. The supplied excerpt shows these operations in app.js and their DOM interactions. The HTML structure and remaining rendering logic were not sampled, so the graph keeps the browser UI boundary general and omits unsupported wiring details.

Main entry points: [`index.html`](https://github.com/lea-rn/banks-project/blob/main/index.html) (Banking interface), [`app.js`](https://github.com/lea-rn/banks-project/blob/main/app.js) (Account login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_banking["Banking demo"]
  node_accounts[("Account data<br/>[app.js]")]
  node_login["Account login<br/>[app.js]"]
  node_transfer["Money transfer<br/>[app.js]"]
  node_loan["Loan request<br/>[app.js]"]
  node_closure["Account closure<br/>[app.js]"]
end

subgraph group_interface["Browser interface"]
  node_movement_view["Movement list<br/>[app.js]"]
  node_account_summary["Account summary<br/>[app.js]"]
  node_browser_ui["Banking interface<br/>[index.html]"]
end

node_customer(("Bank customer"))

node_customer -->|"uses"| node_browser_ui
node_browser_ui -->|"submits login"| node_login
node_login -->|"finds account"| node_accounts
node_login -->|"updates UI"| node_account_summary
node_login -->|"updates UI"| node_movement_view
node_browser_ui -->|"submits transfer"| node_transfer
node_transfer -->|"updates movements"| node_accounts
node_transfer -->|"refreshes UI"| node_account_summary
node_transfer -->|"refreshes UI"| node_movement_view
node_browser_ui -->|"submits request"| node_loan
node_loan -->|"adds movement"| node_accounts
node_loan -->|"refreshes UI"| node_account_summary
node_loan -->|"refreshes UI"| node_movement_view
node_browser_ui -->|"submits closure"| node_closure
node_closure -->|"removes account"| node_accounts
node_browser_ui -->|"sorts movements"| node_movement_view

click node_accounts "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_login "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_transfer "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_loan "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_closure "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_movement_view "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_account_summary "https://github.com/lea-rn/banks-project/blob/main/app.js"
click node_browser_ui "https://github.com/lea-rn/banks-project/blob/main/index.html"

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_accounts,node_login,node_transfer,node_loan,node_closure toneBlue
class node_movement_view,node_account_summary,node_browser_ui toneAmber
class node_customer toneIndigo
```

## Components

### Banking demo

- [Account data](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Account login](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Money transfer](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Loan request](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Account closure](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`

### Browser interface

- [Movement list](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Account summary](https://github.com/lea-rn/banks-project/blob/main/app.js): `app.js`
- [Banking interface](https://github.com/lea-rn/banks-project/blob/main/index.html): `index.html`

### Other components

- **Bank customer**

## Connections

- Bank customer → Banking interface: uses
- Banking interface → Account login: submits login (evidence: `app.js`)
- Account login → Account data: finds account (evidence: `app.js`)
- Account login → Account summary: updates UI (evidence: `app.js`)
- Account login → Movement list: updates UI (evidence: `app.js`)
- Banking interface → Money transfer: submits transfer (evidence: `app.js`)
- Money transfer → Account data: updates movements (evidence: `app.js`)
- Money transfer → Account summary: refreshes UI (evidence: `app.js`)
- Money transfer → Movement list: refreshes UI (evidence: `app.js`)
- Banking interface → Loan request: submits request (evidence: `app.js`)
- Loan request → Account data: adds movement (evidence: `app.js`)
- Loan request → Account summary: refreshes UI (evidence: `app.js`)
- Loan request → Movement list: refreshes UI (evidence: `app.js`)
- Banking interface → Account closure: submits closure (evidence: `app.js`)
- Account closure → Account data: removes account (evidence: `app.js`)
- Banking interface → Movement list: sorts movements (evidence: `app.js`)
