Architecture

How Ordo is built

Studio is the visual workspace, Platform is the control plane, ordo-server is the execution engine. The three tiers sync rules over NATS JetStream; PostgreSQL persists all control-plane state.

System layer overview

Actual deployment topology from compose.yml

UI
Studio
:3002 · Vue 3 · @xyflow
Flow EditorDecision TableTraceTemplates
Vite /api proxy
CP
ordo-platform
:3001 · Rust · Axum · SQLx
Org/RBACReleasesServer RegistryTemplates
BG
platform-worker
internal · Rust · Tokio
Release TasksRule SyncNotifications
PG
PostgreSQL
:5432 · ordo_platform DB
OrgsReleasesApprovalsSnapshots
MQ
NATS JetStream
:4222 · ordo.rules.*
RegistrationHeartbeatRule SyncEvents
/engine proxy · NATS rule sync
JIT
ordo-server
:8080 · Rust · Cranelift JIT · Axum + tonic
HTTPgRPCWASMCLI50-80ns JIT54k QPS

Component breakdown

ST
Studio
:3002
Vue 3 · @xyflow/react · Vite

Visual rule workspace. Drag-and-drop flow editor, decision table editor, template instantiation, execution trace, and testing. All API requests are proxied through Vite to ordo-platform.

Flow editor (xyflow)Decision table editorExecution trace debuggerTemplate marketplaceVersion history
OR
ordo-platform
:3001
Rust · Axum · SQLx · NATS

The control plane. Manages organizations, projects, members, RBAC, templates, Fact Catalog, contracts, release requests, and the server registry. Subscribes to NATS to track server heartbeats in real time.

Org / Project / RBACFact Catalog & ContractsRelease CenterServer RegistryGitHub OAuth
PL
platform-worker
internal
Rust · Tokio · NATS

Background async worker. Handles release execution tasks, rule sync scheduling, and notification dispatch. Shares the database with the main process but runs independently.

Release task executionRule sync schedulingInstance state pollingNotification dispatch
OR
ordo-server
:8080
Rust · Axum · Cranelift JIT · gRPC

The rule execution engine. Supports HTTP / gRPC / WASM / CLI. JIT compilation via Cranelift: 50–80 ns latency; interpreter: 1.63 µs; 54k QPS single-thread HTTP. Auto-registers with Platform on startup and sends continuous heartbeats over NATS.

Cranelift JIT compilerHTTP + gRPC + WASMMulti-tenancyWAL crash recoveryNATS hot-reload
NA
NATS JetStream
:4222
NATS 2.10 · JetStream

Control-plane message bus. Carries server registration (ordo.rules.*), heartbeats, and rule sync events. Both Platform and ordo-server subscribe, enabling decoupled node discovery and rule push.

Node registration & heartbeatRule content syncControl event broadcastJetStream persistence
PO
PostgreSQL
:5432
PostgreSQL 16 · SQLx migrations

The sole persistent store for the control plane (ordo_platform database). Stores organizations, projects, roles, Facts, contracts, release requests, approvals, server metadata, and rule snapshots.

Org / Project / RolesReleases & approvalsServer metadataRule version snapshotsAuto-migrate (sqlx)
Flow

Request execution path

The full request chain from Studio through Platform to ordo-server

flowchart LR classDef studio fill:#fdf3ea,stroke:#D4874D,color:#2D2A26 classDef platform fill:#f5f0eb,stroke:#7C6B5A,color:#2D2A26 classDef engine fill:#ecf5f1,stroke:#4A9E6B,color:#2D2A26 classDef infra fill:#f0ebe3,stroke:#9C9590,color:#2D2A26 Studio["Studio :3002\n(Vue 3 + xyflow)"]:::studio Platform["ordo-platform :3001\n(Rust · Axum)"]:::platform Worker["platform-worker\n(Rust · Tokio)"]:::platform Server["ordo-server :8080\n(Rust · Cranelift JIT)"]:::engine NATS[("NATS JetStream\n:4222")]:::infra PG[("PostgreSQL\nordo_platform")]:::infra Client(["Client\nHTTP / gRPC / WASM"]):::infra Studio -->|"Vite /api proxy"| Platform Platform -->|"/engine proxy"| Server Server -->|"register + heartbeat"| Platform Platform <-->|"ordo.rules.*\nrule sync / events"| NATS Server <-->|"subscribe rule updates"| NATS Platform --> PG Worker --> PG Worker <-->|"consume tasks"| NATS Client -->|"execute rules"| Server
Release

Release & approval path

Publishing is not a single button — it is a governed workflow

sequenceDiagram actor U as User (Studio) participant P as ordo-platform participant W as platform-worker participant N as NATS JetStream participant S as ordo-server U->>P: Create release request (POST /releases) P->>P: Validate version + create approval flow P-->>U: Status: pending approval U->>P: Approve (PATCH /releases/:id/approve) P->>W: Enqueue execution task W->>N: Publish rule sync event (ordo.rules.sync) N->>S: Push rule update S->>S: Hot-reload new rule version S->>P: Report instance state + heartbeat P-->>U: Release complete

Own your decision logic.

Stop scattering business rules across codebases and spreadsheets. Ordo gives your team one place to author, test, and govern them. Open source on GitHub.