# kite-org/kite architecture

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

- Interactive diagram: https://gitdiagram.com/kite-org/kite
- Repository: https://github.com/kite-org/kite

## Overview

Kite is a browser-based Kubernetes workspace for operating multiple clusters. The principal workflow is: an operator signs in, selects a cluster, discovers and inspects resources, then performs operations such as editing workloads or managing Helm releases. Separate capabilities cover metrics and logs, search, terminals, plugins, AI-assisted troubleshooting, and administrative governance. The backend routes requests to feature handlers, with cluster clients mediating Kubernetes access and Prometheus queries. Edges reflect the sampled route declarations, imports, and README descriptions; unsampled implementations are represented by their tree paths without asserting internal calls.

Main entry points: [`routes.go`](https://github.com/kite-org/kite/blob/main/routes.go) (HTTP Router), [`ui/src/routes.tsx`](https://github.com/kite-org/kite/blob/main/ui/src/routes.tsx) (UI Router), [`pkg/cluster/cluster_manager.go`](https://github.com/kite-org/kite/blob/main/pkg/cluster/cluster_manager.go) (Cluster Manager), [`ui/src/App.tsx`](https://github.com/kite-org/kite/blob/main/ui/src/App.tsx) (Workspace Shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Workspace UI"]
  node_ui_routes["UI Router<br/>[routes.tsx]"]
  node_ui_app["Workspace Shell<br/>[App.tsx]"]
  node_ui_resource["Resource Pages"]
  node_ui_cluster["Cluster Context"]
  node_ui_search["Global Search<br/>[global-search.tsx]"]
  node_ui_helm["Chart Pages"]
  node_ui_ai["AI Chat<br/>[ai-chatbox.tsx]"]
  node_ui_terminal["Browser Terminal"]
  node_ui_plugins["Plugin Pages<br/>[plugins.tsx]"]
end

subgraph group_api["Application API"]
  node_routes["HTTP Router<br/>[routes.go]"]
end

subgraph group_clusterops["Cluster Operations"]
  node_resources["Resource API<br/>[handler.go]"]
  node_helm["Helm API"]
  node_clusters["Cluster Manager<br/>[cluster_manager.go]"]
  node_kube["Kubernetes Client<br/>[client.go]"]
  node_metrics["Prometheus Queries<br/>[query.go]"]
  node_search["Resource Search<br/>[handler.go]"]
  node_terminal["Terminal Sessions"]
end

subgraph group_governance["Identity Governance"]
  node_auth["Authentication<br/>[login_handler.go]"]
  node_rbac["Access Control<br/>[manager.go]"]
  node_audit["Audit Logs<br/>[handler.go]"]
  node_model[("Application Data<br/>[model.go]")]
end

subgraph group_support["Extensions Assistance"]
  node_ai["AI Assistant<br/>[handler.go]"]
  node_plugins["Plugin Management<br/>[handler.go]"]
  node_prometheus["Prometheus Client<br/>[client.go]"]
  node_cluster_agent["Cluster Agent<br/>[manager.go]"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_ui_routes
node_ui_routes -->|"routes to"| node_ui_app
node_ui_routes -->|"routes to"| node_ui_resource
node_ui_routes -->|"routes to"| node_ui_helm
node_ui_routes -->|"routes to"| node_ui_plugins
node_ui_app -->|"renders"| node_ui_ai
node_ui_app -->|"renders"| node_ui_terminal
node_ui_app -->|"uses"| node_ui_cluster
node_ui_resource -.->|"requests APIs"| node_routes
node_ui_search -.->|"requests APIs"| node_routes
node_ui_helm -.->|"requests APIs"| node_routes
node_ui_ai -.->|"requests APIs"| node_routes
node_ui_terminal -.->|"opens sessions"| node_routes
node_ui_plugins -.->|"requests APIs"| node_routes
node_routes -->|"routes chat"| node_ai
node_routes -->|"registers routes"| node_resources
node_routes -->|"registers login"| node_auth
node_routes -->|"registers cluster API"| node_clusters
node_routes -->|"registers admin API"| node_plugins
node_routes -.->|"registers API"| node_metrics
node_routes -.->|"registers API"| node_search
node_routes -.->|"registers API"| node_terminal
node_routes -->|"registers admin API"| node_audit
node_clusters -->|"creates clients"| node_kube
node_clusters -->|"initializes manager"| node_cluster_agent
node_clusters -.->|"uses client"| node_prometheus
node_metrics -->|"queries"| node_prometheus
node_ai -->|"uses cluster"| node_clusters
node_search -->|"dispatches searches"| node_resources
node_terminal -->|"starts session"| node_kube
node_rbac -->|"loads roles"| node_model
node_auth -.->|"uses account data"| node_model
node_helm -->|"uses task data"| node_model

click node_ui_routes "https://github.com/kite-org/kite/blob/main/ui/src/routes.tsx"
click node_ui_app "https://github.com/kite-org/kite/blob/main/ui/src/App.tsx"
click node_ui_resource "https://github.com/kite-org/kite/blob/main/ui/src/pages/resource-definitions.tsx"
click node_ui_cluster "https://github.com/kite-org/kite/blob/main/ui/src/contexts/cluster-context.tsx"
click node_ui_search "https://github.com/kite-org/kite/blob/main/ui/src/components/global-search.tsx"
click node_ui_helm "https://github.com/kite-org/kite/blob/main/ui/src/pages/helm-chart-list-page.tsx"
click node_ui_ai "https://github.com/kite-org/kite/blob/main/ui/src/components/ai-chat/ai-chatbox.tsx"
click node_ui_terminal "https://github.com/kite-org/kite/blob/main/ui/src/components/floating-terminal.tsx"
click node_ui_plugins "https://github.com/kite-org/kite/blob/main/ui/src/pages/plugins.tsx"
click node_routes "https://github.com/kite-org/kite/blob/main/routes.go"
click node_resources "https://github.com/kite-org/kite/blob/main/pkg/resources/handler.go"
click node_helm "https://github.com/kite-org/kite/blob/main/pkg/resources/helmrelease_handler.go"
click node_clusters "https://github.com/kite-org/kite/blob/main/pkg/cluster/cluster_manager.go"
click node_kube "https://github.com/kite-org/kite/blob/main/pkg/kube/client.go"
click node_metrics "https://github.com/kite-org/kite/blob/main/pkg/metrics/query.go"
click node_search "https://github.com/kite-org/kite/blob/main/pkg/search/handler.go"
click node_terminal "https://github.com/kite-org/kite/blob/main/pkg/terminal/kubectl_terminal_handler.go"
click node_auth "https://github.com/kite-org/kite/blob/main/pkg/auth/login_handler.go"
click node_rbac "https://github.com/kite-org/kite/blob/main/pkg/rbac/manager.go"
click node_audit "https://github.com/kite-org/kite/blob/main/pkg/audit/handler.go"
click node_ai "https://github.com/kite-org/kite/blob/main/pkg/ai/handler.go"
click node_plugins "https://github.com/kite-org/kite/blob/main/pkg/plugins/handler.go"
click node_prometheus "https://github.com/kite-org/kite/blob/main/pkg/prometheus/client.go"
click node_cluster_agent "https://github.com/kite-org/kite/blob/main/pkg/clusteragent/manager.go"
click node_model "https://github.com/kite-org/kite/blob/main/pkg/model/model.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_ui_routes,node_ui_app,node_ui_resource,node_ui_cluster,node_ui_search,node_ui_helm,node_ui_ai,node_ui_terminal,node_ui_plugins toneBlue
class node_routes toneAmber
class node_resources,node_helm,node_clusters,node_kube,node_metrics,node_search,node_terminal toneMint
class node_auth,node_rbac,node_audit,node_model toneRose
class node_ai,node_plugins,node_prometheus,node_cluster_agent,node_operator toneIndigo
```

## Components

### Workspace UI

- [UI Router](https://github.com/kite-org/kite/blob/main/ui/src/routes.tsx): `ui/src/routes.tsx`
- [Workspace Shell](https://github.com/kite-org/kite/blob/main/ui/src/App.tsx): `ui/src/App.tsx`
- [Resource Pages](https://github.com/kite-org/kite/blob/main/ui/src/pages/resource-definitions.tsx): `ui/src/pages/resource-definitions.tsx`
- [Cluster Context](https://github.com/kite-org/kite/blob/main/ui/src/contexts/cluster-context.tsx): `ui/src/contexts/cluster-context.tsx`
- [Global Search](https://github.com/kite-org/kite/blob/main/ui/src/components/global-search.tsx): `ui/src/components/global-search.tsx`
- [Chart Pages](https://github.com/kite-org/kite/blob/main/ui/src/pages/helm-chart-list-page.tsx): `ui/src/pages/helm-chart-list-page.tsx`
- [AI Chat](https://github.com/kite-org/kite/blob/main/ui/src/components/ai-chat/ai-chatbox.tsx): `ui/src/components/ai-chat/ai-chatbox.tsx`
- [Browser Terminal](https://github.com/kite-org/kite/blob/main/ui/src/components/floating-terminal.tsx): `ui/src/components/floating-terminal.tsx`
- [Plugin Pages](https://github.com/kite-org/kite/blob/main/ui/src/pages/plugins.tsx): `ui/src/pages/plugins.tsx`

### Application API

- [HTTP Router](https://github.com/kite-org/kite/blob/main/routes.go): `routes.go`

### Cluster Operations

- [Resource API](https://github.com/kite-org/kite/blob/main/pkg/resources/handler.go): `pkg/resources/handler.go`
- [Helm API](https://github.com/kite-org/kite/blob/main/pkg/resources/helmrelease_handler.go): `pkg/resources/helmrelease_handler.go`
- [Cluster Manager](https://github.com/kite-org/kite/blob/main/pkg/cluster/cluster_manager.go): `pkg/cluster/cluster_manager.go`
- [Kubernetes Client](https://github.com/kite-org/kite/blob/main/pkg/kube/client.go): `pkg/kube/client.go`
- [Prometheus Queries](https://github.com/kite-org/kite/blob/main/pkg/metrics/query.go): `pkg/metrics/query.go`
- [Resource Search](https://github.com/kite-org/kite/blob/main/pkg/search/handler.go): `pkg/search/handler.go`
- [Terminal Sessions](https://github.com/kite-org/kite/blob/main/pkg/terminal/kubectl_terminal_handler.go): `pkg/terminal/kubectl_terminal_handler.go`

### Identity Governance

- [Authentication](https://github.com/kite-org/kite/blob/main/pkg/auth/login_handler.go): `pkg/auth/login_handler.go`
- [Access Control](https://github.com/kite-org/kite/blob/main/pkg/rbac/manager.go): `pkg/rbac/manager.go`
- [Audit Logs](https://github.com/kite-org/kite/blob/main/pkg/audit/handler.go): `pkg/audit/handler.go`
- [Application Data](https://github.com/kite-org/kite/blob/main/pkg/model/model.go): `pkg/model/model.go`

### Extensions Assistance

- [AI Assistant](https://github.com/kite-org/kite/blob/main/pkg/ai/handler.go): `pkg/ai/handler.go`
- [Plugin Management](https://github.com/kite-org/kite/blob/main/pkg/plugins/handler.go): `pkg/plugins/handler.go`
- [Prometheus Client](https://github.com/kite-org/kite/blob/main/pkg/prometheus/client.go): `pkg/prometheus/client.go`
- [Cluster Agent](https://github.com/kite-org/kite/blob/main/pkg/clusteragent/manager.go): `pkg/clusteragent/manager.go`

### Other components

- **Operator**

## Connections

- Operator → UI Router: uses (evidence: `README.md`)
- UI Router → Workspace Shell: routes to (evidence: `ui/src/routes.tsx`)
- UI Router → Resource Pages: routes to (evidence: `ui/src/routes.tsx`)
- UI Router → Chart Pages: routes to (evidence: `ui/src/routes.tsx`)
- UI Router → Plugin Pages: routes to (evidence: `ui/src/routes.tsx`)
- Workspace Shell → AI Chat: renders (evidence: `ui/src/App.tsx`)
- Workspace Shell → Browser Terminal: renders (evidence: `ui/src/App.tsx`)
- Workspace Shell → Cluster Context: uses (evidence: `ui/src/App.tsx`)
- Resource Pages → HTTP Router: requests APIs
- Global Search → HTTP Router: requests APIs
- Chart Pages → HTTP Router: requests APIs
- AI Chat → HTTP Router: requests APIs
- Browser Terminal → HTTP Router: opens sessions
- Plugin Pages → HTTP Router: requests APIs
- HTTP Router → AI Assistant: routes chat (evidence: `routes.go`)
- HTTP Router → Resource API: registers routes (evidence: `routes.go`)
- HTTP Router → Authentication: registers login (evidence: `routes.go`)
- HTTP Router → Cluster Manager: registers cluster API (evidence: `routes.go`)
- HTTP Router → Plugin Management: registers admin API (evidence: `routes.go`)
- HTTP Router → Prometheus Queries: registers API
- HTTP Router → Resource Search: registers API
- HTTP Router → Terminal Sessions: registers API
- HTTP Router → Audit Logs: registers admin API (evidence: `routes.go`)
- Cluster Manager → Kubernetes Client: creates clients (evidence: `pkg/cluster/cluster_manager.go`)
- Cluster Manager → Cluster Agent: initializes manager (evidence: `pkg/cluster/cluster_manager.go`)
- Cluster Manager → Prometheus Client: uses client
- Prometheus Queries → Prometheus Client: queries (evidence: `pkg/metrics/query.go`)
- AI Assistant → Cluster Manager: uses cluster (evidence: `pkg/ai/handler.go`)
- Resource Search → Resource API: dispatches searches (evidence: `pkg/search/handler.go`)
- Terminal Sessions → Kubernetes Client: starts session (evidence: `pkg/terminal/kubectl_terminal_handler.go`)
- Access Control → Application Data: loads roles (evidence: `pkg/rbac/manager.go`)
- Authentication → Application Data: uses account data
- Helm API → Application Data: uses task data (evidence: `pkg/resources/helmrelease_handler.go`)
