@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.1 β 1.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -0
- package/dist/openapi-k8s-toolkit.es.js +11676 -11594
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +11580 -11498
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/ConverterBytes.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/types.d.ts +1 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/utils.d.ts +17 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/utilts.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/utils.d.ts +2 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +4 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
## π openapi-k8s-toolkit
|
|
2
|
+
|
|
3
|
+
A modular, extensible UI toolkit for building Kubernetes-powered applications β without writing repetitive CRUD logic or UI boilerplate.
|
|
4
|
+
|
|
5
|
+
This toolkit provides:
|
|
6
|
+
|
|
7
|
+
- π§© **Composable UI blocks** (tables, terminals, log viewers, dashboards, cards)
|
|
8
|
+
- βοΈ **Smart data providers** that fetch and normalize Kubernetes and OpenAPI-driven resources
|
|
9
|
+
- π **Schema-based OpenAPI/Kubernetes forms** with validation, presets, and dynamic layouts
|
|
10
|
+
- π‘ **Real-time Websocket live data streaming** for Pods, Events, Logs, Terminals, etc.
|
|
11
|
+
- π **A powerful Factory Engine** that renders pages and components from declarative configuration (JSON/YAML)
|
|
12
|
+
- π¨ **Customizable Storybook Docs** with live configuration playgrounds
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## π Key Concepts
|
|
19
|
+
|
|
20
|
+
### π§ 1. Dynamic Component Factory
|
|
21
|
+
|
|
22
|
+
Instead of manually wiring dozens of components together, define **what** should render β not **how**.
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
type: EnrichedTable
|
|
26
|
+
data:
|
|
27
|
+
id: pods-table
|
|
28
|
+
cluster: dev
|
|
29
|
+
k8sResourceToFetch:
|
|
30
|
+
plural: pods
|
|
31
|
+
apiVersion: v1
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The factory resolves:
|
|
35
|
+
|
|
36
|
+
- Routing context (`cluster`, `namespace`, `resource`)
|
|
37
|
+
- Data fetching configuration
|
|
38
|
+
- Permissions
|
|
39
|
+
- UI layout behavior
|
|
40
|
+
|
|
41
|
+
β¦and renders the right component β fully wired.
|
|
42
|
+
|
|
43
|
+
Storybook includes live playgrounds for each factory type.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### π‘ 2. Smart Data Hooks
|
|
48
|
+
|
|
49
|
+
The toolkit includes advanced hooks that abstract K8s + OpenAPI internals:
|
|
50
|
+
|
|
51
|
+
- `useK8sSmartResource`
|
|
52
|
+
- `useMultiQuery`
|
|
53
|
+
- live event streams
|
|
54
|
+
- generative OpenAPI form helpers
|
|
55
|
+
|
|
56
|
+
They handle:
|
|
57
|
+
|
|
58
|
+
- label/field selectors
|
|
59
|
+
- live logs and terminals
|
|
60
|
+
- resource normalization
|
|
61
|
+
- error states + retry logic
|
|
62
|
+
- batching and subscription reuse
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### π 3. Kubernetes Tables
|
|
67
|
+
|
|
68
|
+
Tables are:
|
|
69
|
+
|
|
70
|
+
- Cluster/WebSocket aware
|
|
71
|
+
- Automatically enriched using Kubernetes metadata
|
|
72
|
+
- Customizable (columns, sorting, grouping, row actions, links to forms, etc.)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### π§ͺ 4. Forms Powered by OpenAPI + Kubernetes
|
|
77
|
+
|
|
78
|
+
Forms are auto-built from CRDs, OpenAPI schemas, and Kubernetes metadata β but still fully overrideable:
|
|
79
|
+
|
|
80
|
+
- custom fields
|
|
81
|
+
- computed fields
|
|
82
|
+
- presets & blueprints
|
|
83
|
+
- etc
|
|
84
|
+
|
|
85
|
+
Think _"Kubernetes + JSON Schema form generator on steroids."_ ππͺ
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### π 5. Storybook Included
|
|
90
|
+
|
|
91
|
+
Every major module ships with a **docs-only Storybook entry** and an interactive control system to generate YAML/JSON config.
|
|
92
|
+
You can preview factories components if they are not tightly wired to backend
|
|
93
|
+
|
|
94
|
+
## π Installation & Usage
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install openapi-k8s-toolkit
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then import what you like
|
|
101
|
+
|
|
102
|
+
## β¨ Why this exists
|
|
103
|
+
|
|
104
|
+
Building Kubernetes-aware UIs repeatedly results in the same pain:
|
|
105
|
+
|
|
106
|
+
- API quirks
|
|
107
|
+
- forms from CRDs
|
|
108
|
+
- live resource tables
|
|
109
|
+
- labels/fields selectors
|
|
110
|
+
- permissions
|
|
111
|
+
- routing based on cluster/namespace/object
|
|
112
|
+
|
|
113
|
+
This toolkit abstracts those patterns into reusable building blocks so teams can focus on **intent and experience, not plumbing.**
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## π€ Contributing
|
|
118
|
+
|
|
119
|
+
[Check this out](./CONTRIBUTING.md)
|