Tabs & Spaces Developers

Build

Home pages

Besides its tabs, your app can offer home pages. A workspace owner or admin can choose one in Settings → General → Home, and then it's what everyone in the workspace sees on Home. The built-in Home stays one click away, from the link under the page.

A home page is built like a Custom tab: a page you host, shown in the same sandboxed frame, told who's looking, with a signed token for your server. The difference is where it is: on Home, so there's no space or tab around it.

Offer one

Add home to your manifest, next to tabs:

json
{
  "home": [
    {
      "id": "overview",
      "name": "Team overview",
      "description": "Today's numbers and what's waiting.",
      "url": "/home"
    }
  ]
}

An app offers up to 3. Admins see each one as "Team overview, from Acme CRM" when they choose.

Who's looking

connect() resolves as in a tab, but the context has no space or tab, and has a home:

ts
import { connect, isHome } from "@tabs-and-spaces/sdk";

const tands = await connect();
if (isHome(tands.context)) {
  // Which of your home pages, and whether this person is a guest.
  const { home, user } = tands.context;
  show(home.id, user.guest);
}

Everyone in the workspace sees the chosen Home, guests too. user.guest tells you, so you can decide what to show them. A guest's token says so as well, so your server can check it.

What it can do

On Home
Keep dataworkspace and user scopes. space and tab data are refused with NO_SPACE. Guests read workspace data and keep their own; they don't change the workspace's.
Call your serverAs in a tab: verifyToken() accepts a home page's token. Use isHome(context) to tell them apart.
Take people somewhereopen({ space, tab }) takes them to a space, or one of its tabs. Your page is left.
Report events, event keys, triggersNot on Home: they belong to a space. emit(), requestEventKey() and openTrigger() are refused with NO_SPACE.
Know the workspace is read-onlyAs in a tab: tands.readOnly and onReadOnly(). See When the workspace is read-only.

A home page reads only its own app's data and who's looking. It can't list the person's spaces, tasks or messages.

When it can't be shown

If your app is removed, or its page doesn't answer, Home shows the built-in page instead. Admins see why, and the choice comes back when the app is installed again.

Search every page: actions, the manifest, the SDK, tokens…