Architecture

KubeStellar Klaude Console uses a modern, modular architecture designed for extensibility and real-time updates.

The 6 Components

The console consists of 6 components working together. See Installation for how to set up each.

#ComponentPurpose
1GitHub OAuth AppUser authentication via GitHub
2FrontendReact SPA - dashboards, cards, AI UI
3BackendGo server - API, auth, data storage
4MCP BridgeConnects backend to klaude tools
5Claude Code Pluginsklaude-ops + klaude-deploy (docs)
6KubeconfigYour cluster credentials

System Overview

┌─────────────────────────────────────────────────────────────────────────────┐
│                              User Browser                                    │
│                          React + Vite SPA                                    │
└─────────────────────────────┬───────────────────────────────────────────────┘
                              │ WebSocket + REST

┌─────────────────────────────────────────────────────────────────────────────┐
│                        KubeStellar Klaude Console Backend                    │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐    │
│  │   Auth       │  │   Dashboard  │  │   Claude     │  │   Events     │    │
│  │   Service    │  │   Service    │  │   Service    │  │   Stream     │    │
│  │  (GitHub SSO)│  │  (REST API)  │  │  (Proactive) │  │  (WebSocket) │    │
│  └──────────────┘  └──────────────┘  └──────────────┘  └──────────────┘    │
│         │                  │                  │                  │          │
│         ▼                  ▼                  ▼                  ▼          │
│  ┌─────────────────────────────────────────────────────────────────────┐   │
│  │                         MCP Bridge Layer                             │   │
│  │    Wraps klaude-ops and klaude-deploy MCP servers as HTTP/WS APIs   │   │
│  └─────────────────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────────────────┐
│                         Kubernetes Clusters                                  │
│    [vllm-d]     [local-kind]     [prod-east]     [prod-west]    ...        │
└─────────────────────────────────────────────────────────────────────────────┘

Components

Frontend (React + Vite)

ComponentPurpose
DashboardMain card grid with drag-and-drop
CardWrapperUnified card container with swap controls
CardRecommendationsAI suggestion panel
SettingsAI mode and token limit configuration
ClustersCluster list with detail modals
EventsFilterable event stream

Backend (Go)

PackagePurpose
pkg/apiHTTP server and handlers
pkg/mcpMCP bridge for cluster data
pkg/claudeAI integration (future)
pkg/storeSQLite database layer
pkg/modelsData structures

Data Flow

  1. Authentication: GitHub OAuth → JWT token → stored in browser
  2. Dashboard Load: Fetch user preferences → fetch cluster data via MCP → render cards
  3. Real-time Updates: WebSocket connection → MCP event stream → card updates
  4. Card Recommendations: Analyze cluster state → AI generates suggestions → user accepts/snoozes

AI Mode Levels

ModeToken UsageFeatures
Low~10%Direct kubectl, AI on explicit request
Medium~50%AI analysis and summaries on demand
High~100%Proactive suggestions, auto-analysis

Database Schema

kkc uses SQLite for persistence:

  • users - GitHub user info and preferences
  • dashboards - User dashboard configurations
  • cards - Card instances with positions and config
  • onboarding_responses - Initial setup answers