> ## Documentation Index
> Fetch the complete documentation index at: https://docs.collabase.ch/llms.txt
> Use this file to discover all available pages before exploring further.

> Design your Registry data model visually — create object types, define attributes, and draw relations between types on an interactive canvas.

# Schema designer

# Schema Designer

The Schema Designer is the visual tool for building your data model. Object types appear as nodes on a canvas, and relations between them appear as connecting arrows. You can see the full structure of your schema at a glance and edit it by clicking directly on the canvas.

Open a schema and click the **Designer** tab to enter the canvas view.

## The canvas

The canvas gives you a live visual representation of your data model.

| Action                          | How                                                                   |
| ------------------------------- | --------------------------------------------------------------------- |
| Move an object type             | Drag the node to a new position. The position is saved automatically. |
| Zoom in or out                  | Scroll or use the zoom controls in the bottom right corner.           |
| Pan                             | Click and drag the canvas background.                                 |
| Open an object type for editing | Click the node.                                                       |
| Add a new object type           | Click **+ Add Object Type** in the top toolbar.                       |

## Creating a schema

<Steps>
  <Step title="Go to Registry">
    Click **Registry** in the main navigation sidebar. Registry is an instance-level module — it is not inside any Space.
  </Step>

  <Step title="Create a new schema">
    Click **+ New Schema**. Enter a name, optionally choose an icon and color, and click **Create**.
  </Step>

  <Step title="Open the designer">
    The new schema opens with an empty canvas. Click **Designer** to start building your model.
  </Step>
</Steps>

## Creating object types

<Steps>
  <Step title="Click + Add Object Type">
    In the Designer toolbar, click **+ Add Object Type**.
  </Step>

  <Step title="Fill in the details">
    Enter the object type name (for example, `Customer` or `Server`). Optionally choose an icon and a color to help visually distinguish this type on the canvas and in the browser. Set a **key prefix** if you plan to use CSV import — this prefix appears in auto-generated IDs.
  </Step>

  <Step title="Create">
    Click **Create**. The new object type appears as a node on the canvas.
  </Step>
</Steps>

Repeat for each object type in your schema. A typical schema has two to six object types.

## Adding attributes to an object type

<Steps>
  <Step title="Open the object type">
    Click the object type node on the canvas. A side panel opens showing the type's current attributes.
  </Step>

  <Step title="Click + Add Attribute">
    Click **+ Add Attribute** in the side panel.
  </Step>

  <Step title="Configure the attribute">
    Fill in the attribute settings:

    | Setting             | Description                                                                                                                                                                                                                                                |
    | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Name**            | The field label shown in forms and the object browser (for example, `Annual Revenue` or `IP Address`).                                                                                                                                                     |
    | **Type**            | The data type. See the [attribute types table](/registry/overview#attribute) for the full list.                                                                                                                                                            |
    | **Required**        | If enabled, this field must be filled when creating a new object.                                                                                                                                                                                          |
    | **Unique**          | If enabled, no two objects of this type can have the same value for this attribute.                                                                                                                                                                        |
    | **Label attribute** | Mark one attribute per type as the label. This attribute's value becomes the object's display name throughout the UI — in relation pickers, search results, the browser table, and linked task views. Only one attribute per object type can be the label. |
  </Step>

  <Step title="Save">
    Click **Save**. The attribute is added to the object type immediately.
  </Step>
</Steps>

<Note>
  Every object type should have exactly one attribute marked as the label. If no label attribute is set, objects of that type display their internal ID instead of a meaningful name.
</Note>

<Warning>
  Deleting an attribute permanently removes all stored values for that attribute across every object of this type. This cannot be undone. Rename or archive attributes instead of deleting them when possible.
</Warning>

## Defining relations between object types

A relation is a directed link from one object type to another, defined through an attribute of type **Relation**.

<Steps>
  <Step title="Open the source object type">
    Click the object type node that will hold the relation field (the "from" side). For example, `Contract` if you want to link contracts to customers.
  </Step>

  <Step title="Add a Relation attribute">
    Click **+ Add Attribute** and set the type to **Relation**.
  </Step>

  <Step title="Select the target type">
    In the **Relates to** field, select the object type this relation points to (for example, `Customer`).
  </Step>

  <Step title="Name the attribute">
    Give the attribute a descriptive name (for example, `Customer` or `Linked Customer`). This name appears as a field label in object forms.
  </Step>

  <Step title="Save">
    Click **Save**. An arrow now appears on the canvas connecting the two object types, representing the relation.
  </Step>
</Steps>

Multiple relation attributes can be defined between the same two object types if there are different relationship meanings to express.

## Editing the canvas layout

Drag any node to reposition it on the canvas. The layout is saved automatically and is per-schema — each schema has its own canvas arrangement. Repositioning nodes is purely visual; it does not change the data model.

## Editing an existing schema

You can modify a schema's data model at any time:

* **Add attributes** — click the object type node and use **+ Add Attribute**.
* **Edit an attribute** — click the attribute name in the side panel to change its settings. You can rename it, change whether it is required, or change its unique constraint. You cannot change an attribute's type after it has been created.
* **Delete an attribute** — click the trash icon next to the attribute. See the warning above.
* **Delete an object type** — click **Delete type** in the side panel. This permanently deletes all objects of that type and all their field values.
* **Edit a relation** — click the arrow on the canvas to open and edit the relation attribute.
