# kritultrathod/dotnetcorehealthchecks architecture

> Architecture diagram of the GitHub repository kritultrathod/dotnetcorehealthchecks, 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/kritultrathod/dotnetcorehealthchecks
- Repository: https://github.com/kritultrathod/dotnetcorehealthchecks

## Overview

The repository contains two ASP.NET Core applications: a health-check UI host and a sample service exposing health checks and a weather API. The main user workflow is to request the UI or service endpoints; the service’s health endpoint runs registered checks and returns their status, while its controller serves generated forecasts. The UI host maps the HealthChecks UI and configures in-memory storage. The README gives only a high-level description, so no UI-to-probe target relationship is inferred.

Main entry points: [`DotNetCoreHealthChecks/Startup.cs`](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs) (Service configuration), [`AspNetCoreHealthChecker/Startup.cs`](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs) (UI configuration), [`DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs`](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs) (Weather API), [`AspNetCoreHealthChecker/Controllers/HomeController.cs`](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Controllers/HomeController.cs) (Home routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Health UI host"]
  node_ui_startup["UI configuration<br/>[Startup.cs]"]
  node_ui_endpoint["Health UI endpoint<br/>[Startup.cs]"]
  node_ui_storage[("In-memory storage<br/>[Startup.cs]")]
  node_home_controller["Home routes<br/>[HomeController.cs]"]
end

subgraph group_service["Health-check service"]
  node_service_startup["Service configuration<br/>[Startup.cs]"]
  node_health_endpoint["Health endpoint<br/>[Startup.cs]"]
  node_random_check["Random status check"]
  node_weather_controller["Weather API"]
  node_weather_model["Forecast model<br/>[WeatherForecast.cs]"]
  node_swagger["Swagger setup<br/>[Startup.cs]"]
end

subgraph group_runtime["Application runtime"]
  node_ui_host["UI host<br/>[Program.cs]"]
  node_service_host["Service host<br/>[Program.cs]"]
end

node_user(("HTTP client"))

node_user -->|"requests UI"| node_ui_endpoint
node_user -->|"requests pages"| node_home_controller
node_ui_host -->|"starts with"| node_ui_startup
node_ui_startup -->|"maps endpoint"| node_ui_endpoint
node_ui_startup -->|"configures storage"| node_ui_storage
node_ui_startup -->|"maps routes"| node_home_controller
node_user -->|"requests status"| node_health_endpoint
node_user -->|"requests forecasts"| node_weather_controller
node_service_host -->|"starts with"| node_service_startup
node_service_startup -->|"maps endpoint"| node_health_endpoint
node_service_startup -->|"registers check"| node_random_check
node_health_endpoint -.->|"runs registered checks"| node_random_check
node_service_startup -->|"maps controllers"| node_weather_controller
node_weather_controller -->|"creates forecasts"| node_weather_model
node_service_startup -->|"configures docs"| node_swagger

click node_ui_host "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Program.cs"
click node_ui_startup "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs"
click node_ui_endpoint "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs"
click node_ui_storage "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs"
click node_home_controller "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Controllers/HomeController.cs"
click node_service_host "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Program.cs"
click node_service_startup "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs"
click node_health_endpoint "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs"
click node_random_check "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/HealthChecks/RandomResponseTimeChecker.cs"
click node_weather_controller "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs"
click node_weather_model "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/WeatherForecast.cs"
click node_swagger "https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs"

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_ui_startup,node_ui_endpoint,node_ui_storage,node_home_controller,node_user toneBlue
class node_service_startup,node_health_endpoint,node_random_check,node_weather_controller,node_weather_model,node_swagger toneAmber
class node_ui_host,node_service_host toneMint
```

## Components

### Health UI host

- [UI configuration](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs): `AspNetCoreHealthChecker/Startup.cs`
- [Health UI endpoint](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs): `AspNetCoreHealthChecker/Startup.cs`
- [In-memory storage](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Startup.cs): `AspNetCoreHealthChecker/Startup.cs`
- [Home routes](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Controllers/HomeController.cs): `AspNetCoreHealthChecker/Controllers/HomeController.cs`

### Health-check service

- [Service configuration](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs): `DotNetCoreHealthChecks/Startup.cs`
- [Health endpoint](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs): `DotNetCoreHealthChecks/Startup.cs`
- [Random status check](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/HealthChecks/RandomResponseTimeChecker.cs): `DotNetCoreHealthChecks/HealthChecks/RandomResponseTimeChecker.cs`
- [Weather API](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs): `DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs`
- [Forecast model](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/WeatherForecast.cs): `DotNetCoreHealthChecks/WeatherForecast.cs`
- [Swagger setup](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Startup.cs): `DotNetCoreHealthChecks/Startup.cs`

### Application runtime

- [UI host](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/AspNetCoreHealthChecker/Program.cs): `AspNetCoreHealthChecker/Program.cs`
- [Service host](https://github.com/kritultrathod/dotnetcorehealthchecks/blob/master/DotNetCoreHealthChecks/Program.cs): `DotNetCoreHealthChecks/Program.cs`

### Other components

- **HTTP client**

## Connections

- HTTP client → Health UI endpoint: requests UI (evidence: `AspNetCoreHealthChecker/Startup.cs`)
- HTTP client → Home routes: requests pages
- UI host → UI configuration: starts with (evidence: `AspNetCoreHealthChecker/Program.cs`)
- UI configuration → Health UI endpoint: maps endpoint (evidence: `AspNetCoreHealthChecker/Startup.cs`)
- UI configuration → In-memory storage: configures storage (evidence: `AspNetCoreHealthChecker/Startup.cs`)
- UI configuration → Home routes: maps routes (evidence: `AspNetCoreHealthChecker/Startup.cs`)
- HTTP client → Health endpoint: requests status (evidence: `DotNetCoreHealthChecks/Startup.cs`)
- HTTP client → Weather API: requests forecasts (evidence: `DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs`)
- Service host → Service configuration: starts with (evidence: `DotNetCoreHealthChecks/Program.cs`)
- Service configuration → Health endpoint: maps endpoint (evidence: `DotNetCoreHealthChecks/Startup.cs`)
- Service configuration → Random status check: registers check (evidence: `DotNetCoreHealthChecks/Startup.cs`)
- Health endpoint → Random status check: runs registered checks (evidence: `DotNetCoreHealthChecks/Startup.cs`)
- Service configuration → Weather API: maps controllers (evidence: `DotNetCoreHealthChecks/Startup.cs`)
- Weather API → Forecast model: creates forecasts (evidence: `DotNetCoreHealthChecks/Controllers/WeatherForecastController.cs`)
- Service configuration → Swagger setup: configures docs (evidence: `DotNetCoreHealthChecks/Startup.cs`)
