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.
# 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-agentThen run the scaffolded app:
sovrium start app.yaml # Start the dev server
sovrium validate app.yaml # Validate without startingSee the CLI Reference for all init flags.
Anatomy of an example
A non-trivial example looks like this (abbreviated crm layout):
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:
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.
When to split. Keep a config in one file while it is small (like hello-world). Split with $ref once a section grows large enough to deserve its own file — typically once you have more than one table, page, or a substantial theme. The full mechanics live in Configuration Files → Multi-file configs.
Learning path
A practical order for working through the examples:
- hello-world — understand the minimal shape of a config and the
pagesarray. - landing-page — add a theme, reusable components, and i18n with
$t:translation keys. - blog / docs-site — dynamic routes and markdown content collections.
- crm — introduce tables, auth, and data-bound pages (forms + data tables).
- api-only / mcp-server — run Sovrium headless: as a REST backend or an LLM-facing MCP server.
- helpdesk / expenses — automations, public intake forms, and row-level permissions.
- company-os — several domains in one config, wired together with cross-domain automations.
Related Pages
- Quick Start — zero to running app, in YAML or in TypeScript with
defineConfig. - Configuration Files — YAML, JSON, TypeScript, and
$refmulti-file composition. - CLI Reference —
sovrium initand the full command surface. - MCP Integration — the headless MCP-server template explained.
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.