VVibeFlui

Resources

A resource represents one domain object or screen area, such as users, products, orders, or invoices.

The resource property is required for every schema object.

Single resource

schemas/users/users.schema.ts

TS
export const usersSchema = {
  version: "1.0.0",
  resource: "users",
  title: "Users",
  endpoint: "/api/users",
  table: {
    columns: ["name", "email", "status"]
  },
  form: {
    mode: "modal",
    fields: ["name", "email", "status"]
  }
} as const;

Multi-resource page

Use resources[] when one page needs multiple related resource schemas.

schemas/workspace/workspace.schema.ts

TS
export const workspaceSchema = {
  version: "1.0.0",
  resource: "workspace",
  title: "Workspace",
  layout: {
    type: "tabs"
  },
  resources: [
    {
      resource: "users",
      title: "Users",
      endpoint: "/api/users",
      table: {
        columns: ["name", "email", "role.name", "status"]
      },
      form: {
        mode: "modal",
        fields: ["name", "email", "roleId", "status"]
      }
    },
    {
      resource: "roles",
      title: "Roles",
      endpoint: "/api/roles",
      table: {
        columns: ["name", "description"]
      },
      form: {
        mode: "modal",
        fields: ["name", "description"]
      }
    }
  ]
} as const;

Multi-resource tabs are generated from resources[]. Use each child resource's title or resource value for the tab label.

Identity

Use identity when row IDs and endpoint placeholder names need to be explicit.

schemas/users/users.schema.ts

TS
export const usersSchema = {
  version: "1.0.0",
  resource: "users",
  identity: {
    key: "id",
    param: "id"
  },
  endpoint: {
    update: { url: "/api/users/:id", method: "PATCH" },
    delete: { url: "/api/users/:id", method: "DELETE" }
  }
} as const;

identity.key is read from row data. identity.param is used to replace endpoint placeholders.

Resource naming

Use stable lowercase resource keys:

TXT
users
products
orders
workspaceMembers
projectTasks

Avoid display labels as resource keys:

TXT
Users Management
Product Table

Use title or description for human-readable text.

Backend responsibility

Resource names help the UI organize behavior. They do not authorize access. The backend must still check permissions and enforce workflow rules.