Lessons learned from building a sync-engine and reactivity system with SQLite
antoine.fi·5h·
Discuss: Hacker News
💾SQLite
Preview
Report Post

Over the last couple of months, I’ve been trying to build the dream: A local-first, end-to-end encrypted and reactive app, with all of the user’s data in a local SQL database but continually synced to a remote server. This article summarizes my learning and how I ended up building a minimal sync engine for SQLite with full reactivity.

First Try: PGlite and Electric

My first try was with Electric and a WASM-based version of PostgreSQL called PGlite that can run directly in the browser. I even wrote an article about this setup. In a way, this approach is ideal as you have the same database engine locally as on the server. And because Electric syncs every change granularly, you are certain that the state of your local datab…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help