I was exploring an interesting local-first component earlier today: cr-sqlite, which adds CRDTs to SQLite so you can have multiple databases that receive writes and then sync up and merge their changes later on.
My notes here: https://til.simonwillison.net/sqlite/cr-sqlite-macos