A developer walks through building LocalCents, an educational side-project expense tracker using Automerge CRDTs for local-first sync, built as an Elixir/Phoenix app wrapped in Tauri for macOS, with Rustler bridging to Rust. The post covers conflict resolution via Lamport-clock-style operation IDs, a UI for surfacing sync conflicts to users (a notification bell and Conflicts tab), and handling deletion collisions. It closes with reflections on Automerge's access-control gaps (addressed by Ink & Switch's Keyhive project), Tauri's iOS CocoaPods dependency, using a GenServer architecture, Phoenix Storybook experience, and concerns about AI-assisted coding obscuring true understanding of Rust/Automerge internals.
Table of contents
Local-first SoftwareLocalCents, a local-first expense trackerFinal Thoughts and ObservationsWhat’s Next?Questions this post answers
How does Automerge resolve conflicting edits between offline peers?
Automerge picks a deterministic winner using an operation_id, a pairing of a counter and actor id that functions as a Lamport clock. When two peers make conflicting edits offline, this ordering mechanism decides which edit wins once the peers reconnect and exchange changes, with deletions always taking precedence over edits. Developers evaluating CRDT libraries can track how sync conflict resolution evolves by following local-first tooling on daily.dev.
What are the downsides of using Tauri for cross-platform desktop apps with iOS support?
Tauri's iOS support still relies on CocoaPods, a dependency manager that has itself been marked deprecated, making it a notable red flag for teams wanting long-term iOS support. Native-feeling features like system-level context menus require using Tauri's specific tooling rather than generic web APIs, and CSS-based workarounds are used instead in simpler projects. Teams weighing Tauri against other cross-platform frameworks can follow ecosystem changes like this on daily.dev before committing.
What is Keyhive and why does it matter for Automerge-based apps?
Keyhive is a project from Ink & Switch aimed at adding access control capabilities to distributed CRDT tools like Automerge, an area that is otherwise hard to build into a peer-to-peer syncing system. It is considered still fairly bleeding-edge, addressing a real gap for anyone building multi-user local-first applications that need permissions. Anyone building permissioned local-first apps can track projects like Keyhive maturing on daily.dev.