Skip to main content
View as Markdown

Templates & Examples

The fastest way to learn Sovrium is to start from a working app. Sovrium ships a set of example configurations — each a complete, runnable project that composes real features (tables, auth, pages, theme, i18n, automations) into a single config tree. The same examples double as sovrium init templates, so you can scaffold any of them into a new directory and start iterating immediately.

Every example is a directory with an app.yaml entry point. Anything beyond the smallest starter splits its configuration across a config/ subtree using $ref — one file per collection entity, one file per singleton, scalars stay inline. This mirrors the structure sovrium init scaffolds for you.

Available templates

Eighteen templates ship with the binary. The first six teach one capability each; the rest are complete business apps you can run as-is.

Starters — learn one capability at a time

Template Description
hello-world Minimal starter — one page, no collections. The default for sovrium init. Stays a single app.yaml to demonstrate when not to pre-split.
landing-page Bilingual marketing site with i18n, a theme, reusable components, and the home page split out for size.
blog Blog with posts (rich-text), tags, authors, and an index plus a dynamic /blog/:slug detail route.
docs-site Documentation website showcasing the markdown-pages feature: real .md files under content/docs/, a contentDir collection, a frontmatter sidebar, prev/next chrome, a TOC, and Shiki-highlighted code. No tables, no auth.
api-only Headless API mode with tables (projects, tasks) and auth — no pages. Demonstrates Sovrium as a backend.
mcp-server Headless MCP server exposing tables to an LLM client via per-entity aiAccess — no pages. See MCP Integration.

Business apps — complete, runnable systems

Template Description
crm Contacts, companies, and a deal pipeline, with email/password auth and dashboard + sign-in pages.
projects Project workspace — a Gantt timeline, a task kanban, and a deadline calendar: four views over the same two tables.
helpdesk Support desk — a public intake form feeding a triage kanban and ticket grid, with automations confirming receipt and announcing resolutions.
content-calendar Editorial calendar — a month view, an editorial kanban, briefs and assets per piece, and a Monday cron emailing the team what ships this week.
people HR workspace — an employee directory with field-level salary protection, a time-off calendar, and a request flow that pauses for admin approval.
events Event management — a public events page, a public registration form, email confirmation per attendee, and a calendar plus registrations grid.
assets Asset tracker — barcoded, photographed, valued equipment assigned to people and grouped by location, with a quarterly inventory-check cron.
expenses Expense tracking — members file expenses with receipts and see only their own (row-level permissions); admins approve through a paused automation.
intranet Public marketing pages plus an auth-gated portal area with role-gated sections. Magic-link + password auth.
knowledge-base Internal handbook — markdown articles in Git behind sign-in, turned into a private sidebar-navigated site by one contentDir page.
automation-recipes Automation cookbook — a webhook capturing leads, a record trigger notifying and logging, a daily-digest cron, and a failure trigger alerting the operator.
company-os A whole information system in one config — CRM, project delivery, support tickets, and an HR directory, wired together with cross-domain automations and an AI assistant.

Every template checks in its own Claude Code bundle — a CLAUDE.md written for that template's domain, plus a starter app-editor subagent at .claude/agents/app-editor.md. Scaffolding is a plain tree copy, so the bundle arrives with the config; there is no second install step. See the CLI Reference for all init flags.

Scaffolding a project

sovrium init copies a template into a new (or current) directory. With no --template, the minimal hello-world starter is used.

>_ terminal
# Default (hello-world, no paired agent)
sovrium init my-app

# Choose a template — also installs the paired editor agent
sovrium init my-app --template crm
sovrium init my-app --template landing-page
sovrium init my-app --template helpdesk
sovrium init my-app --template company-os

# Skip the paired agent install
sovrium init my-app --template crm --no-agent

Then run the scaffolded app:

>_ terminal
sovrium start app.yaml          # Start the dev server
sovrium validate app.yaml       # Validate without starting

See the CLI Reference for all init flags.

Anatomy of an example

A non-trivial example looks like this (abbreviated crm layout):

code
crm/
├── app.yaml                 # Entry point — references everything via $ref
├── config/
│   ├── auth.yaml            # Singleton: auth strategies, roles
│   ├── theme.yaml           # Singleton: design tokens
│   └── tables/
│       ├── companies.yaml   # One file per table
│       └── contacts.yaml
└── public/                  # Static assets (favicon, images)

The app.yaml entry point pulls each part together with $ref, keeping the top-level file small and each entity in its own file:

app.yaml
name: crm

auth:
  $ref: ./config/auth.yaml

theme:
  $ref: ./config/theme.yaml

tables:
  - $ref: ./config/tables/companies.yaml
  - $ref: ./config/tables/contacts.yaml

pages:
  - $ref: ./config/pages/dashboard.yaml
  - $ref: ./config/pages/sign-in.yaml

$ref resolution happens before validation: any object containing exactly one key — $ref whose value is a relative path — is replaced with the parsed contents of that file. A $ref may itself contain further $refs, so configs nest to any depth. The single-file and multi-file forms are interchangeable; pick whichever keeps the project readable.

Learning path

A practical order for working through the examples:

  1. hello-world — understand the minimal shape of a config and the pages array.
  2. landing-page — add a theme, reusable components, and i18n with $t: translation keys.
  3. blog / docs-site — dynamic routes and markdown content collections.
  4. crm — introduce tables, auth, and data-bound pages (forms + data tables).
  5. api-only / mcp-server — run Sovrium headless: as a REST backend or an LLM-facing MCP server.
  6. helpdesk / expenses — automations, public intake forms, and row-level permissions.
  7. company-os — several domains in one config, wired together with cross-domain automations.

Last updated August 11, 2026

This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.

Built with Sovrium