Features Apograph CMS on GitHub

Shell plugin

The frame every other admin plugin renders inside.

Documents 0.5.2 Updated Edit this page Report a problem

On this page

The admin’s chrome. It contributes the layout every private route is wrapped in — a collapsible left sidebar beside a <main> inset — plus the home page at /.

Install

npm install @apograph/shell-admin

Register

// apps/admin/src/plugins.ts
import { ShellPlugin } from '@apograph/shell-admin';

ShellPlugin();

There is no server half, no configuration and no environment variables. Register it after IdentityPlugin(), whose AuthProvider it composes.

It owns the auth gate

The shell’s layout composes identity’s AuthProvider around RequireAuth around the app shell. The host mounts that layout as the single parent of every non-public route and stays auth-agnostic — so the shell is what makes a private route render only for a signed-in user.

That is worth knowing before removing it: an admin without the shell has no gate, not just no sidebar.

Regions a page fills

The shell draws two regions it does not fill, so a page can put its own controls in the frame without the frame knowing about the page:

  • The top bar’s trailing actions, through PageActions.
  • The sidebar’s navigation, through SIDEBAR_NAV_SLOT — which is how every other admin plugin gets an entry in the rail.

See slots for the full list of extension points and admin plugins for contributing to them.

The sidebar

Collapsible, with ⌘B as the shortcut. On mobile it is an overlay drawer. When it is collapsed the reveal trigger renders inline in the page’s top bar, and a floating fallback appears only on pages that draw no bar.