@zuilib/apps · v0.5.0
Build a view your team can keep changing.
@zuilib/apps turns your data and component registry into serializable views that people and models can create, validate, render, and refine. Start with one analytics screen; add pages, actions, policies, and release controls when it becomes an application.
Create, inspect and refine a real ViewSpec.
This is ViewWorkbench from @zuilib/apps/workbench. Select and edit blocks, drag their layout, open the inspector, ask the assistant for a patch, preview JSON and undo the result. The canvas, validation, model context and stored changes all use the same registry and view document.
The whole lifecycle is live above.
The second example wraps those views in an AppSpec. Build edits the real spec as reviewable patches. Run executes that composed spec with mock host adapters; switch identities and the Finance-only page appears or disappears. Govern evaluates the same policies and live telemetry. Inspect JSON proves the authored application is still data. Use the builder’s canvas, inspector, responsive mode, validation, assistant, history and publish controls—they are package components, not screenshots. The authoring controls come from @zuilib/builder.
Install
pnpm add @zuilib/apps
# Optional authoring and operational view types
pnpm add @zuilib/builder
pnpm add @zuilib/workflows
# app.css (Tailwind v4 host)
@import "tailwindcss";
@import "@zuilib/primitives/tailwind.css";
@import "@zuilib/apps/tailwind.css";
Run
import {AppRuntimeProvider, PublishedApp, defineApp} from '@zuilib/apps'
import {createViewRegistry} from '@zuilib/apps'
import {coreViewTypes} from '@zuilib/apps/core'
import {chartViewTypes} from '@zuilib/apps/charts'
import {workflowViewTypes} from '@zuilib/workflows/view-types'
const registry = createViewRegistry(
coreViewTypes, chartViewTypes, workflowViewTypes)
const app = defineApp({
version: 1,
id: 'revenue-ops',
name: 'Revenue operations',
pages: [{id: 'overview', path: '/', title: 'Overview', view}],
resources, variables, actions, policies, environments, publishTargets,
})
<AppRuntimeProvider app={app} subject={user}
environment="production" adapters={hostAdapters}>
<PublishedApp registry={registry} />
</AppRuntimeProvider>