Some notes on Local-First Development
September 8, 2023Local-first shifts reads and writes to client databases synced by engines. A major paradigm shift ahead.
Local-first software keeps application data in a local database on each device, then uses a sync engine to replicate changes between devices and servers. Reads and writes stay fast, apps can work offline, and real-time or multiplayer features become part of the data layer instead of custom network code.
The app reads from and writes to a database on the device. A sync engine moves those changes between local databases and a server, so the interface can respond without waiting for the network and sync after a device reconnects.
A sync engine is the replication layer in a local-first app. It sends local changes to other copies of the data, applies incoming changes, and handles reconnecting or conflicting edits. The exact guarantees vary by system.
These essays trace the architecture from a broad explanation to concrete experiments with CRDTs, ElectricSQL, and data-first app development.
Local-first shifts reads and writes to client databases synced by engines. A major paradigm shift ahead.
Run tRPC server calls over CRDT sync engines like Yjs and ElectricSQL for resilient, real-time RPCs.
Notes from building a Vite/React/ElectricSQL starter with excellent DX and schema-first development.
Building a YouTube summarizer with ElectricSQL, exploring lazy syncing and real-time progress updates.
Podcast transcript discussing sync engines, local-first DX, and why data-first development is the future.