Skip to content

Frontend (Vue 3)

The frontend is a Vue 3 Single Page Application using Pinia for state management and Vite for tooling.

Tech Stack

LayerTechnology
FrameworkVue 3 (Composition API)
StatePinia
BuildVite
IconsLucide
Markdownmarked
YAMLjs-yaml
RoutingComponent-based (sidebar switching)

Component Architecture

App.vue
├── Header (context/namespace selectors, tools)
├── CliToolsNotice
├── Sidebar (resource navigation, cloud views)
├── Main Content
│   ├── ResourceTable (K8s resources)
│   ├── EnvManagerView (credential profiles)
│   ├── GcpView (GCP panel)
│   ├── AwsView (AWS panel)
│   └── LocalShellView (terminal)
├── TerminalPanel (multi-tab logs/exec)
├── PortForwardPanel
├── StatusBar
├── Modals
│   ├── DeleteModal
│   ├── ScaleModal
│   ├── YamlModal
│   ├── PortForwardModal
│   └── KubeconfigModal
└── ToastContainer

Pinia Stores

StoreFilePurpose
useKubeStorestores/useKubeStore.jsK8s state (contexts, namespaces, resources)
usePortForwardStorestores/usePortForwardStore.jsPort forward management
useTerminalStorestores/useTerminalStore.jsTerminal tabs and output
useAwsStorestores/useAwsStore.jsAWS service data and state
useGcpStorestores/useGcpStore.jsGCP service data and state
useEnvStorestores/useEnvStore.jsCloud profiles/credentials

Composables

ComposableFilePurpose
useApicomposables/useApi.jsHTTP fetch wrapper with error handling
useToastcomposables/useToast.jsToast notification system
useTerminalStreamscomposables/useTerminalStreams.jsWebSocket stream management
useSortablecomposables/useSortable.jsTable sorting logic

Build Output

bash
npm run build    # Outputs to ../public/

The Vite build outputs to the root public/ directory so the Express server can serve it directly as static files. When building for Electron, the ELECTRON_BUILD=1 env var tells Vite to use relative paths (base: './').

Testing

bash
cd frontend
npm test         # Run all tests (Vitest)
npm run test:watch  # Watch mode

Tests use Vitest with jsdom environment and @vue/test-utils for component testing.

Released under the MIT License.