Skip to content

refactor(verticals): each preset's seed split into one file per module - #4

Merged
lroy-stack merged 1 commit into
mainfrom
feat/m6b-seeds-per-module
Nov 5, 2026
Merged

lroy-stack merged 1 commit into
mainfrom
feat/m6b-seeds-per-module

Conversation

@lroy-stack

Copy link
Copy Markdown
Owner

Plan 006 M6 (seeds per module; ADR 0004 as amended by ADR 0017, ADR 0003): removing a module deletes its seed file instead of editing a shared one.

What

  • src/verticals/<preset>/seed.ts becomes seed/: shared.ts (business day, money and text helpers), one file per module (resources, customers, parties, catalog, inventory, staff, bookings), and index.ts, which composes <preset>Seed with the same collections in the same order. Importers of ./seed are unchanged; no index.ts, ui.ts, nav or route is touched.

How verified: a pure move, no mock data dropped

  • Each preset's composed seed dumped as JSON from main 8b8b5ec (seed.ts) and from this branch (seed/) is byte-identical: hospitality 76 rows, salon 30, workshop 23, across 10 collections each; the same ids and values in the same order, including the three client parties the hospitality invoice bills and every inventory supplier reference (all resolve).
  • Since the seeds are identical, the demo store's fingerprint and STORE_VERSION do not move.
  • tsc, npm test (5943, unchanged), npm run check, npm run build; generate:modules and docs/mcp/reference.md unchanged.

🤖 Generated with Claude Code

ADR 0004 (amended by ADR 0017): a preset's seed is split per module, so
removing a module deletes its seed file instead of editing a shared one
(plan 006 M6, ADR 0003).

- src/verticals/<preset>/seed.ts becomes seed/: shared.ts (the business
  day and the money and text helpers), one file per module (resources,
  customers, parties, catalog, inventory, staff, bookings), and index.ts,
  which composes `<preset>Seed` with the same collections in the same
  order and keeps the preset's description. Importers of "./seed" are
  unchanged.
- A pure move: no row is added, dropped or changed. The composed seed of
  every preset, dumped as JSON before and after, is byte-identical (76,
  30 and 23 rows across 10 collections each, ids and values alike,
  including the three client parties the hospitality invoice bills and
  every inventory supplier reference). The demo store's fingerprint, and
  so its version, do not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lroy-stack
lroy-stack merged commit cac4a03 into main Nov 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant