# danvega/jev-spring-boot-starter architecture

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

- Interactive diagram: https://gitdiagram.com/danvega/jev-spring-boot-starter
- Repository: https://github.com/danvega/jev-spring-boot-starter

## Overview

Jev is a Spring Boot starter that lets an MVC application submit typed questions about application state to TypeSafe Jev and receive validated, named answers. The main workflow is application → JevClient → remote evaluation → JevResponse and typed Answer values. Question and request models define the input; Spring auto-configuration provides a configured client from properties when one is not supplied by the application. Source excerpts establish the client’s HTTP call and configuration wiring; the example endpoint implementation was not sampled.

Main entry points: [`src/main/java/dev/danvega/jev/JevClient.java`](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevClient.java) (Jev client), [`src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java) (Client auto-configuration), [`src/main/java/dev/danvega/jev/JevRequest.java`](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevRequest.java) (Evaluation request), [`src/main/java/dev/danvega/jev/JevResponse.java`](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevResponse.java) (Evaluation response)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_models["Request and answer models"]
  node_question["Typed questions<br/>[Question.java]"]
  node_request["Evaluation request<br/>[JevRequest.java]"]
  node_answer["Typed answers<br/>[Answer.java]"]
  node_response["Evaluation response<br/>[JevResponse.java]"]
end

subgraph group_runtime["Evaluation runtime"]
  node_client["Jev client<br/>[JevClient.java]"]
  node_typesafe{{"TypeSafe Jev API"}}
end

subgraph group_spring["Spring configuration"]
  node_autoconfig["Client auto-configuration"]
  node_properties["Jev properties<br/>[JevProperties.java]"]
  node_restclient["Spring RestClient"]
end

node_application(("MVC application"))

node_application -->|"evaluates with"| node_client
node_application -->|"defines"| node_question
node_client -->|"builds request"| node_request
node_request -->|"contains"| node_question
node_client -->|"posts evaluation"| node_typesafe
node_client -->|"decodes and validates"| node_response
node_response -->|"contains answers"| node_answer
node_autoconfig -->|"enables properties"| node_properties
node_autoconfig -->|"clones builder"| node_restclient
node_autoconfig -->|"registers bean"| node_client
node_properties -->|"provides settings"| node_autoconfig

click node_question "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/Question.java"
click node_request "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevRequest.java"
click node_answer "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/Answer.java"
click node_response "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevResponse.java"
click node_client "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevClient.java"
click node_autoconfig "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java"
click node_properties "https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/autoconfigure/JevProperties.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_question,node_request,node_answer,node_response toneBlue
class node_client,node_typesafe toneAmber
class node_autoconfig,node_properties,node_restclient toneMint
class node_application toneIndigo
```

## Components

### Request and answer models

- [Typed questions](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/Question.java): `src/main/java/dev/danvega/jev/Question.java`
- [Evaluation request](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevRequest.java): `src/main/java/dev/danvega/jev/JevRequest.java`
- [Typed answers](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/Answer.java): `src/main/java/dev/danvega/jev/Answer.java`
- [Evaluation response](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevResponse.java): `src/main/java/dev/danvega/jev/JevResponse.java`

### Evaluation runtime

- [Jev client](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/JevClient.java): `src/main/java/dev/danvega/jev/JevClient.java`
- **TypeSafe Jev API**

### Spring configuration

- [Client auto-configuration](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java): `src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`
- [Jev properties](https://github.com/danvega/jev-spring-boot-starter/blob/main/src/main/java/dev/danvega/jev/autoconfigure/JevProperties.java): `src/main/java/dev/danvega/jev/autoconfigure/JevProperties.java`
- **Spring RestClient**

### Other components

- **MVC application**

## Connections

- MVC application → Jev client: evaluates with (evidence: `README.md`)
- MVC application → Typed questions: defines (evidence: `README.md`)
- Jev client → Evaluation request: builds request (evidence: `src/main/java/dev/danvega/jev/JevClient.java`)
- Evaluation request → Typed questions: contains (evidence: `src/main/java/dev/danvega/jev/JevRequest.java`)
- Jev client → TypeSafe Jev API: posts evaluation (evidence: `src/main/java/dev/danvega/jev/JevClient.java`)
- Jev client → Evaluation response: decodes and validates (evidence: `src/main/java/dev/danvega/jev/JevClient.java`)
- Evaluation response → Typed answers: contains answers (evidence: `src/main/java/dev/danvega/jev/JevResponse.java`)
- Client auto-configuration → Jev properties: enables properties (evidence: `src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`)
- Client auto-configuration → Spring RestClient: clones builder (evidence: `src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`)
- Client auto-configuration → Jev client: registers bean (evidence: `src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`)
- Jev properties → Client auto-configuration: provides settings (evidence: `src/main/java/dev/danvega/jev/autoconfigure/JevAutoConfiguration.java`)
