Skip to main content
Templates make solutions repeatable. A template is just a page under a space’s templates/ prefix — versioned, ACL’d, and editable like any other page — with two optional frontmatter fields:

Page templates

  • Create a template: create a page at templates/<name> in the space (the space manage page has a shortcut), write the starting content, add the frontmatter above.
  • Use a template: the New Page form shows a “Start from” picker with every template you can read, org-wide. Choosing one pre-fills the content and title; after the page is created, metadataDefaults are applied as metadata so new pages are immediately queryable in Views.
  • API: GET /templates (optional ?space=<slug>&includeContent=true) lists visible templates.
Combined with export/import, a space of templates is a distributable solution kit: export the space, import it into another deployment, and the templates come with it.

Space templates

Page templates seed one page; space templates seed the whole space. The /templates gallery in the app lists ready-made kits — pages, page templates, and agent instructions included — and “Use this template” creates a new space with everything in place. A space template’s content is exactly the export bundle format, so authoring one is: build a space, export it, add it to a catalog. Templates come from three sources, all merged into one gallery:

Built-in

A catalog tracked in the repo (packages/api/src/space-templates/builtin/). Override with COCO_SPACE_TEMPLATES_PATH for a zero-egress company catalog.

Remote (opt-in)

COCO_SPACE_TEMPLATES_URL names a root.json URL. Https-only, private hosts rejected, response sizes capped, bundles re-validated. Falls back to last good copy.

Org-maintained

Org admins can “Save as org template” from any space manage page; it appears in the gallery for that org only.

API

  • GET /space-templates
  • POST /space-templates/:source/:id/spaces
  • POST /space-templates/org
  • DELETE /space-templates/org/:id
Marketing entry points can deep-link /templates?template=<id> — the destination survives sign-in and org onboarding.
Full spec: specs/SPACE-TEMPLATES.md.