Skip to content

NMooreCo/infraview

Repository files navigation

InfraView

A cross-platform desktop application for managing Kubernetes clusters and HashiCorp Vault secrets. Built with Rust, Tauri 2, Svelte 5, and TypeScript.

License Platform Rust Tauri Svelte

Overview

InfraView provides a unified interface for infrastructure operations — managing Kubernetes clusters, browsing and editing Vault secrets, and running interactive terminal sessions — all from a single native desktop app. No browser required.

Key Features

Kubernetes Management

  • Multi-cluster support with GCP/GKE authentication
  • View and manage Pods, Deployments, Services, and Events
  • Pod logs, describe, and delete actions
  • Deployment scaling and rolling restarts
  • Namespace-scoped resource browsing with search/filter
  • Per-cluster isolated kubeconfig files

HashiCorp Vault

  • Connect to multiple Vault servers
  • Browse secret engines and paths via tree navigation
  • Read, create, edit, and delete secrets (KV v2)
  • Vault health and seal status monitoring

Integrated Terminal

  • kubectl exec directly into pods from the UI
  • Cluster shell sessions with KUBECONFIG pre-configured
  • Full PTY support with xterm.js — resize, scrollback, clickable links
  • Tabbed terminal panel (VS Code-style)

Desktop Experience

  • Native app via Tauri 2 — lightweight, no Electron/Chromium bloat
  • Dark and light themes
  • Collapsible sidebar navigation
  • Dashboard with cluster and connection overview

Architecture

infraview/
├── src/                        # Svelte 5 + TypeScript frontend
│   ├── lib/
│   │   ├── components/         # Reusable UI components
│   │   │   ├── DataTable       # Sortable data table
│   │   │   ├── TreeView        # Recursive tree navigation
│   │   │   ├── Terminal        # xterm.js wrapper
│   │   │   ├── TerminalPanel   # Tabbed terminal manager
│   │   │   ├── StatusBadge     # Color-coded status indicators
│   │   │   ├── Modal           # Dialog component
│   │   │   └── Sidebar         # App navigation
│   │   ├── stores/             # Svelte state management
│   │   └── types/              # TypeScript interfaces
│   └── routes/                 # SvelteKit pages
│       ├── +page.svelte        # Dashboard
│       ├── kubernetes/         # K8s management
│       ├── vault/              # Vault secrets
│       └── settings/           # App configuration
│
├── src-tauri/                  # Rust backend
│   └── src/
│       ├── commands/           # Tauri command handlers
│       │   ├── kubernetes.rs   # Cluster & resource operations
│       │   ├── vault.rs        # Vault API operations
│       │   └── terminal.rs     # PTY session management
│       ├── services/           # Core business logic
│       │   ├── kubernetes.rs   # kubectl/gcloud wrapper
│       │   ├── vault.rs        # Vault HTTP client
│       │   └── terminal.rs     # PTY lifecycle management
│       ├── models/             # Shared data structures
│       └── error.rs            # Error types

Frontend-Backend Communication:

  • Tauri commands (invoke) for request/response operations
  • Tauri events for real-time streaming (terminal output, log tailing)

Prerequisites

  • Rust (stable)
  • Node.js (v18+)
  • kubectl — for Kubernetes operations
  • gcloud CLI — for GKE authentication (optional, only needed for GCP clusters)

Platform-Specific Dependencies

Windows: No additional dependencies (uses WebView2, included with Windows 10/11).

macOS: No additional dependencies (uses WebKit).

Linux:

sudo apt-get install -y \
  libwebkit2gtk-4.1-dev \
  build-essential \
  libxdo-dev \
  libssl-dev \
  libayatana-appindicator3-dev \
  librsvg2-dev

Getting Started

Install Dependencies

git clone https://github.com/yourusername/infraview.git
cd infraview
npm install

Development

npm run tauri dev

This starts the Vite dev server with hot reload and launches the Tauri window. Changes to Svelte files reload instantly; changes to Rust files trigger a recompile.

Build

# Install the Tauri CLI (one-time)
cargo install tauri-cli --version "^2"

# Build release binary
cargo tauri build

Output locations:

Platform Binary Installer
Windows src-tauri/target/release/infraview.exe src-tauri/target/release/bundle/msi/infraview_*.msi
macOS src-tauri/target/release/bundle/macos/InfraView.app src-tauri/target/release/bundle/dmg/InfraView_*.dmg
Linux src-tauri/target/release/infraview src-tauri/target/release/bundle/deb/infraview_*.deb

The standalone binary runs without installation.

Type Checking

# Svelte/TypeScript
npm run check

# Rust
cd src-tauri && cargo check

Usage

Adding a Kubernetes Cluster

  1. Navigate to the Kubernetes tab
  2. Click Add Cluster
  3. Enter cluster details (GCP Project ID, Cluster Name, Region)
  4. Click Authenticate to run gcloud container clusters get-credentials
  5. Select a namespace and browse resources

Managing Vault Secrets

  1. Navigate to the Vault tab
  2. Click Add Connection and enter your Vault server address and token
  3. Browse secret paths in the tree view
  4. Click a secret to view its key-value pairs
  5. Use the editor to create, update, or delete secrets

Terminal Sessions

From the Kubernetes page:

  • Click Exec on any pod row to open a shell inside that pod
  • Click Shell in the toolbar to open a cluster-scoped terminal with KUBECONFIG set
  • Terminal panel supports multiple tabs — run sessions side by side

Tech Stack

Layer Technology Purpose
Backend Rust Core logic, process management, API clients
Framework Tauri 2 Native desktop shell, IPC, system integration
Frontend Svelte 5 Reactive UI with runes ($state, $derived, $effect)
Routing SvelteKit File-based routing with static adapter
Bundler Vite 6 Frontend build tooling
Terminal xterm.js 6 Terminal emulation in the webview
PTY portable-pty Cross-platform pseudo-terminal management
HTTP reqwest Vault API client (rustls-tls)
Async Tokio Async runtime for process execution

Configuration

Cluster configurations and preferences are stored in your platform's app data directory:

Platform Path
Windows %APPDATA%/infraview/
macOS ~/Library/Application Support/infraview/
Linux ~/.local/share/infraview/

Files:

  • clusters.json — Kubernetes cluster configurations
  • kubeconfigs/ — Per-cluster isolated kubeconfig files

Recommended IDE Setup

VS Code + Svelte + Tauri + rust-analyzer

Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors