# selfstore vs Automerge Source: https://selfstore.dev/compare/automerge Automerge is a document CRDT with history and time travel; selfstore is the persistence loop around a document. Complementary, the same way Yjs is. ## What Automerge is A JSON-document CRDT with a compact binary format, a Rust core compiled to WASM, and something Yjs does not emphasise: **history**. An Automerge document keeps its changes, so you can ask what a document looked like before, and attribute who changed what. `automerge-repo` adds the networking and storage adapters around it. If your requirement is "never lose a concurrent edit, and let me travel back", this is the tool, and selfstore does not attempt either. ## What selfstore is The loop around whatever your data is: an IndexedDB working copy, portable encrypted ZIP backups on an [open spec](https://selfstore.dev/docs/format), durable homes on storage the user already owns, no server. Its own merge is last-write-wins with no history at all - an overwrite is final locally, which is stated plainly in the [limits](https://selfstore.dev/docs/sync). ## They compose An Automerge document saved with `Automerge.save()` is bytes, and bytes are what a selfstore file holds. Store each change (or each saved document) under the id of its own content and selfstore's union-by-id merge carries every device's copy through to the other side, where Automerge folds them back into one document. The reasoning is identical to the [Yjs page](https://selfstore.dev/compare/yjs), which carries the worked example. | | Automerge | selfstore | | --- | --- | --- | | Solves | Concurrent edits + history | Durability, portability, destinations | | History / time travel | Yes | No, keep dated backups instead | | Local persistence | An adapter you add | Built in | | Encryption | Yours to build | Built in, AES-256-GCM + Argon2id | | User-holdable backup | The document itself | A spec'd ZIP of the whole app | | Size on the wire | Compact binary | Whole-state, no delta sync | ## Use Automerge alone when - History and attribution are requirements, not nice-to-haves. - The document IS the application, and a `.automerge` file is the artefact your users care about. ## Use both when - You want the merge quality of a CRDT and the things around it selfstore already solved: encryption at rest and in flight, a destination the user picks, a backup that opens in any archive tool, and screens to connect one. Map of this site for a model: https://selfstore.dev/llms.txt Every page in one file: https://selfstore.dev/llms-full.txt