# yassin-mjd/e-bank_application architecture

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

- Interactive diagram: https://gitdiagram.com/yassin-mjd/e-bank_application
- Repository: https://github.com/yassin-mjd/e-bank_application

## Overview

This repository contains separate Spring Boot customer and bank-account services, each exposing REST endpoints backed by a service layer and Spring Data repositories. The customer workflow reads or saves customers; the account workflow reads or creates accounts, with account IDs and timestamps assigned by its service. Each service also seeds sample data at startup. The tree includes a third Spring Boot entrypoint, but the available source shows no connection from it to either service. Database connections are implicit in the repository types; no database configuration was provided.

Main entry points: [`customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java`](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java) (Customer repository), [`ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java`](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java) (Account repository), [`customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java`](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java) (Customer service logic), [`ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java`](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java) (Account service logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer service"]
  node_customer_api["Customer API"]
  node_customer_logic["Customer service logic"]
  node_customer_repo["Customer repository"]
  node_customer_boot["Customer startup seeding"]
end

subgraph group_banking["Bank account service"]
  node_account_api["Account API"]
  node_account_logic["Account service logic<br/>[EbankService.java]"]
  node_account_repo["Account repository"]
  node_account_boot["Account startup seeding"]
end

subgraph group_storage["Persistence models"]
  node_customer_entity["Customer entity<br/>[Customer.java]"]
  node_customer_db[("Customer database")]
  node_account_entity["Bank account entity<br/>[BankAccount.java]"]
  node_account_customer_model["Account customer model<br/>[Customer.java]"]
  node_account_db[("Account database")]
end

subgraph group_entrypoints["Application entrypoints"]
  node_root_boot["Additional app launcher"]
end

node_client(("REST client"))

node_client -->|"sends REST requests"| node_customer_api
node_customer_api -->|"delegates"| node_customer_logic
node_customer_logic -->|"reads and saves"| node_customer_repo
node_customer_repo -->|"persists"| node_customer_entity
node_customer_repo -.->|"uses JPA"| node_customer_db
node_customer_boot -->|"seeds customers"| node_customer_logic
node_client -->|"sends REST requests"| node_account_api
node_account_api -->|"delegates"| node_account_logic
node_account_logic -->|"reads and saves"| node_account_repo
node_account_repo -->|"persists"| node_account_entity
node_account_repo -.->|"uses JPA"| node_account_db
node_account_boot -->|"seeds accounts"| node_account_logic
node_account_entity -->|"holds transient field"| node_account_customer_model

click node_customer_api "https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/controllers/CustomerRestController.java"
click node_customer_logic "https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java"
click node_customer_repo "https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java"
click node_customer_entity "https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/entities/Customer.java"
click node_customer_boot "https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/CustomerServiceApplication.java"
click node_account_api "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/controllers/EbankRestController.java"
click node_account_logic "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java"
click node_account_repo "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java"
click node_account_entity "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/entities/BankAccount.java"
click node_account_customer_model "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/model/Customer.java"
click node_account_boot "https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/EbankServiceApplication.java"
click node_root_boot "https://github.com/yassin-mjd/e-bank_application/blob/main/src/main/java/net/yassine/ebankmsapp/EbankMsAppApplication.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_customer_api,node_customer_logic,node_customer_repo,node_customer_boot,node_client toneBlue
class node_account_api,node_account_logic,node_account_repo,node_account_boot toneAmber
class node_customer_entity,node_customer_db,node_account_entity,node_account_customer_model,node_account_db toneMint
class node_root_boot toneRose
```

## Components

### Customer service

- [Customer API](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/controllers/CustomerRestController.java): `customer-service/src/main/java/net/yassine/customerservice/controllers/CustomerRestController.java`
- [Customer service logic](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java): `customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java`
- [Customer repository](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java): `customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java`
- [Customer startup seeding](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/CustomerServiceApplication.java): `customer-service/src/main/java/net/yassine/customerservice/CustomerServiceApplication.java`

### Bank account service

- [Account API](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/controllers/EbankRestController.java): `ebank-service/src/main/java/net/yassine/ebankservice/controllers/EbankRestController.java`
- [Account service logic](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java): `ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java`
- [Account repository](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java): `ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java`
- [Account startup seeding](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/EbankServiceApplication.java): `ebank-service/src/main/java/net/yassine/ebankservice/EbankServiceApplication.java`

### Persistence models

- [Customer entity](https://github.com/yassin-mjd/e-bank_application/blob/main/customer-service/src/main/java/net/yassine/customerservice/entities/Customer.java): `customer-service/src/main/java/net/yassine/customerservice/entities/Customer.java`
- **Customer database**
- [Bank account entity](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/entities/BankAccount.java): `ebank-service/src/main/java/net/yassine/ebankservice/entities/BankAccount.java`
- [Account customer model](https://github.com/yassin-mjd/e-bank_application/blob/main/ebank-service/src/main/java/net/yassine/ebankservice/model/Customer.java): `ebank-service/src/main/java/net/yassine/ebankservice/model/Customer.java`
- **Account database**

### Application entrypoints

- [Additional app launcher](https://github.com/yassin-mjd/e-bank_application/blob/main/src/main/java/net/yassine/ebankmsapp/EbankMsAppApplication.java): `src/main/java/net/yassine/ebankmsapp/EbankMsAppApplication.java`

### Other components

- **REST client**

## Connections

- REST client → Customer API: sends REST requests
- Customer API → Customer service logic: delegates (evidence: `customer-service/src/main/java/net/yassine/customerservice/controllers/CustomerRestController.java`)
- Customer service logic → Customer repository: reads and saves (evidence: `customer-service/src/main/java/net/yassine/customerservice/service/CustomerService.java`)
- Customer repository → Customer entity: persists (evidence: `customer-service/src/main/java/net/yassine/customerservice/repository/CustomerRepository.java`)
- Customer repository → Customer database: uses JPA
- Customer startup seeding → Customer service logic: seeds customers (evidence: `customer-service/src/main/java/net/yassine/customerservice/CustomerServiceApplication.java`)
- REST client → Account API: sends REST requests
- Account API → Account service logic: delegates (evidence: `ebank-service/src/main/java/net/yassine/ebankservice/controllers/EbankRestController.java`)
- Account service logic → Account repository: reads and saves (evidence: `ebank-service/src/main/java/net/yassine/ebankservice/service/EbankService.java`)
- Account repository → Bank account entity: persists (evidence: `ebank-service/src/main/java/net/yassine/ebankservice/repository/BankAccountRepository.java`)
- Account repository → Account database: uses JPA
- Account startup seeding → Account service logic: seeds accounts (evidence: `ebank-service/src/main/java/net/yassine/ebankservice/EbankServiceApplication.java`)
- Bank account entity → Account customer model: holds transient field (evidence: `ebank-service/src/main/java/net/yassine/ebankservice/entities/BankAccount.java`)
