/ship-sample-data
Ship sample/demo data for MeshWeaver modules in the most compact form — data separated into a demo module, the node-vs-file-vs-zip decision ladder, the install-time zip importer pattern, per-record file storage, and idempotent upserts.
- Instructions: You are deciding **how to ship sample/demo data for MeshWeaver modules in the most compact, maintainable form**. The governing principle: **data is separated from the modules** — code modules (node types, scopes, areas) ship no book; a dedicated demo module (`dependsOn` the code modules) carries the data. Worked example: `ReinsuranceDemo` in MeshWeaver.Plugins (data for the Reinsurance / Underwriting / Claims suite). # 1. The decision ladder — what form does each piece of data take? Work top-down; stop at the first rung that fits: 1. **A handful of story-telling records (≲ ~50)** → plain **node-per-file JSON** in the demo module. Instantly browsable, diffable, no import step. Mirror them 1:1 with C# fixtures in the code module's `SampleData/Source` and pin data ↔ fixtures with **round-trip tests** (deserialize the demo JSON into the record and compare) so the story the tests tell IS the story the demo shows. 2. **Bulk machine/human-readable data (listings, triangles, exposure schedules, PDFs, workbooks)** → **files in the demo's content collection** (`<Demo>/content/…`). Files stay files: browsable, downloadable, analyzable later — never exploded into nodes. ⚠️ A node repo import turns only `.json`/`.md` into NODES; everything else in the folder is content. Node-per-row is the cardinal sin: a 2,000-row claims listing as 2,000 nodes drowns the mesh for zero benefit. 3. **A large multi-file pack (tens of MB, hundreds of files)** → **ONE zip in `<Demo>/content/`** + an **install-time importer**. Most compact repo form; the zip is the artifact of a deterministic generator wherever possible, so the repo stays the source of truth. # 2. What earns a NODE Create nodes only for entities that carry a **workflow**: a stored lifecycle, references other nodes join on, per-instance areas, or per-instance file storage. In the reinsurance demo: 16 cedents, ~36 submissions (one per programme-year), and claims **only above the large-loss threshold** (t…
- Auto mount: yes
- Launches sub thread: no