Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 2.08 KB

README.md

File metadata and controls

66 lines (43 loc) · 2.08 KB

Headless API — Headless / API-only backend (class #1)

Catalog id: headless-api · Status: exists · Audience: developer Banner app for this class: none

Use this when (from catalog: useWhen)

  • the deliverable is only a backend serving structured content over REST, typed client, and MCP with no site of its own
  • one content store feeding web, iOS, Android, and an AI agent via API or MCP
  • applied as an overlay when other apps or agents consume a class starter's data purely over API/MCP as a first-class surface

Do not use this when (from catalog: doNotUseWhen)

  • any human-facing site or custom UI is the primary deliverable — pick the matching class starter first (#3–#14) and apply headless-api as a mode overlay
  • an ops team will do all their work inside the canned admin UI — that is #2, admin-only mode

What this starter proves

  • Seams: S3, S5
  • Matrix stress cells: Schema & Data, API/MCP, Auth & Actors

Architecture snapshot

  • Auth & actors: per-agent actors + token auth
  • Rendering: none
  • Tenancy: single
  • Transports used: REST, typed client, MCP
  • Agent contracts used: none (external MCP callers)

Scope

In (from catalog: scopeIn)

  • one schema served over three transports (REST, typed client, MCP)
  • token auth and actor attribution
  • S5 contract test suite parity across REST, client, and MCP (with examples/db-sqlite as the TanStack DB companion)

Deliberately out (from catalog: scopeOut)

  • canned admin UI
  • public HTML rendering
  • sample web or mobile frontends

Requires (from catalog: requires)

  • database
  • API token auth

Run it

pnpm install
pnpm --filter starter-headless-api dev

Acceptance tests

Acceptance instance for seams: S3, S5.

pnpm --filter starter-headless-api test:starter

If you are building the full product

Start from this starter and compose any additional mode overlays (headless-api or admin-only) specified in starters/catalog.json. For full product patterns, see the reference banner apps in app/prm (#10) and app/base (#12).