super-productivity/docs/sync-and-op-log
2026-07-11 11:25:57 +02:00
..
diagrams fix(sync): preserve incomplete recovery work 2026-07-10 22:11:11 +02:00
contributor-sync-model.md docs(sync): consolidate sync docs + enforce the contributor model 2026-05-15 16:51:50 +02:00
file-based-sync-flowchart.md refactor(sync): remove unused error classes, dialog, and constructor-time logging (phase 1, #8325) (#8510) 2026-06-20 13:36:56 +02:00
operation-log-architecture.md fix(sync): migrate legacy remote failures once 2026-07-10 22:35:30 +02:00
operation-rules.md fix(sync): migrate legacy remote failures once 2026-07-10 22:35:30 +02:00
package-boundaries.md refactor(sync-core): drop shared-schema vector-clock compat re-export anda app enum (#8441) 2026-06-17 16:21:26 +02:00
README.md docs(sync): consolidate sync docs + enforce the contributor model 2026-05-15 16:51:50 +02:00
sqlite-migration-followup.md fix(op-log): serialize SQLite adapter transactions on the shared connection (#8849) 2026-07-07 18:00:25 +02:00
sqlite-migration.md feat(op-log): validate SQLite backend + IDB→SQLite migration + backend-aware init (#7931) (#7954) 2026-06-02 17:26:23 +02:00
supersync-encryption-architecture.md docs(sync): add encryption architecture and scenario documentation 2026-03-01 21:27:08 +01:00
supersync-scenarios-flowchart.md fix(sync): handle initial provider setup safely 2026-07-11 11:25:57 +02:00
supersync-scenarios.md fix(sync): handle initial provider setup safely 2026-07-11 11:25:57 +02:00
vector-clocks.md refactor(sync-core): drop shared-schema vector-clock compat re-export anda app enum (#8441) 2026-06-17 16:21:26 +02:00

Operation Log & Sync Documentation

The Operation Log is the single sync system for all providers (SuperSync, WebDAV, Dropbox, LocalFile). It is an event-sourced persistence + sync layer: the log is the source of truth, current state is derived by replaying it, and vector clocks detect concurrent edits.

                         User Action
                              │
                              ▼
                         NgRx Store  (runtime source of truth)
                              │
          ┌───────────────────┼───────────────────┐
          ▼                   │                   ▼
    OpLogEffects              │             Other Effects
          │                   │
          ├──► SUP_OPS ◄───────┘   (local persistence — IndexedDB)
          │
          └──► Sync Providers
               ├── SuperSync   (operation-based, real-time)
               └── WebDAV / Dropbox / LocalFile  (file-based, single sync-data.json)

Start here

You want to… Read
Write an effect/reducer/bulk-dispatch correctly contributor-sync-model.md — the one invariant, enforced by lint
Understand the whole architecture + why it's built this way operation-log-architecture.md — Parts AF + rejected alternatives
See it visually diagrams/ — 8 topic diagrams

Reference docs

Document Scope
operation-log-architecture.md Authoritative architecture: Local Persistence (A), File-Based Sync (B), Server Sync (C), Validation & Repair (D), Smart Archive (E), Atomic State Consistency (F), and Why this architecture: rejected alternatives
contributor-sync-model.md The single sync invariant for contributors (one intent = one op; replayed/remote ops must not re-trigger effects)
operation-rules.md Design rules and guidelines for operations
package-boundaries.md Dependency/ownership boundaries for @sp/sync-core, @sp/sync-providers, app wiring
vector-clocks.md Vector clock implementation, pruning, history
supersync-encryption-architecture.md End-to-end encryption (AES-256-GCM + Argon2id)
diagrams/ Mermaid diagrams split by topic

Scenario catalogs (expected behavior)

Document Scope
supersync-scenarios.md Concrete SuperSync scenarios AG with expected behavior
supersync-scenarios-flowchart.md Visual decision tree for the SuperSync scenarios
file-based-sync-flowchart.md Visual decision tree for file-based providers
Location Content
packages/super-sync-server/ SuperSync server implementation
ARCHITECTURE-DECISIONS.md Load-bearing product/data decisions

Historical design notes and superseded plans are not kept as docs; they live in git history (reference the relevant commit if you need the rationale).