Sync / Replicated state
Replicated state: foldkit-sync + foldkit-durable
When users edit data offline, reload the page before a request settles, or collaborate across multiple devices, plain server fetches lose edits or overwrite each other. You need edits to apply immediately in the UI, persist locally across reloads, and converge to one shared order on the server.
foldkit-sync and foldkit-durable solve this by replaying durable application Messages over an authoritative log:
foldkit-synckeeps pending edits in a browser outbox, applies them immediately through yourupdate, and rebases them whenever the server commits or rejects operations.foldkit-durableruns on the server, committing operations in one global order in SQLite and deduplicating retries by operation ID.
Your Model, Message, and update stay the single state machine—a durable edit is simply a Message from your existing union recorded in the log. Sync works with any server speaking its exchange protocol, and Durable journals any operation stream.