Skip to content

Development ​

Prerequisites: Rust stable, Node 22, pnpm 9, and a kubeconfig with at least one context. On Linux, also install the Tauri system dependencies.

bash
pnpm install
pnpm tauri dev          # run the app with hot reload

Checks (CI runs all of them on every push):

bash
pnpm typecheck
pnpm test                                    # frontend unit tests (Vitest)
pnpm test:coverage                           # the same suite, enforcing the coverage thresholds
cd src-tauri
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test                                   # backend unit and IPC contract tests

# Needs a live cluster and kubectl:
WIRING_SMOKE_CONTEXT=docker-desktop cargo test --test smoke -- --ignored

# The custom resource and Helm phases of the smoke test create a CRD, so they run against
# docker-desktop and, with WIRING_SMOKE_EXTRAS=1, against a throwaway cluster of your own:
WIRING_SMOKE_CONTEXT=kind-kind WIRING_SMOKE_EXTRAS=1 cargo test --test smoke -- --ignored

CI builds and tests the backend on Linux, macOS and Windows, and runs the smoke test against a kind cluster on Linux: kind needs Docker for Linux containers, which the hosted macOS and Windows runners do not have.

Documentation site ​

The site at wiringk8s.xyz is built from this README and docs/ in a separate repository.

Project layout ​

text
src/                     React frontend
  app/                   store (zustand), startup, event wiring, global keys
  features/
    cluster/             header, cluster menu, namespace picker
    onboarding/          welcome, connecting and connection-failure panes
    navigator/           sidebar: the resource tree, Custom Resources, Helm
    graph/               React Flow canvas, nodes, edges, layout, kind chips
    table/               per-kind and custom resource tables
    details/             details panel: Overview, YAML, Events, History
    editor/              YAML editor, diff review, Create dialog
    actions/             Actions menu, Scale and Restart dialogs
    logs/                Logs tab, virtualised log view, ANSI rendering
    exec/                Terminal tab (xterm.js)
    forward/             Port-forward dialog, running-forwards popover
    helm/                Helm releases view
    update/              update checks, Update pill and dialog
  shared/                IPC types and commands, UI primitives, empty states
  styles/theme.css       design tokens (colours, type, radii)
src-tauri/               Rust backend
  src/commands.rs        the IPC commands
  src/session/           per-context watches, reducer, writes, rollouts, metrics polling
  src/store/             in-memory object cache
  src/graph/             graph model, relations, status, table rows
  src/logs/              log sessions, stream targets, pumps
  src/exec/              shell sessions
  src/forward/           port-forwards
  src/metrics/           metrics-server quantities and usage
  src/custom/            custom resource ids, tables and requests
  src/discovery.rs       custom resource kinds the cluster serves
  src/helm.rs            Helm releases from their storage Secrets
  src/kubeconfig.rs      context discovery
  src/shell_path.rs      login shell PATH for kubeconfig exec plugins
  src/updates.rs         self-update and the macOS menu
  tests/                 IPC contract tests, live smoke test
examples/demo/           demo namespaces and RBAC for a local cluster
docs/                    design specs, plans, IPC contract, release docs

Design documents ​

DocumentWhat it covers
IPC contractThe backend ↔ frontend commands, events and payload shapes
MVP designArchitecture, the graph model, relations and status rules
Navigator and tables designThe sidebar, per-kind tables and RBAC handling
YAML editing designEdit, diff, apply, conflicts, Create and Delete
Pod logs designLog sessions, merging, previous runs and the log view
Problem explanation designProblem reasons, messages and the cause chain
Workload actions designScale, restart, rollout history and rollback
Port-forward designForward targets, pod selection and the forwards list
Metrics designmetrics-server polling, usage columns and badges
Updater designUpdate checks, the feed and installing
Graph extras designNetworkPolicies, RBAC and Nodes on the graph
Multi-namespace designNamespace scopes, lanes and partial kinds
Exec terminal designShell sessions and the Terminal tab
Onboarding designThe welcome screen, connection failures and empty states
Custom resources and Helm designDiscovery, the generic table, CR owners on the graph, Helm releases
Code signingSigning and notarizing the macOS and Windows installers in CI
Automatic updatesThe updater key and secrets, the update feed, checking a release

These are the implementation plans behind each feature: