jazz-sync-architecture
Jazz Sync Architecture
This is the all-in-one operating manual for end-to-end Jazz design decisions.
Use it when problems span multiple domains or when you need architectural decisions that remain correct across runtime, schema, sync, branch, and worker boundaries.
System Model
- Jazz state is distributed local-first state, not centralized server-row truth.
- CoValues are collaborative CRDT-backed values with eventual consistency.
- Account/root/profile define graph entry points and permission boundaries.
- Server workers are peers with their own accounts, not privileged bypass channels.
Architecture Domains
- Runtime and crypto bootstrap (
load-edge-wasm,startWorker, Node-API/WASM) - Loading and subscription lifecycle (
resolve,$isLoaded,loadingState,ensureLoaded, subscribe/unsubscribe) - Schema, ownership, and sharing boundaries (
co.map/list/record/feed, account/group ownership) - Migration and version policy (account vs CoMap timing, additive evolution, mixed versions)
- Worker communication topology (typed UI-to-worker request/response, HTTP, Inbox)
- Multi-surface worker architecture (server worker, extension worker, UI projection boundaries, branch scope)
Hard Truths You Must Design Around
- Mixed client versions are normal, not exceptional.
- Some readers may lack permission to execute migration writes.
- Many-to-many consistency is application-level; Jazz does not infer inverse links.
- Branching is scope-sensitive: merge only covers values loaded in the active branch subscription scope.
- Branching has caveats:
- branch coverage depends on explicit resolve depth
- values loaded separately (or via separate ensure/subscribe scopes) may fall outside merge scope
- Account/Group branching is not fully isolated
- Text type choice is architectural:
co.richText/collaborative text for concurrent editing semantics- scalar text for replace-whole-field semantics
Worker and Server Topology Rules
- Worker credentials are sensitive: account secret must never ship to client.
- Prefer single worker instance where strict request ordering/invariant checks matter.
- Worker account migrations run at worker start when a worker account schema is supplied.
- Choose communication mode deliberately:
- typed request/response protocol for UI-to-worker operations
- HTTP for simple auth/request flows
- Inbox for offline-first message workflows with always-online worker assumptions
Decision Process
- Classify runtime topology.
- Classify ownership and permission boundaries.
- Define first-paint and incremental loading model.
- Define migration/versioning contract before schema rollout.
- Define worker communication mode, branch scope, and authority boundaries.
- Add verification for reconnect, offline replay, mixed-version behavior, branch merge coverage, and runtime-specific bootstrap.
More from alcyone-labs/agent-skills
chrome-extension-architect
Privacy-first Chrome Manifest Version 3 extension architect - sidePanel design, MV3 service worker lifecycle, least-privilege permission audits, storage strategy, cross-browser sidebar patterns, and headless Playwright testing.
9aquaria-docs
Expert Aquaria documentation architect. Enforce documentation principles, golden rules, templates, folder structure, and quality gates. Creates compliant docs from templates, validates against Golden Rules checklist.
6arg-parser
Type-safe CLI argument parser with MCP integration Zod validation auto-generated tools and interactive prompts
5git-commit-writer
Write consistent high-quality Git commits following project conventions
5skill-forge
Builds precise production-ready custom Agent Skills following AgentSkills.io guidelines. Use when user requests to create, refine or package Skills
4large-file-refactorer
Scans codebase for large files and orchestrates refactoring workflows using a test-first protocol
4