# kiranpatted/banking-app architecture

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

- Interactive diagram: https://gitdiagram.com/kiranpatted/banking-app
- Repository: https://github.com/kiranpatted/banking-app

## Overview

This repository combines a core-banking REST API with a GitOps delivery platform. Users open accounts, deposit, withdraw, transfer funds, and inspect transaction history; the documented API and repository tree identify the relevant code, but no source excerpts were provided to verify internal calls. GitHub-triggered Tekton builds and pushes images, updates the dev deployment tag, and ArgoCD deploys environment overlays. Promotion reuses image tags. Terraform provisions AWS infrastructure, while Datadog supplies cluster monitoring and environment-specific monitors/SLOs.

Main entry points: [`src/main/java/com/example/banking/service/AccountService.java`](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/service/AccountService.java) (Banking operations), [`tekton/pipelines/ci-pipeline.yaml`](https://github.com/kiranpatted/banking-app/blob/main/tekton/pipelines/ci-pipeline.yaml) (CI pipeline), [`deploy/overlays`](https://github.com/kiranpatted/banking-app/tree/main/deploy/overlays) (Environment overlays), [`argocd/applicationset.yaml`](https://github.com/kiranpatted/banking-app/blob/main/argocd/applicationset.yaml) (ArgoCD applications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_banking["Banking API"]
  node_api["Account API"]
  node_service["Banking operations"]
  node_account["Account state<br/>[Account.java]"]
  node_transaction["Transaction history<br/>[Transaction.java]"]
  node_accountrepo["Account persistence"]
  node_transactionrepo["Transaction persistence"]
  node_database[("H2 / PostgreSQL")]
end

subgraph group_delivery["Build and Promotion"]
  node_pipeline["CI pipeline<br/>[ci-pipeline.yaml]"]
  node_tasks["Build and GitOps tasks"]
  node_promote["Promotion pipeline"]
  node_ecr[("Image registry")]
end

subgraph group_gitops["GitOps Deployment"]
  node_overlays["Environment overlays"]
  node_argocd["ArgoCD applications"]
  node_workload["OpenShift workloads"]
end

subgraph group_infrastructure["AWS Infrastructure"]
  node_terraform["Environment provisioning"]
  node_aws["AWS services and clusters"]
end

subgraph group_observability["Monitoring"]
  node_agent["Datadog agent<br/>[datadog-agent.yaml]"]
  node_monitors["Monitors and SLOs<br/>[main.tf]"]
end

node_customer(("API client"))
node_developer(("Developer"))
node_github(("GitHub"))
node_datadog(("Datadog"))

node_customer -->|"calls API"| node_api
node_developer -->|"pushes code"| node_github
node_github -->|"webhook triggers"| node_pipeline
node_pipeline -->|"runs tasks"| node_tasks
node_pipeline -->|"pushes image"| node_ecr
node_tasks -->|"updates dev tag"| node_overlays
node_promote -->|"promotes image tag"| node_overlays
node_argocd -->|"syncs applications"| node_overlays
node_argocd -->|"deploys workloads"| node_workload
node_terraform -->|"provisions resources"| node_aws
node_agent -->|"reports telemetry"| node_datadog
node_monitors -->|"configures monitors"| node_datadog
node_api -.->|"delegates operations"| node_service
node_service -.->|"persists accounts"| node_accountrepo
node_service -.->|"persists transactions"| node_transactionrepo
node_accountrepo -.->|"reads and writes"| node_database
node_transactionrepo -.->|"reads and writes"| node_database

click node_api "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/web/AccountController.java"
click node_service "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/service/AccountService.java"
click node_account "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/domain/Account.java"
click node_transaction "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/domain/Transaction.java"
click node_accountrepo "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/repository/AccountRepository.java"
click node_transactionrepo "https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/repository/TransactionRepository.java"
click node_pipeline "https://github.com/kiranpatted/banking-app/blob/main/tekton/pipelines/ci-pipeline.yaml"
click node_tasks "https://github.com/kiranpatted/banking-app/tree/main/tekton/tasks"
click node_promote "https://github.com/kiranpatted/banking-app/blob/main/tekton/pipelines/promote-pipeline.yaml"
click node_overlays "https://github.com/kiranpatted/banking-app/tree/main/deploy/overlays"
click node_argocd "https://github.com/kiranpatted/banking-app/blob/main/argocd/applicationset.yaml"
click node_workload "https://github.com/kiranpatted/banking-app/tree/main/deploy/base"
click node_terraform "https://github.com/kiranpatted/banking-app/tree/main/terraform/environments"
click node_aws "https://github.com/kiranpatted/banking-app/tree/main/terraform/modules"
click node_agent "https://github.com/kiranpatted/banking-app/blob/main/datadog/base/datadog-agent.yaml"
click node_monitors "https://github.com/kiranpatted/banking-app/blob/main/terraform/modules/datadog-monitors/main.tf"

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_api,node_service,node_account,node_transaction,node_accountrepo,node_transactionrepo,node_database,node_customer toneBlue
class node_pipeline,node_tasks,node_promote,node_ecr toneAmber
class node_overlays,node_argocd,node_workload toneMint
class node_terraform,node_aws toneRose
class node_agent,node_monitors,node_developer,node_github,node_datadog toneIndigo
```

## Components

### Banking API

- [Account API](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/web/AccountController.java): `src/main/java/com/example/banking/web/AccountController.java`
- [Banking operations](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/service/AccountService.java): `src/main/java/com/example/banking/service/AccountService.java`
- [Account state](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/domain/Account.java): `src/main/java/com/example/banking/domain/Account.java`
- [Transaction history](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/domain/Transaction.java): `src/main/java/com/example/banking/domain/Transaction.java`
- [Account persistence](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/repository/AccountRepository.java): `src/main/java/com/example/banking/repository/AccountRepository.java`
- [Transaction persistence](https://github.com/kiranpatted/banking-app/blob/main/src/main/java/com/example/banking/repository/TransactionRepository.java): `src/main/java/com/example/banking/repository/TransactionRepository.java`
- **H2 / PostgreSQL**

### Build and Promotion

- [CI pipeline](https://github.com/kiranpatted/banking-app/blob/main/tekton/pipelines/ci-pipeline.yaml): `tekton/pipelines/ci-pipeline.yaml`
- [Build and GitOps tasks](https://github.com/kiranpatted/banking-app/tree/main/tekton/tasks): `tekton/tasks`
- [Promotion pipeline](https://github.com/kiranpatted/banking-app/blob/main/tekton/pipelines/promote-pipeline.yaml): `tekton/pipelines/promote-pipeline.yaml`
- **Image registry**

### GitOps Deployment

- [Environment overlays](https://github.com/kiranpatted/banking-app/tree/main/deploy/overlays): `deploy/overlays`
- [ArgoCD applications](https://github.com/kiranpatted/banking-app/blob/main/argocd/applicationset.yaml): `argocd/applicationset.yaml`
- [OpenShift workloads](https://github.com/kiranpatted/banking-app/tree/main/deploy/base): `deploy/base`

### AWS Infrastructure

- [Environment provisioning](https://github.com/kiranpatted/banking-app/tree/main/terraform/environments): `terraform/environments`
- [AWS services and clusters](https://github.com/kiranpatted/banking-app/tree/main/terraform/modules): `terraform/modules`

### Monitoring

- [Datadog agent](https://github.com/kiranpatted/banking-app/blob/main/datadog/base/datadog-agent.yaml): `datadog/base/datadog-agent.yaml`
- [Monitors and SLOs](https://github.com/kiranpatted/banking-app/blob/main/terraform/modules/datadog-monitors/main.tf): `terraform/modules/datadog-monitors/main.tf`

### Other components

- **API client**
- **Developer**
- **GitHub**
- **Datadog**

## Connections

- API client → Account API: calls API (evidence: `README.md`)
- Developer → GitHub: pushes code (evidence: `README.md`)
- GitHub → CI pipeline: webhook triggers (evidence: `README.md`)
- CI pipeline → Build and GitOps tasks: runs tasks (evidence: `README.md`)
- CI pipeline → Image registry: pushes image (evidence: `README.md`)
- Build and GitOps tasks → Environment overlays: updates dev tag (evidence: `README.md`)
- Promotion pipeline → Environment overlays: promotes image tag (evidence: `README.md`)
- ArgoCD applications → Environment overlays: syncs applications (evidence: `README.md`)
- ArgoCD applications → OpenShift workloads: deploys workloads (evidence: `README.md`)
- Environment provisioning → AWS services and clusters: provisions resources (evidence: `README.md`)
- Datadog agent → Datadog: reports telemetry (evidence: `README.md`)
- Monitors and SLOs → Datadog: configures monitors (evidence: `README.md`)
- Account API → Banking operations: delegates operations
- Banking operations → Account persistence: persists accounts
- Banking operations → Transaction persistence: persists transactions
- Account persistence → H2 / PostgreSQL: reads and writes
- Transaction persistence → H2 / PostgreSQL: reads and writes
