How It Works
Every Almadar application is composed of Orbital Units. An Entity holds your data, Traits define behavior as state machines, and Pages bind them to routes. Watch the architecture assemble itself.
Orbital Unit = Entity + Traits + Pages
Core Concepts
Three building blocks compose every Almadar application
Entities define your data model. Fields are typed, can have defaults, and support three persistence modes: runtime (in-memory), persistent (database), and singleton.
{
"name": "Task",
"persistence": "runtime",
"fields": [
{ "name": "title", "type": "string" },
{ "name": "done", "type": "boolean", "default": false }
]
}Traits model behavior as state machines with states, events, guards, and effects. Effects can set entity fields, emit events, call services, or render UI patterns.
Pages bind Orbitals to routes. They define the URL, the layout, and which Orbitals (groups of Entity + Traits) are mounted. Pages are generated as React route components.
First Schema in 60 Seconds
Install the CLI, create your first schema, and compile it to a running application.
npx @almadar/cli new my-app{
"name": "HelloWorld",
"orbitals": [{
"name": "Greeter",
"entity": {
"name": "Greeting",
"fields": [
{ "name": "message", "type": "string" },
{ "name": "count", "type": "number", "default": 0 }
]
},
"traits": [{
"name": "Clickable",
"stateMachine": {
"states": [
{ "name": "idle", "isInitial": true },
{ "name": "greeted" }
],
"transitions": [{
"from": "idle",
"event": "CLICK",
"to": "greeted",
"effects": [
["set", "@entity.message", "Hello, World!"],
["set", "@entity.count", ["+", "@entity.count", 1]],
["render-ui", "main", {
"type": "stats-card",
"title": "@entity.message",
"value": "@entity.count"
}]
]
}]
}
}]
}]
}Standard Library Modules
213+ built-in operators across 9 modules — all available as s-expressions in guards and effects
Live Component Preview
render-ui turns an s-expression into a real component — no JSX, no template files. Edit the expression and watch the preview update automatically.
Try It in the Browser
Run Almadar s-expressions live — no installation needed
Tutorial Tracks
Structured paths from zero to production
Build your first Orbital Unit, understand state machines, and deploy a working application.
- Your first Orbital
- Task Manager from Scratch
Work with UI patterns, write guards with s-expressions, and connect multiple Orbitals.
- UI Patterns in Depth
- Guard Expressions
- Cross-Orbital Events
Build production apps with integrations, AI generation, and custom skills.
- Full Production App
- AI Schema Generation