🧠 Second Brain

Search

Search IconIcon to open search

Local First

Last updated Jan 17, 2025

An outstanding essay is on local first and how to resolve the best of Markdown with a local plain text file with a method called CRDT. As the article mentions, Towards a better future. As other technologies like Google Docs, Notion, etc. always lack something, CRDTs seem to solve all 7 points and satisfy the local-first ideas.

1. Fast 2. Multi-device 3. Offline 4. Collaboration 5. Longevity 6. Privacy 7. User control
Files + email attachments βœ“ β€” βœ“ βœ— βœ“ β€” βœ“
Google Docs β€” βœ“ β€” βœ“ β€” βœ— β€”
Trello β€” βœ“ β€” βœ“ β€” βœ— βœ—
Pinterest βœ— βœ“ βœ— βœ“ βœ— βœ— βœ—
Dropbox βœ“ β€” β€” βœ— βœ“ β€” βœ“
Git+GitHub βœ“ β€” βœ“ β€” βœ“ β€” βœ“
Web apps βœ— βœ“ βœ— βœ“ βœ— βœ— βœ—
Thick client βœ“ β€” βœ“ βœ— β€” βœ— βœ—
Firebase, CloudKit, Realm β€” βœ“ βœ“ β€” βœ— βœ— βœ—
CouchDB β€” β€” βœ“ βœ— β€” β€” β€”
CRDTs βœ“ βœ“ βœ“ βœ“ βœ“ βœ“ βœ“

^22f5c1

Source of above table from above essay

We have found some technologies that appear to be promising foundations for local-first ideals. Most notable are the family of distributed systems algorithms calledΒ  Conflict-free Replicated Data TypesΒ (CRDTs).

It seems that CRDTs are a solution to collaborative local first. Especially interesting with Markdown and Plaintext Files.

Ink & Switch has developed an open-source, JavaScript CRDT implementation calledΒ  Automerge. It is based on our earlier research onΒ  JSON CRDTs. We have then combined Auto merge with theΒ  Dat networking stackΒ to formΒ  Hypermerge. We do not claim that these libraries fully realize local-first ideals β€” more work is still required.

However, based on our experience with them, we believe that CRDTs have the potential to be a foundation for a new generation of software. Just as packet switching was an enabling technology for the Internet and the web, or as capacitive touchscreens were an enabling technology for smartphones, so we think CRDTs may be the foundation for collaborative software that gives users full ownership of their data.

In these experiments we tried network communication viaΒ  WebRTC; aΒ  β€œsneakernet” implementation of copying files around with Dropbox and USB keys; possible use of theΒ  IPFS protocols; and eventually settled on theΒ  HypercoreΒ peer-to-peer libraries fromΒ  Dat

# Further Reading


Origin: Plaintext Files, Local-first software: You own your data, in spite of the cloud
References:
Created 2025-01-17