# notharshhaa/kubernetes-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/notharshhaa/kubernetes-dashboard
- Repository: https://github.com/notharshhaa/kubernetes-dashboard

## Overview

Kubernetes Dashboard is a browser-based cluster command center. Users select a cluster context, inspect health and workload or resource views, then perform operational tasks such as scaling, reviewing logs, or opening a container terminal. The app exposes Next.js API routes that use Kubernetes configuration and clients, with demo data or an in-memory store available when a real cluster is unavailable. The README documents additional areas whose route implementations were not sampled; those capabilities are represented, but their internal call paths are not asserted.

Main entry points: [`src/components/dashboard-layout.tsx`](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/components/dashboard-layout.tsx) (Dashboard shell), [`src/lib/k8s-client.ts`](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/k8s-client.ts) (Kubernetes contexts), [`src/app/api/actions/route.ts`](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/actions/route.ts) (Mutation actions), [`src/app/api/workloads/route.ts`](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/workloads/route.ts) (Workload APIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Dashboard experience"]
  node_dashboard["Dashboard shell"]
  node_overview["Cluster overview<br/>[page.tsx]"]
  node_workloads_ui["Workload management<br/>[page.tsx]"]
  node_resource_views["Resource views"]
  node_ai_ui["AI workloads<br/>[page.tsx]"]
  node_topology_ui["Topology map<br/>[page.tsx]"]
  node_terminal_ui["Web terminal<br/>[page.tsx]"]
  node_security_ui["Security audits<br/>[page.tsx]"]
  node_helm_ui["Helm management<br/>[page.tsx]"]
end

subgraph group_operations["Cluster operations"]
  node_resource_api["Resource APIs<br/>[route.ts]"]
  node_workloads_api["Workload APIs<br/>[route.ts]"]
  node_actions_api["Mutation actions<br/>[route.ts]"]
  node_autoscaling_api["Autoscaling API<br/>[route.ts]"]
  node_ai_api["GPU workload API<br/>[route.ts]"]
  node_specialized_apis["Specialized APIs"]
end

subgraph group_platform["Cluster access and state"]
  node_api_client["API client<br/>[api-client.ts]"]
  node_k8s_config["Kubernetes contexts<br/>[k8s-client.ts]"]
  node_k8s_store[("Demo state store<br/>[k8s-store.ts]")]
end

subgraph group_observability["Telemetry and insights"]
  node_metrics_client["Metrics client<br/>[metrics-client.ts]"]
  node_live_hooks["Realtime hooks"]
end

node_engineer(("Platform engineer"))

node_engineer -->|"uses"| node_dashboard
node_dashboard -->|"opens views"| node_overview
node_dashboard -->|"opens views"| node_workloads_ui
node_dashboard -->|"opens views"| node_resource_views
node_dashboard -->|"opens views"| node_ai_ui
node_dashboard -->|"opens views"| node_topology_ui
node_dashboard -->|"opens views"| node_terminal_ui
node_workloads_ui -.->|"mutates through"| node_actions_api
node_api_client -->|"requests"| node_autoscaling_api
node_api_client -->|"requests"| node_ai_api
node_workloads_api -->|"reads demo state"| node_k8s_store
node_workloads_api -.->|"connects to cluster"| node_k8s_config
node_actions_api -->|"applies demo actions"| node_k8s_store
node_actions_api -.->|"mutates cluster"| node_k8s_config
node_autoscaling_api -->|"loads context"| node_k8s_config
node_ai_api -->|"loads context"| node_k8s_config
node_resource_api -.->|"queries cluster"| node_k8s_config
node_live_hooks -->|"subscribes to metrics"| node_metrics_client
node_security_ui -.->|"uses security data"| node_specialized_apis
node_helm_ui -.->|"manages releases"| node_specialized_apis

click node_dashboard "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/components/dashboard-layout.tsx"
click node_overview "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/page.tsx"
click node_workloads_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/workloads/page.tsx"
click node_resource_views "https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/app"
click node_ai_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/ai-workloads/page.tsx"
click node_topology_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/topology/page.tsx"
click node_terminal_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/terminal/page.tsx"
click node_api_client "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/api-client.ts"
click node_resource_api "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/resources/route.ts"
click node_workloads_api "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/workloads/route.ts"
click node_actions_api "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/actions/route.ts"
click node_autoscaling_api "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/autoscaling/route.ts"
click node_ai_api "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/ai-workloads/route.ts"
click node_specialized_apis "https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/app/api"
click node_k8s_config "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/k8s-client.ts"
click node_k8s_store "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/k8s-store.ts"
click node_metrics_client "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/metrics-client.ts"
click node_live_hooks "https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/hooks"
click node_security_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/security/page.tsx"
click node_helm_ui "https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/helm/page.tsx"

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_dashboard,node_overview,node_workloads_ui,node_resource_views,node_ai_ui,node_topology_ui,node_terminal_ui,node_security_ui,node_helm_ui toneBlue
class node_resource_api,node_workloads_api,node_actions_api,node_autoscaling_api,node_ai_api,node_specialized_apis toneAmber
class node_api_client,node_k8s_config,node_k8s_store toneMint
class node_metrics_client,node_live_hooks toneRose
class node_engineer toneIndigo
```

## Components

### Dashboard experience

- [Dashboard shell](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/components/dashboard-layout.tsx): `src/components/dashboard-layout.tsx`
- [Cluster overview](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/page.tsx): `src/app/page.tsx`
- [Workload management](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/workloads/page.tsx): `src/app/workloads/page.tsx`
- [Resource views](https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/app): `src/app`
- [AI workloads](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/ai-workloads/page.tsx): `src/app/ai-workloads/page.tsx`
- [Topology map](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/topology/page.tsx): `src/app/topology/page.tsx`
- [Web terminal](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/terminal/page.tsx): `src/app/terminal/page.tsx`
- [Security audits](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/security/page.tsx): `src/app/security/page.tsx`
- [Helm management](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/helm/page.tsx): `src/app/helm/page.tsx`

### Cluster operations

- [Resource APIs](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/resources/route.ts): `src/app/api/resources/route.ts`
- [Workload APIs](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/workloads/route.ts): `src/app/api/workloads/route.ts`
- [Mutation actions](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/actions/route.ts): `src/app/api/actions/route.ts`
- [Autoscaling API](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/autoscaling/route.ts): `src/app/api/autoscaling/route.ts`
- [GPU workload API](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/app/api/ai-workloads/route.ts): `src/app/api/ai-workloads/route.ts`
- [Specialized APIs](https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/app/api): `src/app/api`

### Cluster access and state

- [API client](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/api-client.ts): `src/lib/api-client.ts`
- [Kubernetes contexts](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/k8s-client.ts): `src/lib/k8s-client.ts`
- [Demo state store](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/k8s-store.ts): `src/lib/k8s-store.ts`

### Telemetry and insights

- [Metrics client](https://github.com/notharshhaa/kubernetes-dashboard/blob/master/src/lib/metrics-client.ts): `src/lib/metrics-client.ts`
- [Realtime hooks](https://github.com/notharshhaa/kubernetes-dashboard/tree/master/src/hooks): `src/hooks`

### Other components

- **Platform engineer**

## Connections

- Platform engineer → Dashboard shell: uses (evidence: `README.md`)
- Dashboard shell → Cluster overview: opens views (evidence: `README.md`)
- Dashboard shell → Workload management: opens views (evidence: `README.md`)
- Dashboard shell → Resource views: opens views (evidence: `README.md`)
- Dashboard shell → AI workloads: opens views (evidence: `README.md`)
- Dashboard shell → Topology map: opens views (evidence: `README.md`)
- Dashboard shell → Web terminal: opens views (evidence: `README.md`)
- Workload management → Mutation actions: mutates through
- API client → Autoscaling API: requests (evidence: `src/lib/api-client.ts`)
- API client → GPU workload API: requests (evidence: `src/lib/api-client.ts`)
- Workload APIs → Demo state store: reads demo state (evidence: `src/app/api/workloads/route.ts`)
- Workload APIs → Kubernetes contexts: connects to cluster
- Mutation actions → Demo state store: applies demo actions (evidence: `src/app/api/actions/route.ts`)
- Mutation actions → Kubernetes contexts: mutates cluster
- Autoscaling API → Kubernetes contexts: loads context (evidence: `src/app/api/autoscaling/route.ts`)
- GPU workload API → Kubernetes contexts: loads context (evidence: `src/app/api/ai-workloads/route.ts`)
- Resource APIs → Kubernetes contexts: queries cluster (evidence: `src/app/api/resources/route.ts`)
- Realtime hooks → Metrics client: subscribes to metrics (evidence: `src/hooks/use-real-time-metrics.ts`)
- Security audits → Specialized APIs: uses security data
- Helm management → Specialized APIs: manages releases
