It’s not every day that a radically new architecture comes along, but here we are: in-browser SQLite, combined with reactive SQL and auto-syncing. The promise is instant interactivity on the front end, while maintaining data symmetry with the back end. As a direct challenger to the RESTful group-think that has dominated web development for a decade, it is well worth a look.
This idea isn’t brand new. Developers have been doing this kind of thing in one fashion or another for years (think of how some apps work offline). But this new-generation stack feels different, and it’s starting to see broader appeal.
It’s called local-first data. I recently covered the idea at a high level. Now it’s time for a look at the nitty gritty.
The concept is simple. Instead of asking a remote server for permission to change a number, your app writes state directly to a local SQLite database running in the browser (via WebAssembly). A sophisticated background engine then handles the hard work of syncing those changes to the cloud and other devices.
For React developers, the best part is that we remain in the reactive paradigm. Even though we are writing raw SQL queries, the shuffling of the data is handled for us. Our UI components subscribe to the database, and when the data changes (whether locally from a user click or an inbound sync update from the cloud), the UI updates instantly.











