Skip to content

Design generated workspaces

A workspace describes navigation and UI sections. Use pages to group sections into navigable views. The simple section below binds a table and form to a declared entity:

version: 1
workspace:
id: customer_desk
title: Customer desk
description: Maintain customer records.
navigation:
route: /customers
label: Customers
group: Operations
order: 10
pages:
- id: customers
title: Customers
sections:
- id: customer_records
type: entity
title: Customer records
entity: Customer
schema:
entity: Customer
form:
id: customer_form
title: Customer
fields:
name:
component: input
required: true
email:
component: input
type: email
table:
id: customer_table
title: Customers
columns:
- field: name
- field: email

Generate a scaffold linked to existing entities:

Terminal window
php backend-laravel/bin/mettada mettada:workspace:create CustomerDesk --project=Workshop --entities=Customer
php backend-laravel/bin/mettada mettada:lint Workshop

--entities creates data-source sections; it does not infer table columns, filters, actions, or form controls. Add those explicitly and use the workspace schema reference.

The React UI generator normalizes workspace specs into the versioned workspace.v1 contract and validates that contract before writing it. Contract fields that are normalized/generated are not necessarily identical to the authoring YAML shape. The metadata reference documents both schemas.

A minimum contract payload contains stable identity and a title:

{
"version": 1,
"id": "customer_desk",
"title": "Customer desk",
"description": "Maintain customer records."
}

A schema-valid table does not guarantee that the connected API endpoint exists or returns the expected shape. Keep custom dashboard widgets, aggregates, and domain-specific interaction flows in application code unless a documented generator supports them.