Build a UI with AI on top of Vox
Use the metadata of entity types and actions to generate a task-specific UI that submits normal Vox actions.
For the team workflow, see Build a campaign planner.
Start from metadata
The metadata of entity types, GET /api/entity-types, describes:
- Entity routes, fields with their origins, sections, field tabs and relations.
- Create, update and delete actions and their command fields.
- Required values, ranges, formats and dynamic selections.
- Labels, descriptions, prompts, units and confirmation messages.
- List, card, gallery and tree presentation hints, with the title, subtitle and image.
- The topics of fields and entity types, which perspectives use to hide what doesn't matter to someone.
- Filterable, sortable and searchable paths.
- Context dimensions, draft capabilities and permissions.
Give the UI generator that metadata together with the goal of the experience. For example: “Build a campaign planner that lists draft campaigns, edits products and markets, and submits the Schedule campaign action.” The UI can remain specific and polished without hard-coding facts that Vox already publishes.
Use actions as the mutation contract
Do not generate generic PATCH requests. Read the available actions and render their command fields. Include the entity version on an update, and handle a version conflict by reloading rather than overwriting.
Several actions can be submitted as one atomic change when a screen combines several fields behind one Save button. Validation errors identify the action and field path, so the UI can put feedback beside the corresponding input.
An action may save directly, create a draft or contribute to a content release. The UI should present only the modes appropriate for its audience and let Vox enforce the underlying permissions.
Resolve contexts deliberately
Choose the language, market, channel or segment for the experience and send that selection with reads. Vox resolves varying values, memberships and variations consistently for the selected contexts.
An editorial UI may instead request both published and draft content and expose the selected contexts explicitly. A customer-facing UI normally requests only published content in its known context.
Build queries from capabilities
Use only paths marked filterable or sortable, and use the search endpoint for analyzed text. Metadata-driven query building keeps generated screens within the indexes and authorization checks defined by the domain model.
Relations can be expanded when they are bounded. Large index-backed relations have paged entity and reference endpoints, so an editor does not need to load thousands of targets just to show a count or selection.
Keep the security boundary in Vox
The UI may hide an unavailable action or sensitive field for clarity, but that is not the authorization boundary. Vox checks the principal's entity, permission-scope, action, publication and data-classification permissions on every request and omits classified values the principal cannot read.
This is especially important for generated code: the generated experience can improve rapidly without being trusted to reproduce ownership or masking rules correctly.
Choose how much metadata to keep
A generic internal tool can render directly from the live schemas. A branded storefront may use metadata only during generation and then maintain deliberate components. Both approaches still share the same actions and API contracts.
When the model changes, comparing current metadata or model-aware OpenAPI with the generated client reveals the contract change. The UI does not need access to Vox's implementation or entity assemblies.
Connect through the model, not pairwise integrations
Prefer a Vox entity or projection over an application-owned copy of an existing business concept. Use an action when the application intends to change that concept, and subscribe to Vox events when it needs to react after a change has committed or settled. Model a separate application-owned entity only when the concept is genuinely distinct and has its own lifecycle.
This keeps application boundaries deliberate. Adding another interface does not require every existing application to integrate with it, and changing a source system does not require each generated application to learn the new source's protocol or semantics.
See Actions, validation and workflows, Editor metadata and selections, Querying and search and Users, roles and permissions.