# senac-sp-ara/app-senac-aws architecture

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

- Interactive diagram: https://gitdiagram.com/senac-sp-ara/app-senac-aws
- Repository: https://github.com/senac-sp-ara/app-senac-aws

## Overview

This repository is a Spring Boot demo service and its documented EKS runtime configuration. The user workflow is an HTTP request through API Gateway and an internal NLB to a Kubernetes service and application pod; the controller returns an HTML greeting identifying the pod hostname and IP. Kubernetes health probes and CPU-based autoscaling support the deployment. The README describes infrastructure and scaling relationships; source excerpts were not provided, so edges rely on those documented relationships.

Main entry points: [`src/main/java/sp/senac/demo/aws/DemoAwsApplication.java`](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/DemoAwsApplication.java) (Spring Boot Pods), [`src/main/java/sp/senac/demo/aws/controller/ControllerAWS.java`](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/controller/ControllerAWS.java) (Greeting Controller), [`k8s/service.yaml`](https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/service.yaml) (NodePort Service), [`k8s/deployment.yaml`](https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/deployment.yaml) (Application Deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Spring Boot Service"]
  node_entry["Spring Boot Entry"]
  node_controller["Greeting Controller<br/>[ControllerAWS.java]"]
end

subgraph group_routing["AWS Traffic Routing"]
  node_api{{"API Gateway"}}
  node_nlb{{"Internal NLB"}}
end

subgraph group_cluster["EKS Workloads"]
  node_service["NodePort Service<br/>[service.yaml]"]
  node_deployment["Application Deployment<br/>[deployment.yaml]"]
  node_pods["Spring Boot Pods"]
end

subgraph group_scaling["Health and Scaling"]
  node_probes["Health Probes<br/>[application.yaml]"]
  node_hpa["Horizontal Autoscaler<br/>[hpa.yaml]"]
  node_metrics{{"Metrics Server"}}
end

node_user(("User / Client"))

node_user -->|"sends request"| node_api
node_api -->|"VPC Link"| node_nlb
node_nlb -->|"forwards traffic"| node_service
node_service -->|"routes requests"| node_pods
node_deployment -->|"manages replicas"| node_pods
node_pods -->|"runs"| node_entry
node_entry -->|"serves endpoint"| node_controller
node_controller -->|"returns HTML"| node_user
node_probes -->|"exposes health"| node_pods
node_hpa -->|"scales replicas"| node_deployment
node_metrics -->|"provides metrics"| node_hpa

click node_service "https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/service.yaml"
click node_deployment "https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/deployment.yaml"
click node_pods "https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/DemoAwsApplication.java"
click node_entry "https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/DemoAwsApplication.java"
click node_controller "https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/controller/ControllerAWS.java"
click node_probes "https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/resources/application.yaml"
click node_hpa "https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/hpa.yaml"

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_entry,node_controller,node_user toneBlue
class node_api,node_nlb toneAmber
class node_service,node_deployment,node_pods toneMint
class node_probes,node_hpa,node_metrics toneRose
```

## Components

### Spring Boot Service

- [Spring Boot Entry](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/DemoAwsApplication.java): `src/main/java/sp/senac/demo/aws/DemoAwsApplication.java`
- [Greeting Controller](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/controller/ControllerAWS.java): `src/main/java/sp/senac/demo/aws/controller/ControllerAWS.java`

### AWS Traffic Routing

- **API Gateway**
- **Internal NLB**

### EKS Workloads

- [NodePort Service](https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/service.yaml): `k8s/service.yaml`
- [Application Deployment](https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/deployment.yaml): `k8s/deployment.yaml`
- [Spring Boot Pods](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/java/sp/senac/demo/aws/DemoAwsApplication.java): `src/main/java/sp/senac/demo/aws/DemoAwsApplication.java`

### Health and Scaling

- [Health Probes](https://github.com/senac-sp-ara/app-senac-aws/blob/main/src/main/resources/application.yaml): `src/main/resources/application.yaml`
- [Horizontal Autoscaler](https://github.com/senac-sp-ara/app-senac-aws/blob/main/k8s/hpa.yaml): `k8s/hpa.yaml`
- **Metrics Server**

### Other components

- **User / Client**

## Connections

- User / Client → API Gateway: sends request (evidence: `README.md`)
- API Gateway → Internal NLB: VPC Link (evidence: `README.md`)
- Internal NLB → NodePort Service: forwards traffic (evidence: `README.md`)
- NodePort Service → Spring Boot Pods: routes requests (evidence: `README.md`)
- Application Deployment → Spring Boot Pods: manages replicas (evidence: `README.md`)
- Spring Boot Pods → Spring Boot Entry: runs (evidence: `README.md`)
- Spring Boot Entry → Greeting Controller: serves endpoint (evidence: `README.md`)
- Greeting Controller → User / Client: returns HTML (evidence: `README.md`)
- Health Probes → Spring Boot Pods: exposes health (evidence: `README.md`)
- Horizontal Autoscaler → Application Deployment: scales replicas (evidence: `README.md`)
- Metrics Server → Horizontal Autoscaler: provides metrics (evidence: `README.md`)
