# aryamore-1604/springbootonk8s_ps architecture

> Architecture diagram of the GitHub repository aryamore-1604/springbootonk8s_ps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aryamore-1604/springbootonk8s_ps
- Repository: https://github.com/aryamore-1604/springbootonk8s_ps

## Overview

This is a Spring Boot order CRUD API, packaged as a container and deployed with MySQL on Kubernetes. The main request path is client → Kubernetes application service → REST controller → order service → JPA repository, with orders represented by the Order entity and persisted in MySQL. The README also documents Docker Hub image distribution, a Kubernetes database workload, and persistent storage. Controller/service/repository calls are supported by excerpts; deployment relationships and broader CRUD coverage rely on README statements, since deployment manifests and configuration were not excerpted.

Main entry points: [`app-deployment.yaml`](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/app-deployment.yaml) (Spring Boot Pod), [`src/main/java/com/singam/crud/repository/OrderRepository.java`](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/repository/OrderRepository.java) (Order Repository), [`db-deployment.yaml`](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml) (MySQL Database), [`Dockerfile`](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/Dockerfile) (Application Image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Order API"]
  node_application["Application Startup"]
  node_controller["Order Controller"]
  node_order_service["Order Service<br/>[OrderService.java]"]
end

subgraph group_data["Persistence"]
  node_repository["Order Repository"]
  node_order["Order Entity<br/>[Order.java]"]
  node_mysql[("MySQL Database<br/>[db-deployment.yaml]")]
end

subgraph group_deployment["Kubernetes Deployment"]
  node_k8s_app_service["App Service"]
  node_app_pod["Spring Boot Pod"]
  node_mysql_service["MySQL Service<br/>[db-deployment.yaml]"]
  node_pvc[("Persistent Storage<br/>[db-deployment.yaml]")]
end

subgraph group_packaging["Container Packaging"]
  node_docker_image["Application Image"]
  node_docker_hub["Docker Hub"]
end

node_client(("API Client"))

node_client -->|"sends API requests"| node_k8s_app_service
node_k8s_app_service -->|"routes traffic"| node_app_pod
node_app_pod -->|"runs"| node_application
node_controller -->|"delegates operations"| node_order_service
node_order_service -->|"calls persistence"| node_repository
node_repository -->|"stores entity"| node_order
node_app_pod -.->|"serves REST API"| node_controller
node_repository -->|"persists orders"| node_mysql
node_mysql_service -->|"routes database traffic"| node_mysql
node_mysql -->|"uses persistent storage"| node_pvc
node_docker_image -->|"publishes image"| node_docker_hub
node_docker_image -->|"deploys image"| node_app_pod

click node_k8s_app_service "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/app-deployment.yaml"
click node_app_pod "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/app-deployment.yaml"
click node_application "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/SpringbootCrudK8sExampleApplication.java"
click node_controller "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/controller/OrderController.java"
click node_order_service "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/service/OrderService.java"
click node_repository "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/repository/OrderRepository.java"
click node_order "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/entity/Order.java"
click node_mysql_service "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml"
click node_mysql "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml"
click node_pvc "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml"
click node_docker_image "https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/Dockerfile"

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_application,node_controller,node_order_service,node_client toneBlue
class node_repository,node_order,node_mysql toneAmber
class node_k8s_app_service,node_app_pod,node_mysql_service,node_pvc toneMint
class node_docker_image,node_docker_hub toneRose
```

## Components

### Order API

- [Application Startup](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/SpringbootCrudK8sExampleApplication.java): `src/main/java/com/singam/crud/SpringbootCrudK8sExampleApplication.java`
- [Order Controller](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/controller/OrderController.java): `src/main/java/com/singam/crud/controller/OrderController.java`
- [Order Service](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/service/OrderService.java): `src/main/java/com/singam/crud/service/OrderService.java`

### Persistence

- [Order Repository](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/repository/OrderRepository.java): `src/main/java/com/singam/crud/repository/OrderRepository.java`
- [Order Entity](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/src/main/java/com/singam/crud/entity/Order.java): `src/main/java/com/singam/crud/entity/Order.java`
- [MySQL Database](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml): `db-deployment.yaml`

### Kubernetes Deployment

- [App Service](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/app-deployment.yaml): `app-deployment.yaml`
- [Spring Boot Pod](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/app-deployment.yaml): `app-deployment.yaml`
- [MySQL Service](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml): `db-deployment.yaml`
- [Persistent Storage](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/db-deployment.yaml): `db-deployment.yaml`

### Container Packaging

- [Application Image](https://github.com/aryamore-1604/springbootonk8s_ps/blob/master/Dockerfile): `Dockerfile`
- **Docker Hub**

### Other components

- **API Client**

## Connections

- API Client → App Service: sends API requests (evidence: `README.md`)
- App Service → Spring Boot Pod: routes traffic (evidence: `README.md`)
- Spring Boot Pod → Application Startup: runs (evidence: `README.md`)
- Order Controller → Order Service: delegates operations (evidence: `src/main/java/com/singam/crud/controller/OrderController.java`)
- Order Service → Order Repository: calls persistence (evidence: `src/main/java/com/singam/crud/service/OrderService.java`)
- Order Repository → Order Entity: stores entity (evidence: `src/main/java/com/singam/crud/repository/OrderRepository.java`)
- Spring Boot Pod → Order Controller: serves REST API
- Order Repository → MySQL Database: persists orders (evidence: `README.md`)
- MySQL Service → MySQL Database: routes database traffic (evidence: `README.md`)
- MySQL Database → Persistent Storage: uses persistent storage (evidence: `README.md`)
- Application Image → Docker Hub: publishes image (evidence: `README.md`)
- Application Image → Spring Boot Pod: deploys image (evidence: `README.md`)
