Schema Overview

The complete reference for the Sovrium app schema. A declarative configuration object with 10 root properties.

Schema Structure

A Sovrium app is a declarative configuration object with 10 root properties. Only name is required. Everything else is optional, enabling progressive complexity from a minimal app identifier to a full-stack application.

YAML
name: my-app                  # App identifier (required)
version: 1.0.0               # SemVer version
description: My application   # One-line description
tables: [...]                 # Data models with 41 field types
theme: {...}                  # Design tokens (colors, fonts, etc.)
pages: [...]                  # Server-rendered pages (64 component types)
auth: {...}                   # Authentication & authorization
languages: {...}              # Multi-language support ($t: syntax)
components: [...]             # Reusable UI templates ($ref, $variable)
analytics: {...}              # Privacy-friendly, cookie-free analytics

Progressive complexity

Only name is required. Add tables, theme, pages, auth, and other sections as your app grows.

Root Properties

The app schema has 10 root properties. Only name is required.

namestringrequired

App identifier following npm naming conventions. Lowercase, max 214 chars, supports scoped format (@scope/name).

versionstring

Semantic Versioning 2.0.0 string (e.g., 1.0.0, 2.0.0-beta.1). Supports pre-release and build metadata.

descriptionstring

Single-line app description. No line breaks allowed. Unicode and emojis supported.

tablesarray

Data models with 41 field types, relationships, indexes, permissions, and views.

themeobject

Design tokens: colors, fonts, spacing, shadows, animations, breakpoints, and border radius.

pagesarray

Server-rendered pages with 64 component types, SEO metadata, and i18n support.

authobject

Authentication strategies (email/password, magic link, OAuth), roles, and two-factor authentication.

languagesobject

Multi-language support with $t: translation syntax, browser detection, and language persistence.

componentsarray

Reusable UI templates with $ref referencing and $variable substitution.

analyticsobject | boolean

Privacy-friendly, cookie-free, first-party analytics. Set to true for defaults or configure with options.

Property Details

Detailed rules and constraints for the three scalar root properties: name, version, and description.

name

The app name follows npm naming conventions. It must be lowercase, URL-safe, and unique within your deployment.

PropertyDescription
PatternRegex: ^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$. Lowercase letters, digits, hyphens, dots.
Max length214 characters maximum (including @scope/ prefix if scoped).
ScopedSupports npm-style scoped packages: @scope/name (e.g., @acme/dashboard).
YAML
# Valid names
name: my-app
name: task-tracker-v2
name: "@acme/dashboard"

version

Follows Semantic Versioning 2.0.0 (semver.org). Format: MAJOR.MINOR.PATCH with optional pre-release and build metadata.

YAML
version: 1.0.0           # Stable release
version: 2.0.0-beta.1    # Pre-release
version: 1.0.0+build.42  # Build metadata

description

A single-line text describing the application. Displayed in the admin UI and metadata.

PropertyDescription
FormatSingle line only. No line breaks (\n) allowed.
Max length2000 characters maximum.
UnicodeFull Unicode support including emojis and special characters.

Configuration Formats

Sovrium accepts both YAML and JSON configuration files. YAML is recommended for readability; JSON works for programmatic generation.

YAML
# YAML format (recommended)
name: my-app
version: 1.0.0
tables:
  - id: 1
    name: tasks
    fields:
      - { id: 1, name: title, type: single-line-text }
JSON
// JSON format
{
  "name": "my-app",
  "version": "1.0.0",
  "tables": [
    {
      "id": 1,
      "name": "tasks",
      "fields": [
        { "id": 1, "name": "title", "type": "single-line-text" }
      ]
    }
  ]
}

YAML vs JSON

YAML supports comments, is more readable, and requires less syntax. Use JSON when generating configs programmatically or when your tooling prefers it.