How it is built
The repository's parts and how a request moves through them.
Cardinal has three layers. Rust crates compute. An Elixir umbrella does all IO. A Vue desk renders what the server describes. Postgres and an S3 bucket hold all state. The rules behind this split are in Architecture.
| Repo folder | Holds | Language |
|---|---|---|
native/ | Pure compute crates, the NIF library, the WASM module and the template sandbox | Rust 1.99 |
platform/ | The umbrella: cardinal_core, cardinal_web, cardinal_jobs, cardinal_cli | Elixir 1.20, OTP 29 |
frontend/ | desk, sdk, ui, web, wasm packages | TypeScript, Vue 3, Bun |
apps/core/ | The core app: RecTypes, controllers, RPC functions, website pages | Elixir, YAML |
apps/gate/ | The test app the gates and browser suites run on | Elixir, YAML |
deploy/ | Compose files, the Dockerfile and Caddy configs | |
scripts/ | Checks, gates, e2e, load, release | Shell |
bin/cardinal | The dev CLI wrapper | Shell |
browser ──HTTP──▶ cardinal_web ──▶ TxnService ──▶ Cardinal.DB ──NIF──▶ Rust crates
│ │ │
│ │ └──▶ Postgres (one schema per site)
│ └──realtime◀── LISTEN cardinal_realtime
└──WASM──▶ the same Rust crates, for formats, expressions and checksRequest path
From the Host header to the commit.
Elixir umbrella
The four umbrella apps and what each owns.
Background jobs
Oban queues, the scheduler and core's sweeps.
NIF and WASM
One set of crates for the server and the browser.
Values and expressions
cardinal_format and cardinal_expr.Metadata and schema
cardinal_meta, cardinal_schema and cardinal_naming.Queries and permissions
cardinal_query and cardinal_perm.Templates and sheets
cardinal_template, cardinal_sandbox and cardinal_sheet.Automation graphs
cardinal_flow.Frontend packages
The desk, sdk, ui, web and wasm packages.
The gate app
The test app behind the gates and e2e suites.