# temporalio/spring-boot-demo architecture

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

- Interactive diagram: https://gitdiagram.com/temporalio/spring-boot-demo
- Repository: https://github.com/temporalio/spring-boot-demo

## Overview

This demo combines a Spring Boot web UI with a Temporal workflow and automatically managed worker. The documented user flow starts a CloudEvents-formatted workflow, signals it to continue, then queries it or retrieves its result. The UI also exposes workflow listing, cluster information, and monitoring links. The README documents local and Temporal Cloud connection options and mentions metrics and tracing, while noting those capabilities are not yet fully updated. Source excerpts were unavailable, so internal call relationships are omitted.

Main entry points: [`src/main/java/com/temporal/demos/temporalspringbootdemo/workflows/DemoWorkflowImpl.java`](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/workflows/DemoWorkflowImpl.java) (Demo Workflow), [`src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/NavProcessor.java`](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/NavProcessor.java) (Monitoring Links), [`src/main/java/com/temporal/demos/temporalspringbootdemo/TemporalSpringbootDemoApplication.java`](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/TemporalSpringbootDemoApplication.java) (Spring Boot App), [`src/main/resources/application.yml`](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/application.yml) (Worker Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_app["Spring Boot App"]
  node_worker["Worker Setup<br/>[application.yml]"]
end

subgraph group_workflow["Workflow Execution"]
  node_workflow["Demo Workflow"]
  node_activity["Demo Activities"]
  node_converter["CloudEvents Converter"]
end

subgraph group_web["Workflow Web UI"]
  node_webui["Workflow UI"]
  node_controller["UI Controller"]
  node_dialect["Temporal Tags"]
  node_start["Start Workflow"]
  node_list["List Workflows"]
  node_cluster["Cluster Info"]
  node_nav["Monitoring Links<br/>[NavProcessor.java]"]
end

subgraph group_integrations["Connections and Monitoring"]
  node_temporal[("Temporal Server")]
  node_cloudconfig["Cloud Config"]
  node_grafana["Grafana"]
  node_jaeger["Jaeger"]
end

node_user(("Demo User"))

node_user -->|"uses"| node_webui
node_webui -->|"offers tags"| node_dialect
node_user -->|"starts workflow"| node_start
node_user -->|"manages executions"| node_list
node_user -->|"views cluster"| node_cluster
node_user -->|"opens links"| node_nav
node_app -->|"connects"| node_temporal
node_worker -->|"auto-discovers"| node_workflow
node_worker -->|"auto-discovers"| node_activity
node_workflow -->|"executes on"| node_temporal
node_user -->|"signals execution"| node_workflow
node_user -->|"queries execution"| node_workflow
node_user -->|"gets result"| node_workflow
node_user -->|"provides CloudEvents"| node_converter
node_app -.->|"uses cloud profile"| node_cloudconfig
node_nav -->|"links to"| node_grafana
node_nav -->|"links to"| node_jaeger
node_temporal -.->|"metrics integration"| node_grafana
node_temporal -.->|"tracing integration"| node_jaeger

click node_app "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/TemporalSpringbootDemoApplication.java"
click node_worker "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/application.yml"
click node_cloudconfig "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/application-cloud.yml"
click node_workflow "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/workflows/DemoWorkflowImpl.java"
click node_activity "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/activities/DemoActivitiesImpl.java"
click node_converter "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/converter/CloudEventsPayloadConverter.java"
click node_webui "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/templates/temporalwebdialect.html"
click node_controller "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/controller/TemporalWebDialectController.java"
click node_dialect "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/dialect/TemporalWebDialect.java"
click node_start "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/StartWorkflowProcessor.java"
click node_list "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ListWorkflowsProcessor.java"
click node_cluster "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ClusterInfoProcessor.java"
click node_nav "https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/NavProcessor.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_app,node_worker,node_user toneBlue
class node_workflow,node_activity,node_converter toneAmber
class node_webui,node_controller,node_dialect,node_start,node_list,node_cluster,node_nav toneMint
class node_temporal,node_cloudconfig,node_grafana,node_jaeger toneRose
```

## Components

### Application Runtime

- [Spring Boot App](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/TemporalSpringbootDemoApplication.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/TemporalSpringbootDemoApplication.java`
- [Worker Setup](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/application.yml): `src/main/resources/application.yml`

### Workflow Execution

- [Demo Workflow](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/workflows/DemoWorkflowImpl.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/workflows/DemoWorkflowImpl.java`
- [Demo Activities](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/activities/DemoActivitiesImpl.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/activities/DemoActivitiesImpl.java`
- [CloudEvents Converter](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/converter/CloudEventsPayloadConverter.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/converter/CloudEventsPayloadConverter.java`

### Workflow Web UI

- [Workflow UI](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/templates/temporalwebdialect.html): `src/main/resources/templates/temporalwebdialect.html`
- [UI Controller](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/controller/TemporalWebDialectController.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/controller/TemporalWebDialectController.java`
- [Temporal Tags](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/dialect/TemporalWebDialect.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/dialect/TemporalWebDialect.java`
- [Start Workflow](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/StartWorkflowProcessor.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/StartWorkflowProcessor.java`
- [List Workflows](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ListWorkflowsProcessor.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ListWorkflowsProcessor.java`
- [Cluster Info](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ClusterInfoProcessor.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/ClusterInfoProcessor.java`
- [Monitoring Links](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/NavProcessor.java): `src/main/java/com/temporal/demos/temporalspringbootdemo/webui/processor/NavProcessor.java`

### Connections and Monitoring

- **Temporal Server**
- [Cloud Config](https://github.com/temporalio/spring-boot-demo/blob/main/src/main/resources/application-cloud.yml): `src/main/resources/application-cloud.yml`
- **Grafana**
- **Jaeger**

### Other components

- **Demo User**

## Connections

- Demo User → Workflow UI: uses (evidence: `README.md`)
- Workflow UI → Temporal Tags: offers tags (evidence: `README.md`)
- Demo User → Start Workflow: starts workflow (evidence: `README.md`)
- Demo User → List Workflows: manages executions (evidence: `README.md`)
- Demo User → Cluster Info: views cluster (evidence: `README.md`)
- Demo User → Monitoring Links: opens links (evidence: `README.md`)
- Spring Boot App → Temporal Server: connects (evidence: `README.md`)
- Worker Setup → Demo Workflow: auto-discovers (evidence: `README.md`)
- Worker Setup → Demo Activities: auto-discovers (evidence: `README.md`)
- Demo Workflow → Temporal Server: executes on (evidence: `README.md`)
- Demo User → Demo Workflow: signals execution (evidence: `README.md`)
- Demo User → Demo Workflow: queries execution (evidence: `README.md`)
- Demo User → Demo Workflow: gets result (evidence: `README.md`)
- Demo User → CloudEvents Converter: provides CloudEvents (evidence: `README.md`)
- Spring Boot App → Cloud Config: uses cloud profile (evidence: `README.md`)
- Monitoring Links → Grafana: links to (evidence: `README.md`)
- Monitoring Links → Jaeger: links to (evidence: `README.md`)
- Temporal Server → Grafana: metrics integration (evidence: `README.md`)
- Temporal Server → Jaeger: tracing integration (evidence: `README.md`)
