Skip to content

Architecture

The patterns the architect template is showcasing.

1 min read

architect’s architecture is opinionated: contracts are the source of truth, implementations are pluggable, and the monorepo layout makes the distinction visible at a glance.

Pages in this section#

  • The architect pattern — what #[derive(architect::Entity)] emits and how to write an entity.
  • Multi-backend features — one contract, multiple implementations behind one facade.
  • Extensibility — in-tree vs third-party implementations; how the contract crate makes both paths interchangeable.
  • Construction: Resource & Scope — build the backend (config → pool → repo) with dependent composition, memoization, and LIFO teardown.
  • Monorepo layout — one crate per feature, with its layers as cargo features; apps under apps/<app>/.
  • The in-process transport — LocalServer: typed clients over a vox memory link; desktop, CLI, and tests with no server.
  • The HTTP face — #[architect::service]: one trait, vox and HTTP+JSON, clients for both; how a host mounts the generated faces next to its plugins.
  • Testing strata — native unit, native integration, browser e2e: which lives where.
  • Server push — PubSub, Entity events, #[subscribe] streams, the client hooks, and the real-time-safety rules for audio-thread producers.
  • Idioms & enforcement — the vox + Dioxus conventions (data flows through vox, never Dioxus server functions) and the CI gates that keep them honest.
  • Spec coverage — per-feature features/<feature>/spec/*.md tracked by tracey.
  • The auth feature — the session RPC surface, AuthServerMiddleware, the client session kit, and the engine underneath.
  • Scheduling & resilience — schedule retry/repeat policies (exponential backoff, jitter, caps) and the platform clock they run on (deterministic TestClock included); how clients tolerate a flaky server.
  • Collaboration — Loro CRDT documents, DocSync over vox, the multi-doc DocRegistry, presence and persistence.
  • Peers: documents between nodes — crdt::peer: pairwise exchange with no hub, and per-document access checked by every node.
  • Devices: who a node lets in — architect-devices: the account’s devices, per-org enrolment, pairing by code or QR, and one admission table every lane checks.
  • Async diagnostics — a design note for moiré instrumentation of the axum_ws adapter (not in the tree today).
  • Commands: the Action List — one registry every key, menu, palette, CLI and MCP model runs an app’s commands through; architect-mcp; per-action timings.
  • Theming — architect-theme: a palette resolved into every token, the cascade from the app’s default to a preview, theme files that hot-reload, THEME_* actions, and how the shell, architect-ui and paint views follow one store.

In this section

Linked from

architect·Published with architect