# krishnatvc/travel-insurance architecture

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

- Interactive diagram: https://gitdiagram.com/krishnatvc/travel-insurance
- Repository: https://github.com/krishnatvc/travel-insurance

## Overview

This is a training demo for submitting travel-insurance claims. A customer moves through four browser steps, submits a claim, and receives a reference; the backend validates and saves it to MySQL. The README documents the UI, API, persistence, retry behavior, informational dialogs, and health check. Source excerpts were not provided, so relationships below rely on README statements; implementation details beyond those statements are omitted.

Main entry points: [`src/main/java/com/example/travel/App.java`](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/java/com/example/travel/App.java) (Claims API), [`src/main/resources/static/index.html`](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html) (Submit claim), [`src/main/resources/schema.sql`](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/schema.sql) (Claims schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Claim journey"]
  node_customer_info["Customer information<br/>[index.html]"]
  node_claim_info["Claim information<br/>[index.html]"]
  node_review["Review claim<br/>[index.html]"]
  node_submit["Submit claim<br/>[index.html]"]
  node_info_dialogs["Information dialogs<br/>[index.html]"]
end

subgraph group_service["Application service"]
  node_claims_api["Claims API<br/>[App.java]"]
  node_health["Health endpoint<br/>[App.java]"]
end

subgraph group_storage["Claim storage"]
  node_schema["Claims schema<br/>[schema.sql]"]
  node_mysql[("MySQL database")]
end

node_customer(("Customer"))

node_customer -->|"enters booking"| node_customer_info
node_customer_info -->|"continues to"| node_claim_info
node_claim_info -->|"reviews details"| node_review
node_review -->|"confirms declaration"| node_submit
node_submit -->|"posts claim"| node_claims_api
node_claims_api -->|"saves claim"| node_mysql
node_claims_api -->|"returns reference"| node_submit
node_schema -->|"creates claims table"| node_mysql
node_health -->|"checks connectivity"| node_mysql

click node_customer_info "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html"
click node_claim_info "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html"
click node_review "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html"
click node_submit "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html"
click node_info_dialogs "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html"
click node_claims_api "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/java/com/example/travel/App.java"
click node_health "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/java/com/example/travel/App.java"
click node_schema "https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/schema.sql"

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_customer_info,node_claim_info,node_review,node_submit,node_info_dialogs toneBlue
class node_claims_api,node_health toneAmber
class node_schema,node_mysql toneMint
class node_customer toneIndigo
```

## Components

### Claim journey

- [Customer information](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [Claim information](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [Review claim](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [Submit claim](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`
- [Information dialogs](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/static/index.html): `src/main/resources/static/index.html`

### Application service

- [Claims API](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/java/com/example/travel/App.java): `src/main/java/com/example/travel/App.java`
- [Health endpoint](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/java/com/example/travel/App.java): `src/main/java/com/example/travel/App.java`

### Claim storage

- [Claims schema](https://github.com/krishnatvc/travel-insurance/blob/main/src/main/resources/schema.sql): `src/main/resources/schema.sql`
- **MySQL database**

### Other components

- **Customer**

## Connections

- Customer → Customer information: enters booking (evidence: `README.md`)
- Customer information → Claim information: continues to (evidence: `README.md`)
- Claim information → Review claim: reviews details (evidence: `README.md`)
- Review claim → Submit claim: confirms declaration (evidence: `README.md`)
- Submit claim → Claims API: posts claim (evidence: `README.md`)
- Claims API → MySQL database: saves claim (evidence: `README.md`)
- Claims API → Submit claim: returns reference (evidence: `README.md`)
- Claims schema → MySQL database: creates claims table (evidence: `README.md`)
- Health endpoint → MySQL database: checks connectivity (evidence: `README.md`)
