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

# Spaces

> Split the sidebar into spaces for each kind of work, like moderation, support and engineering.

A small project fits in one sidebar. Once you have inboxes for reports, support, crashes and billing, records for every kind of thing in your app and a few pages, the sidebar turns into a long list that everyone scrolls past. Spaces group it by the work people do. A switcher under the project name moves between them, and each space has its own short sidebar.

```ts theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
import { b, space } from "pult"

export const moderation = space("moderation", {
  icon: "shield",
  home: [
    b.count(reports, { filter: { state: "open" }, label: "Open reports" }),
    b.items(reports, { filter: { state: "open" }, limit: 5 }),
  ],
  inboxes: [reports, abuse],
  resources: [user, message, repo],
  flags: [maintenance],
})

export const support = space("support", {
  icon: "life-buoy",
  inboxes: [support, pilots],
  resources: [user, org],
  pages: [growth],
})

export const engineering = space("engineering", {
  icon: "bug",
  inboxes: [crashes],
  resources: [repo],
  pages: [operations],
  flags: [newEditor, signupLimit],
})
```

A space lists:

* `inboxes`: the inboxes in its sidebar. [Views](/build/views) come along with their inbox.
* `resources`: the records people look up from it.
* `pages`: the [pages](/build/pages) in its sidebar.
* `flags`: the [flags](/build/flags) its Flags page shows.
* `home`: what Home shows in this space, as blocks or a function, like a [page](/build/pages). Without one, Home is the project's home.

`label` defaults to the name with a capital letter, and `icon` is one of the [icon names](/build/inboxes#icons). Spaces appear in the order you define them.

The same inbox, resource, page or flag can be in several spaces. Users belong in both moderation and support, so put them in both.

## Who sees which space

Spaces follow [roles](/build/roles) on their own. Someone sees a space when they can open one of its inboxes or pages, or change one of its flags. A space that only lists records shows for anyone who can open one of them. A moderator whose role covers reports and abuse sees Moderation and nothing else, and with a single space the switcher disappears, so their sidebar is simply shorter. Spaces never change what someone can open; they only decide where it sits.

## Moving between spaces

Click a space, press `g` and then its number, or pick it in ⌘K. The console remembers the last space you used in each environment.

Links don't change with spaces. Opening a report from a notification or from search takes you to Moderation, because that's where reports are. If what you open is also in the space you're in, you stay there.

## Everything has a place

Once a project has spaces, `pult check` fails for an inbox, page, flag or searchable resource that isn't in any of them, since only search would reach it. A project without spaces keeps a single sidebar with everything in it.


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