The store keeps a Menu Set's state in the directory layout (drafts/ versus published/) and its metadata in a manifest, with publishing as a single directory rename. Editing is allowed on Drafts only, so a published menu can never change under a customer. Stages 2 and 3 of docs/plan.md, with tests.
6 lines
678 B
Markdown
6 lines
678 B
Markdown
# Menu metadata lives in JSON manifests, not a database
|
|
|
|
Menu Sets, their Page order, labels, dates and state are recorded in JSON manifests beside the images rather than in SQLite. The state is small and single-writer, and a manifest the owner can read and repair by hand was preferred over a database file that needs a tool to inspect.
|
|
|
|
**Consequences**: invariants such as "exactly one Current Menu Set per Section" are enforced by the app at boot rather than by a storage engine, and `publish`/`archive` serialize behind an in-process lock instead of a transaction. Publication state is carried by the directory layout, so manifests can be rebuilt from disk if one is lost.
|