VVibeFlui

Root Schema

The root schema is the top-level object passed to FluiKit.

app/users/page.tsx

TSX
<FluiKit schema={usersSchema} />

It can describe one resource or a multi-resource page through resources[].

Root properties

PropertyTypePurpose
versionstringSchema version.
resourcestringRequired resource key for the current schema object.
titlestringHuman-readable UI title.
descriptionstringShort UI or documentation description.
mode"static" | "server" | "readonly"Compact mode. readonly is accepted as shorthand for readonly UI.
dataMode"static" | "server"Explicit data loading mode.
uiMode"interactive" | "readonly"Controls whether generated UI can execute actions.
adapterstring | objectUI adapter selection.
identityobjectRow identity and endpoint parameter mapping.
endpointstring | objectAPI endpoint configuration.
providerobjectData provider metadata.
handlersobjectOperation-to-handler string mappings.
themeobjectTheme and class name configuration.
layoutobjectPage or section stacking, tab navigation, form tabs, or wizard steps.
dashboardobjectDashboard card configuration.
tableobjectTable configuration.
formobjectForm configuration.
detailobjectDetail view configuration.
actionsboolean | objectBuilt-in and custom action configuration.
permissionsobjectPermission keys or conditions.
hooksobjectLifecycle hook string keys.
transformobjectRequest, response, or submit transform keys.
registryobjectDeclares registry keys used by the schema.
persistobjectTable state persistence configuration.
messagesobjectMessage defaults and resolver keys.
feedbackobjectFeedback display configuration.
eventsobjectEvent handler string keys.
debugboolean | objectDebug and inspector behavior.
resourcesarrayNested resource schemas for multi-resource pages.
aiobjectOptional descriptive metadata for documentation, review, or generation workflows. It does not affect UI rendering.

Single-resource example

schemas/users/users.schema.ts

TS
export const userSchema = {
  version: "1.0.0",
  resource: "users",
  title: "Users",
  description: "Manage user accounts.",
  mode: "server",
  uiMode: "interactive",
  endpoint: "/api/users",
  table: {
    columns: ["name", "email", "status"]
  },
  form: {
    mode: "modal",
    fields: ["name", "email", "status"]
  },
  actions: true
} as const;

Readonly root example

Use uiMode: "readonly" when the UI should display information but not execute create, update, delete, or custom actions.

uiMode: "readonly" forces create/edit/delete/row/bulk/toolbar actions off regardless of what actions requests. Viewing is the one exception: viewing isn't a mutation, so set actions.view.enabled: true to keep the row-level view action (and the ability to open it) available. Without that explicit opt-in, view also defaults to disabled. The view action opens from a table row, so a readonly detail view still needs table configured.

schemas/users/readonly-user.schema.ts

TS
export const readonlyUserSchema = {
  version: "1.0.0",
  resource: "users",
  title: "Users",
  mode: "static",
  uiMode: "readonly",
  table: {
    columns: ["name", "email", "role.name"]
  },
  detail: {
    enabled: true,
    mode: "page",
    fields: [
      { key: "name", label: "Name" },
      { key: "email", label: "Email" },
      { key: "role.name", label: "Role" }
    ]
  },
  actions: {
    view: { enabled: true }
  }
} as const;

Common mistakes

  • Using form.mode: "readonly". Use uiMode: "readonly" or field-level readonly: true instead.
  • Adding inline functions to handler, validator, renderer, optionLoader, or computed. Use registry string keys.
  • Storing secrets, tokens, SQL, or workflow rules inside the schema.
  • Treating frontend schema validation as final backend validation.