Sync between PouchDB and CouchDB was a rather complicated code path, and certain cases were getting missed.
Recipes deleted in one place could remain in another. Deletes were not always reflected.
Occasionally, Pouch would refuse to sync with recipes DB, even if DB was accessible.
This PR removes the PouchDB layer and communicates with the recipes DB directly.
Rational
Simplifies the code path, simplifies reasoning.
The recipe data coming from CouchDB is small and latency is typically very low.
The UI is served from the Pi, which also hosts the DB. Having Pouch offline-accessible doesn't make much of a difference for recipes, since to see the UI and access a recipe in the DB, you have to have access to the Pi anyway.
This also happens to remove one of the two places we were using PouchDB. If we can eliminate Pouch, we can remove a large chunk of bulk from our compiled code.
Motivation
Sync between PouchDB and CouchDB was a rather complicated code path, and certain cases were getting missed.
This PR removes the PouchDB layer and communicates with the recipes DB directly.
Rational
This also happens to remove one of the two places we were using PouchDB. If we can eliminate Pouch, we can remove a large chunk of bulk from our compiled code.