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

> ## Agent Instructions
> The docs are served at https://docs.devias.io. Every path in these docs is relative to that root: /llms.txt is https://docs.devias.io/llms.txt.
> Devias is an open-source platform that works as an operating system for a business: a core (records, views, workflows, agents, permissions) with installable modules.
> Pages are typed by folder. concepts/ explains what things are, guides/ gives procedures, reference/ is exhaustive (SDK, CLI, HTTP API), operate/ covers hosting. Use /start/glossary for exact terms.
> Every id in a module (module, object, field, view, action, workflow, step, connection, variable, event, policy) is a uuid. Generate them with `devias id <count>`. Never invent dotted or readable ids.
> Run `devias plan` and read its output before `devias apply`. Apply only what the plan says.
> The OpenAPI document, including the routes of the modules in the reference setup, is at /reference/api/openapi.json.
> Devias is young and changes quickly. If a page and the source repository (github.com/devias-io/devias) disagree, the repository is right.

# Views and navigation in a module

> How a module declares how records are shown. Lists every property of defineView (table, kanban, calendar), defineLayout with its tabs, column and split shells, the four sidebar target kinds, and defineCommandItem for the command palette.

Objects hold the data. Views, layouts, navigation items and commands decide how people see it. A manifest declares each with a `define…` function.

## Declare a view with defineView

A view is a saved way of looking at one object.

| Property | What it does |
| - | - |
| `objectId`, `label` | Which object, and what the view is called. |
| `type` | `table`, `kanban` or `calendar`. |
| `isDefault` | The view people land on. |
| `fields` | The columns or card fields, in order, with optional widths. |
| `filter` | Which records the view keeps, such as deals that are still open. |
| `sorts` | How records are ordered. |
| `groupById` | For a board, the field that makes the columns. |
| `settings` | Options for the view type, such as a column total on a board. |

Views are optional. An object with none gets a plain table of its first fields. Declare views to choose the columns, add a board or a calendar, and mark one `isDefault` so that people land on it.

## Declare a layout with defineLayout

A layout arranges a record's page. It has a `shell` (`tabs`, `column` or `split`) and the blocks inside it.

Blocks come from two places. Devias ships blocks for the common things: a record's fields, related records, comments, activity and tasks. A module's studio code can add more: see [Blocks](https://docs.devias.io/guides/customize-studio/blocks.md). If an object has no layout, Devias draws a default. Add a layout when a record page needs more, such as a second tab for the deals that belong to a company.

## Declare navigation items with defineNavItem

Nav items are the rows of the sidebar. Each has a label, an icon and a target.

* `group` makes a heading that holds other items, linked by `parentId`.
* `object` opens an object, optionally on a given view.
* `page` opens a page that the module's studio code provides.
* `url` opens a link, optionally in a new tab.

Use `position` to order items among others. People can still rename, hide and rearrange them in **Settings → Navigation**.

## Declare commands with defineCommandItem

Command items appear in the command palette (`⌘K`). A command can create a record (**New expense**), go somewhere (**Go to expenses**) or open a block, and may have a shortcut such as `g e`.

## Related

* [Actions and server code](https://docs.devias.io/guides/modules/actions-and-server-code.md): make the module do things.
* [Views, layouts and navigation](https://docs.devias.io/concepts/views-and-layouts.md): the concept.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.