Skip to content

Docs corpus recipe

Rendered

matter
docs.mattermode.com⌘K

API reference — corpus index

Search 142 endpoints
POST
Create entity/v1/entities
GET
Retrieve entity/v1/entities/{id}
POST
Dissolve entity/v1/entities/{id}/dissolve
POST
Close round/v1/rounds/{id}/close_package
PATCH
Update grant/v1/grants/{id}
DELETE
Revoke token/v1/tokens/{id}

Goal

When a developer or agent lands on docs.mattermode.com, they need to (1) search the entire corpus instantly with Cmd+K, (2) scan endpoints grouped by lifecycle phase (Create / Manage / Exit / Platform), and (3) jump straight into the endpoint they need. The corpus landing is a single scannable grid — no marketing prose, no funnel — because developers are here to find an endpoint and read its reference.

Layout breakdown

Single-column body with three vertical regions inside the docs-shell topbar. Region map:

┌─ Topbar (global) ─────────────────────────────────────────────────┐
│  [Matter logo]   Docs   Brand   API   Changelog   [Try]  Cmd+K     │
├─ Hero ────────────────────────────────────────────────────────────┤
│  Eyebrow: DEVELOPER DOCS                                            │
│  DisplayHeading: Build with Matter.                                 │
│  Pill search bar — "Search 247 endpoints…"  (Cmd+K opens palette)   │
├─ Lifecycle: Create ────────────────────────────────────────────────┤
│  Eyebrow: CREATE                                                    │
│  Grid of EndpointBadge cards — clamp 260px minmax, auto-fill         │
│   ┌─────────┐ ┌─────────┐ ┌─────────┐                              │
│   │ POST    │ │ GET     │ │ POST    │                              │
│   │ /enti…  │ │ /entities/{id} │ /intents │                       │
│   └─────────┘ └─────────┘ └─────────┘                              │
├─ Lifecycle: Manage ────────────────────────────────────────────────┤
│  Eyebrow: MANAGE                                                    │
│  Grid of EndpointBadge cards (same shape)                           │
├─ Lifecycle: Exit ──────────────────────────────────────────────────┤
│  Eyebrow: EXIT                                                      │
│  Grid of EndpointBadge cards                                        │
├─ Platform ────────────────────────────────────────────────────────┤
│  Eyebrow: PLATFORM                                                  │
│  Auth, webhooks, idempotency, versioning grid                       │
└────────────────────────────────────────────────────────────────────┘

Card minimum width clamps at 260px so the grid never collapses to a one-up layout below the design-pad width.

Component manifest

RegionComponentWhy over alternatives
Search barPill-shaped <input> + Cmd+K palette (Fumadocs <RootProvider search>)Native to Fumadocs; auto-indexed; keyboard-first
Lifecycle eyebrowEyebrowSection anchor — phase label
Endpoint card gridCustom CSS Grid (auto-fill, minmax(260px, 1fr))Responsive grid without a grid component
Endpoint cardCard + EndpointBadgeCard frames; EndpointBadge labels the verb + path
Page titleDisplayHeading as="h1" size="hero"Top of the page outline

Responsive behaviour

BreakpointCard gridSearch
< 768px1 column (cards stretch full-width)Search collapses to icon button; Cmd+K still works
768–1023px2 columnsFull pill search
1024–1439px3 columnsFull pill search with placeholder text
≥ 1440px4 columnsSame

States

StateTriggerBehaviour
DefaultPage loadGrids hydrate; search bar focuses on Cmd+K
Cmd+K openCmd/Ctrl+K pressedFumadocs search palette overlay; backdrop blur
Search activeUser typed into paletteInline results group by lifecycle phase; arrow keys navigate
Empty resultsNo matches"Nothing matches. Try entities or tokens."
Card hoverMouse hoverCard border shifts to peach (--matter-peach 45%); subtle translate-Y

Implementation

Source: apps/docs/app/(docs)/layout.tsx and the corpus page at apps/docs/app/(docs)/page.tsx. The grid is server-rendered from openapi.yaml operations; each op.tags[0] drives the lifecycle phase grouping.

Source

apps/docs/app/(docs)/layout.tsx

On this page