| Household | The sharing boundary: one CouchDB database used by equal-rights devices |
| Ingredient | Item used in recipes or on the shopping list; food or household product, assigned to a category |
| Category | Grouping of ingredients (shopping aisle); food: false hides its ingredients from recipes |
| Local-first | Data lives on the device first; sync is optional |
| PouchDB | JavaScript database on IndexedDB with CouchDB-compatible replication |
| Sync mode | Self-hosted or cloud; selected by the deployment, never by the user (Section 4.4) |
| Self-hosted mode | Mode in force when no gateway is announced: user name and password against the database forked on a CouchDB the user runs or reaches |
| Cloud mode | Mode in force when a gateway is announced (forked cloud): account-based, devices enrolled by approval or invite, short-lived sync tokens |
| Announcement | The answer of GET /forked-config.json (gatewayUrl, couchdbUrl), cached in localStorage; decides the mode and the CouchDB address |
| Gateway | Operator-run service for device approval, invites, sync tokens and accounts, together with its website. Not in this repository; contract in Section 7.3 |
| Self-Hosted Login | The user name and password a device stores in self-hosted mode (SelfHostedLogin) |
| Gateway Enrollment | The local record of a cloud device (GatewayEnrollment): pinned database and the revoked-session and household-mismatch flags; presence means enrolled |
| Sync User | The CouchDB user forked of the self-hosting stack, shared by all devices, member of the database forked |
| Sync Token | Short-lived (15 minutes) CouchDB JWT a cloud device obtains with its session and holds in memory only |
| Device Session | Cookie-backed session of an enrolled device at the gateway (cloud mode) |
| Device Approval | Cloud flow that connects a new device to an account: the PWA shows a code and opens the website, the signed-in user approves, the PWA polls (Section 6.4.1) |
| Invite | Short-lived, single-use link, QR payload and pairing code that enroll another device into an account (cloud mode) |
| Pairing Code | 10-symbol Crockford Base32 code (XXXXX-XXXXX) that redeems an invite on a device that cannot open the link inside the installed app |
| Auth Failed | Self-hosted state after CouchDB answered 401 or 403: sync stops and the header shows “Sign-in needed” |
| Revoked Session | Cloud state after the token endpoint answered 401: sync stops, local data stays |
| Conflict leaf | A losing revision that CouchDB keeps next to the winning one |
| forked backup | Versioned, lossless JSON export of all persisted documents (ADR-032) |