ARCHITECTURE & V1
explanation
8 min read

Architecture, Security & V1 Scope

OpenDash CMS is engineered around a strict single-executable deployment model: predictable security boundaries inside Rust, zero runtime dependency on external databases or Node.js servers, and clean separation between the binary and site data directories.

Single-binary & 3-crate topology

The Rust workspace compiles three coordinated crates alongside the Vite-built React Admin UI (embedded directly inside the binary via rust-embed):

  • opendash-core (Pure Domain Layer): Depends only on serde, serde_json, and url. Performs zero filesystem I/O, network calls, SQL, or async scheduling, keeping schema validation, Recursive Block AST rules, and API scope evaluation deterministic.
  • opendash-server (Runtime Binary): Houses Axum HTTP routes, session/RBAC/Bearer guards, the MiniJinja C-SEC renderer, SQLite storage access, encrypted backup/restore services, Media WebP pipelines, Built-in MCP, and the plugin worker supervisor.
  • opendash-plugin-sdk (Guest SDK): Zero-dependency Rust crate (edition = 2024) targeting opendash_v1 for compiled WebAssembly plugins alongside JS (Boa) and AssemblyScript plugins.

All mutable website state lives outside source code under SitePaths (database/, themes/, plugins/, uploads/, backups/, config/, and runtime/), so themes or plugins can be switched off without deleting entries or custom fields.

Template security boundary (C-SEC)

Public pages and Studio previews execute inside a hardened MiniJinja subset named C-SEC in template_sec:

  • Mandatory HTML auto-escaping enabled by default; raw |safe bypasses and arbitrary filesystem {% include %} / {% extends %} tags are rejected by static checks.
  • Enforced runtime ceilings: 10,000 evaluation fuel units, 16 max recursion depth, and 512 KiB rendered document budget.
  • Legacy/untrusted render paths block inline <script>, <svg>, and on* event attributes; vetted Theme Format V1 root templates and declarative custom blocks permit static inline SVG and scripts without dynamic template interpolation.

Plugin worker isolation & resource caps

Plugins execute out-of-process inside an isolated --plugin-worker child runtime so faulty guest code cannot crash or starve the CMS HTTP server:

SubsystemEngine / MechanismEnforced V1 Budgets
JavaScript RuntimeBoa (=0.22.0)5,000,000 loop iterations, 128 recursion limit, 512 stack depth
WebAssembly RuntimeWasmi (=2.0.0)20,000,000 invocation fuel, 16 MiB linear memory
Worker Process--plugin-worker IPC128 MiB OS memory cap, 5s invocation timeout, 2 MiB IPC frame
Host KV & LogsStaged transactional ops100 host calls (64 in render), 64 staged KV ops (2 MiB total), 256 B keys, 512 KiB values
Outbound HTTP EgressDNS-pinned SSRF guardMax 10 calls/invocation (2 in render), 2s timeout, 1 MiB response body

Data durability, CAS & Safe Mode

  • SQLite Serialization: WAL mode plus BEGIN IMMEDIATE write transactions and same-volume staging directories guarantee atomic directory/file swaps on POSIX and Windows.
  • Save vs Publish Boundary: post, page, and draft_publish CPTs separate private drafts from public URLs; Studio Mode 1 overrides and immediate CPTs commit live on save. Classic and API edits enforce optimistic CAS (version / If-Match), while client draft recovery preserves unsaved work across 401 or 412 errors.
  • Safe Mode Recovery: When READY.json exists without an explicit clearing flag in config/site.json, OpenDash starts in recovery Safe Mode and rejects API Bearer writes with 503 Service Unavailable until an administrator clears Safe Mode interactively.

Explicit V1 scope boundaries

To keep the single binary fast, portable, and auditable, OpenDash V1 explicitly leaves the following features outside V1 scope:

AreaExcluded in V1
Commerce & AI UIBuilt-in e-commerce carts, payments, and orders; AI page generation directly from raster screenshots.
Workflows & SyncMulti-step editorial approval workflows beyond draft/published; revisions/autosave for Studio Mode 1 Template Overrides.
Content ModelingPolymorphic flexible_content fields (use Studio block patterns instead); nested repeaters deeper than 1 level; automatic sync of non-translatable fields across locales.
Builder & QueriesAuto-propagating synced custom blocks outside CPT core/pattern_ref; multi-facet visitor filtering UI on archives.
Plugins & OperationsArbitrary custom JS/HTML Admin bundles (use Admin UI Schema + Dashboard Widgets + public /p/{pkg}/* routes); built-in scheduled backup cron or system scheduler UI; multi-domain/subdomain locale routing.

You have reached the end of Wave 1 across all six OpenDash CMS documentation pillars. Jump back to Docs Home or select any section from the left sidebar.

Edit Source URL:

Search OpenDash

Use Arrow keys & Enter to navigate Full search page →