[P1] Add minimal public catalog fields and publish workflow #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make selected inventory items publishable to the separate static
garage-storesite without creating unnecessary admin data-entry burden.Decision
Do not add separate
categoryorbrandfields in this issue. The existing admin-facinginventory.type(Part,Consumable,Accessory) remains the only classification for now; the public endpoint may expose it astypeif useful, without introducing a second category concept. Brand is omitted until there is a demonstrated need.Change
Add only the minimum new public fields:
slug— unique, stable URL identifierdescription— nullable until content is writtenimages— list/array of public image references, default empty listisPublished— default falseReuse existing fields where appropriate:
itemNameas the public namesellPriceonly if the business wants to publish pricestypeonly as an optional public grouping, not a new category fieldDo not expose or add buy price, average cost, suppliers, stock movements, customers, private IDs, or other optional product attributes in this first pass.
Acceptance criteria
This issue deliberately avoids adding brand and category fields until actual catalog usage proves they are needed.
PRD: https://git.nokopia.com/yuris/garage/src/branch/main/docs/store-prd.md
[P1] Add public catalog fields and publish workflowto [P1] Add minimal public catalog fields and publish workflowImplemented in the local working tree. Added
slug, nullabledescription,images(text[], default empty), andisPublished(default false), with a unique slug index and a DB check preventing publication without a slug. Authenticated inventory create/update APIs now accept the catalog fields. Added the public-safe catalog schema and contract tests for defaults, slug validation, image lists, and private-field stripping.Verification:
pnpm test— 28 passed;pnpm build— passed; migration0009_greedy_hulk.sqlapplied successfully throughdevenv up.Leaving open until the working-tree changes are committed/pushed.