Skip to main content

Server-Driven UI (SDUI)

The server controls what the client renders. Instead of hardcoding layouts in the frontend, the backend returns a JSON structure describing sections, blocks, and settings. The frontend just renders what it receives.

Concepts

SectionDef (schema)          Template (instance)
┌──────────────────┐ ┌──────────────────┐
│ type: HeroSection │ │ route: /home │
│ settings: │ │ sections: │
│ title (TEXT) │ ──► │ - type: Hero │
│ bgColor (COLOR) │ │ title: "Hi" │
│ blocks: │ │ blocks: │
│ - Button │ │ - Button │
│ label (TEXT) │ │ label: Go │
└──────────────────┘ └──────────────────┘
ConceptWhat
SectionDefReusable component type with configurable settings and block schemas
TemplateA page (bound to app + route) composed of section instances
SectionInstanceAn instance of a SectionDef in a template, with setting overrides
BlockInstanceA child component within a section
SettingDefinitionA configurable property (TEXT, NUMBER, COLOR, IMAGE, SELECT, etc.)
PresetPre-configured template for quick section creation

Settings Merge

At render time, definition defaults are merged with instance overrides:

Definition default:  { title: "Default Title", bgColor: "#FFFFFF" }
Instance override: { title: "Welcome to ELIVAAS" }
─────────────────────────────────────────────────────
Rendered output: { title: "Welcome to ELIVAAS", bgColor: "#FFFFFF" }

Lifecycle

DRAFT → PUBLISHED → ARCHIVED

├─ SCHEDULED (publishAt in future)
└─ Auto-expires (expireAt)

Each publish creates an immutable version snapshot for rollback support.