# skyhook-io/radar architecture

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

- Interactive diagram: https://gitdiagram.com/skyhook-io/radar
- Repository: https://github.com/skyhook-io/radar

## Overview

Radar is a Kubernetes UI and API server that runs locally or in-cluster. Users open the web UI, choose a cluster/context and inspect live resources; the server accesses the Kubernetes API and streams updates to the browser. The product also exposes distinct GitOps, Helm, traffic, cost, audit, upgrade-impact, timeline, and MCP capabilities. The graph combines README-documented behavior with relationships visible in the supplied source index and excerpts; unsampled feature internals are represented at their existing directories, without assuming their call paths.

Main entry points: [`internal/server/server.go`](https://github.com/skyhook-io/radar/blob/main/internal/server/server.go) (HTTP and SSE server), [`web/src/App.tsx`](https://github.com/skyhook-io/radar/blob/main/web/src/App.tsx) (Web application), [`cmd/explorer/main.go`](https://github.com/skyhook-io/radar/blob/main/cmd/explorer/main.go) (Radar CLI), [`web/src/api/client.ts`](https://github.com/skyhook-io/radar/blob/main/web/src/api/client.ts) (Frontend API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and UI"]
  node_explorer["Radar CLI<br/>[main.go]"]
  node_desktop["Desktop host<br/>[main.go]"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_api["Frontend API client<br/>[client.ts]"]
  node_api_config["API configuration<br/>[config.ts]"]
  node_core_types["Kubernetes UI types<br/>[core.ts]"]
  node_resource_ui["Resource UI utilities<br/>[resource-utils.ts]"]
  node_resource_api["API resource utilities<br/>[api-resources.ts]"]
  node_log_ui["Log formatting<br/>[log-format.ts]"]
  node_log_level["Log levels<br/>[log-level.ts]"]
  node_workload_ui["Workload view<br/>[WorkloadView.tsx]"]
  node_helm_ui["Helm views"]
  node_traffic_ui["Traffic view<br/>[TrafficView.tsx]"]
  node_toast["Toast notifications<br/>[Toast.tsx]"]
  node_tooltip["UI tooltips<br/>[Tooltip.tsx]"]
  node_connection["Connection context"]
  node_capabilities["Feature capabilities"]
  node_navigation["Navigation<br/>[navigation.ts]"]
end

subgraph group_core["Cluster operations"]
  node_server["HTTP and SSE server<br/>[server.go]"]
  node_k8s["Kubernetes access"]
  node_auth["Authentication and RBAC"]
  node_issues["Issue diagnosis"]
end

subgraph group_integrations["Integrations"]
  node_gitops["GitOps and Argo CD<br/>[manager.go]"]
  node_helm["Helm operations"]
  node_prometheus["Metrics and sizing"]
  node_opencost["Cost analysis<br/>[manager.go]"]
  node_traffic["Traffic analysis<br/>[manager.go]"]
end

subgraph group_insight["Analysis and history"]
  node_audit["Configuration audit"]
  node_upgrade["Upgrade impact"]
  node_timeline["Timeline history<br/>[manager.go]"]
end

subgraph group_agent["Agent access"]
  node_mcp["MCP server<br/>[server.go]"]
end

node_user(("Operator"))

node_user -->|"starts"| node_explorer
node_explorer -->|"starts server"| node_server
node_desktop -->|"starts server"| node_server
node_user -->|"uses UI"| node_webapp
node_webapp -->|"requests data"| node_api
node_api -->|"gets API base"| node_api_config
node_api -->|"calls API"| node_server
node_server -->|"accesses cluster"| node_k8s
node_k8s -->|"streams updates"| node_server
node_server -->|"authorizes requests"| node_auth
node_server -.->|"serves diagnosis"| node_issues
node_webapp -->|"uses types"| node_core_types
node_webapp -->|"uses utilities"| node_resource_ui
node_resource_ui -->|"uses resource helpers"| node_resource_api
node_webapp -->|"renders view"| node_workload_ui
node_webapp -->|"renders view"| node_helm_ui
node_webapp -->|"renders view"| node_traffic_ui
node_log_ui -->|"uses levels"| node_log_level
node_server -->|"serves GitOps"| node_gitops
node_server -.->|"serves Helm"| node_helm
node_server -.->|"serves metrics"| node_prometheus
node_server -->|"serves costs"| node_opencost
node_server -.->|"serves traffic"| node_traffic
node_server -.->|"serves audit"| node_audit
node_server -.->|"serves upgrade checks"| node_upgrade
node_server -.->|"serves history"| node_timeline
node_explorer -->|"runs MCP"| node_mcp
node_mcp -.->|"exposes cluster tools"| node_server

click node_explorer "https://github.com/skyhook-io/radar/blob/main/cmd/explorer/main.go"
click node_desktop "https://github.com/skyhook-io/radar/blob/main/cmd/desktop/main.go"
click node_webapp "https://github.com/skyhook-io/radar/blob/main/web/src/App.tsx"
click node_api "https://github.com/skyhook-io/radar/blob/main/web/src/api/client.ts"
click node_api_config "https://github.com/skyhook-io/radar/blob/main/web/src/api/config.ts"
click node_core_types "https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/types/core.ts"
click node_resource_ui "https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/components/resources/resource-utils.ts"
click node_resource_api "https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/api-resources.ts"
click node_log_ui "https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/log-format.ts"
click node_log_level "https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/log-level.ts"
click node_workload_ui "https://github.com/skyhook-io/radar/blob/main/web/src/components/workload/WorkloadView.tsx"
click node_helm_ui "https://github.com/skyhook-io/radar/blob/main/web/src/components/helm/HelmCompareRoute.tsx"
click node_traffic_ui "https://github.com/skyhook-io/radar/blob/main/web/src/components/traffic/TrafficView.tsx"
click node_toast "https://github.com/skyhook-io/radar/blob/main/web/src/components/ui/Toast.tsx"
click node_tooltip "https://github.com/skyhook-io/radar/blob/main/web/src/components/ui/Tooltip.tsx"
click node_connection "https://github.com/skyhook-io/radar/blob/main/web/src/context/ConnectionContext.tsx"
click node_capabilities "https://github.com/skyhook-io/radar/blob/main/web/src/contexts/CapabilitiesContext.tsx"
click node_navigation "https://github.com/skyhook-io/radar/blob/main/web/src/utils/navigation.ts"
click node_server "https://github.com/skyhook-io/radar/blob/main/internal/server/server.go"
click node_k8s "https://github.com/skyhook-io/radar/tree/main/internal/k8s"
click node_auth "https://github.com/skyhook-io/radar/tree/main/internal/auth"
click node_issues "https://github.com/skyhook-io/radar/tree/main/internal/issues"
click node_gitops "https://github.com/skyhook-io/radar/blob/main/internal/argocd/manager.go"
click node_helm "https://github.com/skyhook-io/radar/tree/main/internal/helm"
click node_prometheus "https://github.com/skyhook-io/radar/tree/main/internal/prometheus"
click node_opencost "https://github.com/skyhook-io/radar/blob/main/internal/opencost/manager.go"
click node_traffic "https://github.com/skyhook-io/radar/blob/main/internal/traffic/manager.go"
click node_audit "https://github.com/skyhook-io/radar/tree/main/internal/audit"
click node_upgrade "https://github.com/skyhook-io/radar/tree/main/internal/upgrade"
click node_timeline "https://github.com/skyhook-io/radar/blob/main/internal/timeline/manager.go"
click node_mcp "https://github.com/skyhook-io/radar/blob/main/internal/mcp/server.go"

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_explorer,node_desktop,node_webapp,node_api,node_api_config,node_core_types,node_resource_ui,node_resource_api,node_log_ui,node_log_level,node_workload_ui,node_helm_ui,node_traffic_ui,node_toast,node_tooltip,node_connection,node_capabilities,node_navigation toneBlue
class node_server,node_k8s,node_auth,node_issues toneAmber
class node_gitops,node_helm,node_prometheus,node_opencost,node_traffic toneMint
class node_audit,node_upgrade,node_timeline toneRose
class node_mcp,node_user toneIndigo
```

## Components

### Entry and UI

- [Radar CLI](https://github.com/skyhook-io/radar/blob/main/cmd/explorer/main.go): `cmd/explorer/main.go`
- [Desktop host](https://github.com/skyhook-io/radar/blob/main/cmd/desktop/main.go): `cmd/desktop/main.go`
- [Web application](https://github.com/skyhook-io/radar/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Frontend API client](https://github.com/skyhook-io/radar/blob/main/web/src/api/client.ts): `web/src/api/client.ts`
- [API configuration](https://github.com/skyhook-io/radar/blob/main/web/src/api/config.ts): `web/src/api/config.ts`
- [Kubernetes UI types](https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/types/core.ts): `packages/k8s-ui/src/types/core.ts`
- [Resource UI utilities](https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/components/resources/resource-utils.ts): `packages/k8s-ui/src/components/resources/resource-utils.ts`
- [API resource utilities](https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/api-resources.ts): `packages/k8s-ui/src/utils/api-resources.ts`
- [Log formatting](https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/log-format.ts): `packages/k8s-ui/src/utils/log-format.ts`
- [Log levels](https://github.com/skyhook-io/radar/blob/main/packages/k8s-ui/src/utils/log-level.ts): `packages/k8s-ui/src/utils/log-level.ts`
- [Workload view](https://github.com/skyhook-io/radar/blob/main/web/src/components/workload/WorkloadView.tsx): `web/src/components/workload/WorkloadView.tsx`
- [Helm views](https://github.com/skyhook-io/radar/blob/main/web/src/components/helm/HelmCompareRoute.tsx): `web/src/components/helm/HelmCompareRoute.tsx`
- [Traffic view](https://github.com/skyhook-io/radar/blob/main/web/src/components/traffic/TrafficView.tsx): `web/src/components/traffic/TrafficView.tsx`
- [Toast notifications](https://github.com/skyhook-io/radar/blob/main/web/src/components/ui/Toast.tsx): `web/src/components/ui/Toast.tsx`
- [UI tooltips](https://github.com/skyhook-io/radar/blob/main/web/src/components/ui/Tooltip.tsx): `web/src/components/ui/Tooltip.tsx`
- [Connection context](https://github.com/skyhook-io/radar/blob/main/web/src/context/ConnectionContext.tsx): `web/src/context/ConnectionContext.tsx`
- [Feature capabilities](https://github.com/skyhook-io/radar/blob/main/web/src/contexts/CapabilitiesContext.tsx): `web/src/contexts/CapabilitiesContext.tsx`
- [Navigation](https://github.com/skyhook-io/radar/blob/main/web/src/utils/navigation.ts): `web/src/utils/navigation.ts`

### Cluster operations

- [HTTP and SSE server](https://github.com/skyhook-io/radar/blob/main/internal/server/server.go): `internal/server/server.go`
- [Kubernetes access](https://github.com/skyhook-io/radar/tree/main/internal/k8s): `internal/k8s`
- [Authentication and RBAC](https://github.com/skyhook-io/radar/tree/main/internal/auth): `internal/auth`
- [Issue diagnosis](https://github.com/skyhook-io/radar/tree/main/internal/issues): `internal/issues`

### Integrations

- [GitOps and Argo CD](https://github.com/skyhook-io/radar/blob/main/internal/argocd/manager.go): `internal/argocd/manager.go`
- [Helm operations](https://github.com/skyhook-io/radar/tree/main/internal/helm): `internal/helm`
- [Metrics and sizing](https://github.com/skyhook-io/radar/tree/main/internal/prometheus): `internal/prometheus`
- [Cost analysis](https://github.com/skyhook-io/radar/blob/main/internal/opencost/manager.go): `internal/opencost/manager.go`
- [Traffic analysis](https://github.com/skyhook-io/radar/blob/main/internal/traffic/manager.go): `internal/traffic/manager.go`

### Analysis and history

- [Configuration audit](https://github.com/skyhook-io/radar/tree/main/internal/audit): `internal/audit`
- [Upgrade impact](https://github.com/skyhook-io/radar/tree/main/internal/upgrade): `internal/upgrade`
- [Timeline history](https://github.com/skyhook-io/radar/blob/main/internal/timeline/manager.go): `internal/timeline/manager.go`

### Agent access

- [MCP server](https://github.com/skyhook-io/radar/blob/main/internal/mcp/server.go): `internal/mcp/server.go`

### Other components

- **Operator**

## Connections

- Operator → Radar CLI: starts (evidence: `README.md`)
- Radar CLI → HTTP and SSE server: starts server (evidence: `cmd/explorer/main.go`)
- Desktop host → HTTP and SSE server: starts server (evidence: `cmd/desktop/main.go`)
- Operator → Web application: uses UI (evidence: `README.md`)
- Web application → Frontend API client: requests data (evidence: `web/src/App.tsx`)
- Frontend API client → API configuration: gets API base (evidence: `web/src/api/client.ts`)
- Frontend API client → HTTP and SSE server: calls API (evidence: `README.md`)
- HTTP and SSE server → Kubernetes access: accesses cluster (evidence: `internal/server/server.go`)
- Kubernetes access → HTTP and SSE server: streams updates (evidence: `README.md`)
- HTTP and SSE server → Authentication and RBAC: authorizes requests (evidence: `internal/server/server.go`)
- HTTP and SSE server → Issue diagnosis: serves diagnosis
- Web application → Kubernetes UI types: uses types (evidence: `web/src/App.tsx`)
- Web application → Resource UI utilities: uses utilities (evidence: `web/src/App.tsx`)
- Resource UI utilities → API resource utilities: uses resource helpers
- Web application → Workload view: renders view (evidence: `web/src/App.tsx`)
- Web application → Helm views: renders view (evidence: `web/src/App.tsx`)
- Web application → Traffic view: renders view (evidence: `web/src/App.tsx`)
- Log formatting → Log levels: uses levels (evidence: `packages/k8s-ui/src/utils/log-format.ts`)
- HTTP and SSE server → GitOps and Argo CD: serves GitOps (evidence: `internal/server/server.go`)
- HTTP and SSE server → Helm operations: serves Helm (evidence: `internal/server/server.go`)
- HTTP and SSE server → Metrics and sizing: serves metrics (evidence: `internal/server/server.go`)
- HTTP and SSE server → Cost analysis: serves costs (evidence: `internal/server/server.go`)
- HTTP and SSE server → Traffic analysis: serves traffic
- HTTP and SSE server → Configuration audit: serves audit
- HTTP and SSE server → Upgrade impact: serves upgrade checks (evidence: `internal/server/server.go`)
- HTTP and SSE server → Timeline history: serves history
- Radar CLI → MCP server: runs MCP (evidence: `cmd/explorer/main.go`)
- MCP server → HTTP and SSE server: exposes cluster tools
