cardinal

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 folderHoldsLanguage
native/Pure compute crates, the NIF library, the WASM module and the template sandboxRust 1.99
platform/The umbrella: cardinal_core, cardinal_web, cardinal_jobs, cardinal_cliElixir 1.20, OTP 29
frontend/desk, sdk, ui, web, wasm packagesTypeScript, Vue 3, Bun
apps/core/The core app: RecTypes, controllers, RPC functions, website pagesElixir, YAML
apps/gate/The test app the gates and browser suites run onElixir, YAML
deploy/Compose files, the Dockerfile and Caddy configs
scripts/Checks, gates, e2e, load, releaseShell
bin/cardinalThe dev CLI wrapperShell
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 checks