← Back to context

Comment by davepeck

9 days ago

In theory, I love the local-first mode of building. It aligns well with “small tech” philosophy where privacy and data ownership are fundamental.

In practice, it’s hard! You’re effectively responsible for building a sync engine, handling conflict resolution, managing schema migration, etc.

This said, tools for local-first software development seem to have improved in the past couple years. I keep my eye on jazz.tools, electric-sql, and Rocicorp’s Zero. Are there others?

CouchDB on the server and PouchDB on the client was an attempt at making such an environment:

- https://couchdb.apache.org/

- https://pouchdb.com/

Also some more pondering on local-first application development from a "few" (~10) years back can be found here: https://unhosted.org/

  • Using Couch/Pouch on our current app for this reason. Great to work with. Though we’re not supporting offline-first right away (depends on external services), it’s going to help with resilience and a future escape valve.

  • Lotus Notes always deserves a mention in these threads too, as 1989's answer to local-first development. CouchDB was heavily inspired by Notes.

I've been using instantdb in anger for the past month or so for a side project of mine. I'm building a personal budget app.

I should probably write a blog post, but I will say that I investigated power sync, electricSQL, livestore and powersync before. I briefly looked at jazz tools but wanted something a bit more structured.

I'm pretty impressed this far. I've actually been writing it with Vue and a community library. Permissions were a bit tricky, but once I figured it out it was simple. And I like their magic email login. And I like their dashboard/reply, but there are a few big changes I would make there to make it less fiddly.

I love that it's open source, and that if I want to, I could self host it.

As for the other options:

- jazz wasn't structured enough

- livestore came off as too fiddly with the event store, but it was appealing. That the dev tools are payealled was disappointing, but understandable

- electriSQL really only provided half a solution (read, not the write model

- couchDB / pouchDB wasn't structured enough for me, and I wanted better cross document support than was obvious / baked in.

- did not investigate zero really

  • +1 for instant! Been using it and I find it a breeze to work with, definitely filling the exact niche this article was discussing. sync engines are the future!

  • [Instant founder]

    Brightened reading this. If you have any feedback please let us know! We on the discord, and answer over on founders@instantdb

You might also want to check out Ditto:

https://www.ditto.com

It’s a local-first platform that supports real-time sync with CRDTs at its core, making conflict resolution much easier to manage. Ditto is designed to handle offline-first use cases and peer-to-peer sync out of the box, so you don’t have to build a custom sync engine from scratch.

It supports a wide range of platforms including Swift, Kotlin (Android), Flutter/Dart, React Native, JavaScript (Web/Node), .NET (C#), C++, Java, and Rust. You can dive deeper into what it offers from the docs site: https://docs.ditto.live/home/about-ditto

Along with the others mentioned, it's worth highlighting Yjs. It's an incredible CRDT toolkit that enables many of the realtime and async collaborative editing experience you want from local-first software.

https://yjs.dev/

  • I’ve built several apps on yjs and highly recommend it. My only complaint is that storing user data as a CRDT isn’t great for being able to inspect or query the user data server-side (or outside the application). You have to load all the user’s data into memory via the yjs library before you can work with any part of it. There are major benefits to CRDTs but I don’t think this trade-off is worth it for all projects.

I use local software and sync files using git or sometimes fossil (both work fine in Android with termux for instance, for stuff In want to access on my phone). I don't host servers or use any special software that requires syncing data in special ways.