docs: Obsidian-style vault under docs/
Add a navigable Obsidian vault as the project's first-class technical documentation. Notes cross-reference with [[wikilinks]]; docs/index.md is the Map of Content. New notes: index.md MOC, entry point architecture.md what the extension owns vs what lives outside data-model.md entity-by-entity schema reference menu-tree.md the arbitrary-depth tree concept order-flow.md state machine + invoice listener + print nostr-layer.md kinds 0/30402/5/1059, signing, t-tags api-reference.md endpoint catalog by audience cms.md Vue 3 + Quasar 2 UMD conventions, q-tree webapp-integration.md multi-restaurant cart pattern + atomicity glossary.md domain terms Existing notes (kept as-is): adr-0001-menu-tree.md the storage choice rationale design-conversation.md trimmed transcript README.md adds a Documentation section pointing at docs/index.md with the headline note list. Each note links to ~3-5 others; the vault forms a connected graph. A project-level memory rule (saved outside the repo) commits us to keeping these docs in sync as the code evolves: any commit that materially changes schema, API, order flow, Nostr surface, CMS conventions, or webapp integration must update the relevant note(s) in the same commit.
This commit is contained in:
parent
7f7915a041
commit
42a8b08a5b
11 changed files with 1015 additions and 0 deletions
80
docs/glossary.md
Normal file
80
docs/glossary.md
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
# Glossary
|
||||
|
||||
Domain terms used throughout the docs. Linked from many notes.
|
||||
|
||||
**Aggregator** — a webapp / client that pulls menus from multiple
|
||||
restaurants and presents them as a single experience (festival, food
|
||||
court, collective space). Aggregators live outside this extension.
|
||||
|
||||
**Ancestor chain** — the ordered list of node names from the root of
|
||||
the [[menu-tree]] down to (and including) a given node. Slugified
|
||||
versions of these names ride along on every Nostr menu listing as
|
||||
`t` tags so [[nostr-layer|clients can filter]] without parsing
|
||||
markdown.
|
||||
|
||||
**Cascade detach** — the default behavior when deleting a
|
||||
[[menu-tree|menu node]] that has items: the items are
|
||||
**detached** (their `node_id` is set to NULL) rather than
|
||||
hard-deleted. They survive as orphans for the operator to re-home
|
||||
through the [[cms]]. Hard delete is opt-in.
|
||||
|
||||
**CMS** — the operator console. Server-rendered Jinja templates +
|
||||
inline Vue 3 / Quasar 2 UMD. See [[cms]].
|
||||
|
||||
**Customer pubkey** — the Nostr pubkey of an ordering customer.
|
||||
Optional metadata on `orders.customer_pubkey`. Used for sending
|
||||
status updates back via [[nostr-layer|NIP-17 DMs]] (scaffolded).
|
||||
|
||||
**Festival** — common shorthand for a curated multi-restaurant
|
||||
context. Not an entity stored in this extension; see
|
||||
[[webapp-integration]].
|
||||
|
||||
**Internal payment** — an LNbits invoice paid from another wallet
|
||||
on the same instance, never touching the Lightning Network. The
|
||||
extension supports this as `payment_method = "internal"` for testing
|
||||
and same-instance flows.
|
||||
|
||||
**MAX_MENU_DEPTH** — `3` (zero-indexed); 4 levels of nesting total.
|
||||
Soft-enforced by the API via HTTP 400 on creates / moves.
|
||||
|
||||
**msat** — millisatoshi. Money on `orders` and `order_items` is
|
||||
stored as integer msat for precision; UI / Nostr surfaces convert
|
||||
back to sat (or fiat) at display time.
|
||||
|
||||
**Node** — a row in `menu_nodes`. The unit of organization in the
|
||||
[[menu-tree]]. Has zero or more children, zero or more items, and
|
||||
zero or one parent.
|
||||
|
||||
**NIP-XX** — a Nostr Implementation Possibility. Reference repo at
|
||||
`~/dev/nostr-protocol/nips`. Specific NIPs we use:
|
||||
|
||||
- **NIP-01** — base event structure; kind 0 metadata.
|
||||
- **NIP-09** — deletion request (kind 5).
|
||||
- **NIP-17** — gift-wrapped DMs (kind 1059); planned order intake.
|
||||
- **NIP-44** — encryption used inside NIP-17.
|
||||
- **NIP-51** — generic lists; festival aggregator vehicle.
|
||||
- **NIP-99** — classified listings (kind 30402); how we publish menu items.
|
||||
|
||||
**Operator** — the LNbits user who has enabled this extension on
|
||||
their account. Owns one or more restaurants.
|
||||
|
||||
**Parent order ref** — an opaque string on `orders.parent_order_ref`
|
||||
the webapp can use to correlate its own umbrella-cart id with the
|
||||
per-restaurant orders. The extension stores it and echoes it back;
|
||||
never reads it.
|
||||
|
||||
**Path** — denormalized materialized path on `menu_nodes`. Either
|
||||
`'rootid'` (for a root node) or `'rootid/childid/...'` (for deeper
|
||||
nodes). Underpins [[menu-tree|cheap subtree queries]].
|
||||
|
||||
**Restaurant Nostr identity** — each restaurant has an effective
|
||||
keypair for signing kind-0 / kind-30402 events. If
|
||||
`restaurant.nostr_pubkey` is set it overrides; otherwise the LNbits
|
||||
Account keypair of the wallet owner is used. See [[nostr-layer]].
|
||||
|
||||
**Slug** — the URL segment under which a restaurant's [[cms|CMS pages]]
|
||||
live (e.g. `/restaurant/emporium`). Lowercase, dashes, no spaces.
|
||||
|
||||
**Webapp** — the customer-facing UI at `~/dev/webapp`. Subscribes
|
||||
to restaurants over Nostr, posts orders over REST. See
|
||||
[[webapp-integration]].
|
||||
Loading…
Add table
Add a link
Reference in a new issue