TLDR Tech / Data
Running SQLite in the browser with sql.js and WASM — a practical guide with Google Drive sync
A client-side architecture uses SQLite compiled to WebAssembly in the browser, with the database persisted as a single binary file on the user's Google Drive. Compared with IndexedDB or proprietary sync layers, this gives true data portability and privacy: the file can be opened in any SQLite tool, while Drive access is limited via the drive.file scope. Local state is written to localStorage after each mutation, Drive sync is debounced by 10 seconds, and conflict handling prefers Drive as the source of truth.
Read the full story