Skip to main content

Current State

These pages describe Wrkbelt's architecture as it ships in v0.6.0. Each claim cites a path:line code anchor — you can jump from doc to code to confirm.

For the high-level tour (tenant types, subsystem map, where to start), see Architecture Overview. This page is the how to read this section companion — once you've taken the tour and are ready to go deep, the reading order below is the recommended path.

Reading order​

The seven subsystem pages are written to layer on each other. Working through them in order avoids forward references:

  1. Multi-tenant hierarchy — the foundation. Every other subsystem assumes the org model and dual-check authorization described here.
  2. Catalog and enablement — how products and integrations become available to a Brand.
  3. Multi-instance runtime — where the API runs and the primitives that keep it correct across replicas.
  4. Cluster coordination pattern — the decision guide for picking the right primitive when adding cross-replica coordination.
  5. Booking session pipeline — the high-traffic data path from scheduler widget to MongoDB; the concrete example using the primitives above.
  6. Data model and migrations — the entity layout and how schema changes ship safely.
  7. Audit and observability — SOC 2 audit, structured logs, CloudWatch alarms, Sentry.

What "current state" means​

A page lives in current-state/ only if its claims are true of the code on main today. Anything aspirational — work-in-progress proposals, deferred improvements, target architectures — lives in ../future-state/ instead.

If a future change to the system invalidates a claim on one of these pages, the doc update ships with the code change.

Where to find contract-level detail​

This section is the narrative. The contract lives in OpenSpec at openspec/specs/. Each subsystem page links to the relevant spec folders. When a doc and a spec disagree, the spec wins — it's the binding record.

Conventions used here​

  • Code references use inline backticks: path/to/file.ts for a file, path/to/file.ts:42 for a specific line.
  • OpenSpec references use inline backticks against repo-relative paths: `openspec/specs/<folder>/spec.md`.
  • Diagrams use Mermaid. Subsystem-level sequence diagrams use sequenceDiagram; topology and decision-tree diagrams use flowchart.