# felixjonsson/bank-website architecture

> Architecture diagram of the GitHub repository felixjonsson/bank-website, 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/felixjonsson/bank-website
- Repository: https://github.com/felixjonsson/bank-website

## Overview

BranchBuds is a personal budget web application: users view a financial dashboard and manage categorized transactions through server-rendered and AJAX/REST interfaces. The documented backend uses a facade, EAO persistence layer, and JPA entities. Sampled code shows the dashboard servlet and transaction REST handler calling the facade, and the facade delegating to EAOs. The README documents AJAX behavior and layered persistence; source excerpts do not establish all client routes or database wiring, so those links are omitted or marked unverified.

Main entry points: [`BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java`](https://github.com/felixjonsson/bank-website/blob/main/BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java) (System facade), [`BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java`](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java) (Dashboard controller), [`BranchBudsRestClient/src/main/webapp/js/transaction.js`](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsRestClient/src/main/webapp/js/transaction.js) (AJAX client), [`BranchBudsWeb/src/main/java/isp/restserver/Transactions.java`](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/restserver/Transactions.java) (Transaction REST API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Web presentation"]
  node_dashboard["Dashboard controller"]
  node_dashboardview["Web landing view<br/>[index.jsp]"]
  node_restclient["AJAX client<br/>[transaction.js]"]
end

subgraph group_api["Transaction API"]
  node_transactionapi["Transaction REST API<br/>[Transactions.java]"]
  node_accountapi["Account REST API<br/>[Accounts.java]"]
end

subgraph group_business["Business services"]
  node_facade["System facade<br/>[SystemFacade.java]"]
  node_facadecontract["Facade contract"]
end

subgraph group_persistence["Persistence model"]
  node_eao["EAO persistence access"]
  node_entities["JPA domain entities"]
  node_database[("Relational database")]
end

node_user(("Budget user"))

node_user -->|"requests dashboard"| node_dashboard
node_dashboard -->|"loads dashboard data"| node_facade
node_dashboard -.->|"forwards view"| node_dashboardview
node_user -->|"manages transactions"| node_restclient
node_restclient -.->|"sends AJAX requests"| node_transactionapi
node_transactionapi -->|"requests transaction operations"| node_facade
node_accountapi -->|"requests account data"| node_facade
node_facade -->|"delegates persistence"| node_eao
node_eao -->|"queries and updates"| node_entities
node_entities -.->|"maps relational data"| node_database

click node_dashboard "https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java"
click node_dashboardview "https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/webapp/index.jsp"
click node_restclient "https://github.com/felixjonsson/bank-website/blob/main/BranchBudsRestClient/src/main/webapp/js/transaction.js"
click node_transactionapi "https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/restserver/Transactions.java"
click node_accountapi "https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/restserver/Accounts.java"
click node_facade "https://github.com/felixjonsson/bank-website/blob/main/BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java"
click node_facadecontract "https://github.com/felixjonsson/bank-website/blob/main/BranchbudsEJBProject/ejbModule/isp/facade/SystemFacadeLocal.java"
click node_eao "https://github.com/felixjonsson/bank-website/tree/main/BranchbudsEJBProject/ejbModule/isp/eao"
click node_entities "https://github.com/felixjonsson/bank-website/tree/main/BranchbudsEJBProject/ejbModule/isp/entity"

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_dashboard,node_dashboardview,node_restclient,node_user toneBlue
class node_transactionapi,node_accountapi toneAmber
class node_facade,node_facadecontract toneMint
class node_eao,node_entities,node_database toneRose
```

## Components

### Web presentation

- [Dashboard controller](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java): `BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java`
- [Web landing view](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/webapp/index.jsp): `BranchBudsWeb/src/main/webapp/index.jsp`
- [AJAX client](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsRestClient/src/main/webapp/js/transaction.js): `BranchBudsRestClient/src/main/webapp/js/transaction.js`

### Transaction API

- [Transaction REST API](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/restserver/Transactions.java): `BranchBudsWeb/src/main/java/isp/restserver/Transactions.java`
- [Account REST API](https://github.com/felixjonsson/bank-website/blob/main/BranchBudsWeb/src/main/java/isp/restserver/Accounts.java): `BranchBudsWeb/src/main/java/isp/restserver/Accounts.java`

### Business services

- [System facade](https://github.com/felixjonsson/bank-website/blob/main/BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java): `BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java`
- [Facade contract](https://github.com/felixjonsson/bank-website/blob/main/BranchbudsEJBProject/ejbModule/isp/facade/SystemFacadeLocal.java): `BranchbudsEJBProject/ejbModule/isp/facade/SystemFacadeLocal.java`

### Persistence model

- [EAO persistence access](https://github.com/felixjonsson/bank-website/tree/main/BranchbudsEJBProject/ejbModule/isp/eao): `BranchbudsEJBProject/ejbModule/isp/eao`
- [JPA domain entities](https://github.com/felixjonsson/bank-website/tree/main/BranchbudsEJBProject/ejbModule/isp/entity): `BranchbudsEJBProject/ejbModule/isp/entity`
- **Relational database**

### Other components

- **Budget user**

## Connections

- Budget user → Dashboard controller: requests dashboard (evidence: `README.md`)
- Dashboard controller → System facade: loads dashboard data (evidence: `BranchBudsWeb/src/main/java/isp/servlet/MainViewServlet.java`)
- Dashboard controller → Web landing view: forwards view
- Budget user → AJAX client: manages transactions (evidence: `README.md`)
- AJAX client → Transaction REST API: sends AJAX requests
- Transaction REST API → System facade: requests transaction operations (evidence: `BranchBudsWeb/src/main/java/isp/restserver/Transactions.java`)
- Account REST API → System facade: requests account data (evidence: `BranchBudsWeb/src/main/java/isp/restserver/Accounts.java`)
- System facade → EAO persistence access: delegates persistence (evidence: `BranchbudsEJBProject/ejbModule/isp/facade/SystemFacade.java`)
- EAO persistence access → JPA domain entities: queries and updates (evidence: `BranchbudsEJBProject/ejbModule/isp/eao/TransactionEAOImpl.java`)
- JPA domain entities → Relational database: maps relational data (evidence: `README.md`)
