Watcher code should run in the browser since it's written in TypeScript/JS. However, the watcher databases are currently hosted in PostgreSQL servers. In order to host the entire watcher stack in the browser, some way to host the databases in-browser is required.
This is not trivial because browsers don't natively support sql databases but there appear to be some plausible options:
Watcher code should run in the browser since it's written in TypeScript/JS. However, the watcher databases are currently hosted in PostgreSQL servers. In order to host the entire watcher stack in the browser, some way to host the databases in-browser is required.
This is not trivial because browsers don't natively support sql databases but there appear to be some plausible options:
https://github.com/sql-js/sql.js/ is a wasm compilation of SQLite. As-is it does not have persistence (data is loaded into memory and vanishes on browser tab close / power off). But, this project is an implementation of a virtual filesystem for sql.js using IndexedDB: https://github.com/kikko-land/better-absurd-sql
This note details the current browser storage limits for IndexedDB: https://stackoverflow.com/a/63019999