Skip to content

Latest commit

Β 

History

History
119 lines (78 loc) Β· 3.09 KB

File metadata and controls

119 lines (78 loc) Β· 3.09 KB

πŸ“˜ openapi-k8s-toolkit

A modular, extensible UI toolkit for building Kubernetes-powered applications β€” without writing repetitive CRUD logic or UI boilerplate.

This toolkit provides:

  • 🧩 Composable UI blocks (tables, terminals, log viewers, dashboards, cards)
  • βš™οΈ Smart data providers that fetch and normalize Kubernetes and OpenAPI-driven resources
  • πŸ“„ Schema-based OpenAPI/Kubernetes forms with validation, presets, and dynamic layouts
  • πŸ“‘ Real-time Websocket live data streaming for Pods, Events, Logs, Terminals, etc.
  • πŸ— A powerful Factory Engine that renders pages and components from declarative configuration (JSON/YAML)
  • 🎨 Customizable Storybook Docs with live configuration playgrounds

Whether you're building a full Kubernetes console, a DevOps dashboard, a tenant-aware SaaS admin, or automation portal β€” this toolkit helps you build fast, stays extensible, and avoids reinventing the same patterns.


πŸš€ Key Concepts

πŸ”§ 1. Dynamic Component Factory

Instead of manually wiring dozens of components together, define what should render β€” not how.

type: EnrichedTable
data:
  id: pods-table
  cluster: dev
  k8sResourceToFetch:
    plural: pods
    apiVersion: v1

The factory resolves:

  • Routing context (cluster, namespace, resource)
  • Data fetching configuration
  • Permissions
  • UI layout behavior

…and renders the right component β€” fully wired.

Storybook includes live playgrounds for each factory type.


πŸ“‘ 2. Smart Data Hooks

The toolkit includes advanced hooks that abstract K8s + OpenAPI internals:

  • useK8sSmartResource
  • useMultiQuery
  • live event streams
  • generative OpenAPI form helpers

They handle:

  • label/field selectors
  • live logs and terminals
  • resource normalization
  • error states + retry logic
  • batching and subscription reuse

πŸ“‘ 3. Kubernetes Tables

Tables are:

  • Cluster/WebSocket aware
  • Automatically enriched using Kubernetes metadata
  • Customizable (columns, sorting, grouping, row actions, links to forms, etc.)

πŸ§ͺ 4. Forms Powered by OpenAPI + Kubernetes

Forms are auto-built from CRDs, OpenAPI schemas, and Kubernetes metadata β€” but still fully overrideable:

  • custom fields
  • computed fields
  • presets & blueprints
  • etc

Think "Kubernetes + JSON Schema form generator on steroids." πŸ’‰πŸ’ͺ


πŸ“š 5. Storybook Included

Every major module ships with a docs-only Storybook entry and an interactive control system to generate YAML/JSON config. You can preview factories components if they are not tightly wired to backend

πŸ›  Installation & Usage

npm install openapi-k8s-toolkit

Then import what you like

✨ Why this exists

Building Kubernetes-aware UIs repeatedly results in the same pain:

  • API quirks
  • forms from CRDs
  • live resource tables
  • labels/fields selectors
  • permissions
  • routing based on cluster/namespace/object

This toolkit abstracts those patterns into reusable building blocks so teams can focus on intent and experience, not plumbing.


🀝 Contributing

Check this out