Repository navigation
refactor(verticals): each preset's seed split into one file per module - #4
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsbecomesseed/:shared.ts(business day, money and text helpers), one file per module (resources, customers, parties, catalog, inventory, staff, bookings), andindex.ts, which composes<preset>Seedwith the same collections in the same order. Importers of./seedare unchanged; noindex.ts,ui.ts, nav or route is touched.How verified: a pure move, no mock data dropped
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).tsc,npm test(5943, unchanged),npm run check,npm run build;generate:modulesanddocs/mcp/reference.mdunchanged.🤖 Generated with Claude Code