- Redesign website homepage & product-center per Figma (fonts, logos, hero/footer/customer cases) - Add API upload module (multer) with static serving for uploads/public assets - Add OriginGood.delisted flag and SDS request retry logic - Add admin ImageUpload component and goods import/upload flows - Add vitest suite for website components and composables (32 tests) - Add skills, docs, plans and PRODUCT.md
1.8 KiB
Product External ID Fix Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Make the public goods API return the SDS/InkPOD product ID as id, so product-card links target the correct InkPOD detail page.
Architecture: Keep the local goods.good_id as the database identity used by admin and relations. At the public API serialization boundary, map originGood.sdsGoodId to the existing response id field; the website can continue consuming product.id without a second identifier.
Tech Stack: NestJS, Prisma, Jest, Nuxt/Vue
Task 1: Lock the public API ID contract
Files:
-
Modify:
apps/api/src/public/public.service.spec.ts -
Add an assertion that a listed public product has
idequal to the seededOriginGood.sdsGoodId, not the localGood.id. -
Run the focused API test and confirm it fails because the service currently returns
good.id.
Task 2: Return the SDS product ID
Files:
-
Modify:
apps/api/src/public/public.service.ts -
Include
sdsGoodIdin the serializer'soriginGoodtype. -
Return
good.originGood.sdsGoodIdasPublicGoodDto.id. -
Run the focused API test and confirm it passes.
Task 3: Verify consumers and document the contract
Files:
-
Modify:
docs/references/product-center.md -
Modify:
docs/references/structs.md -
Document that public product
idis the SDS/InkPOD external product ID. -
Run API public-service tests, website tests, and the website build.
-
Verify the running public endpoint returns
126673for200g纯棉T恤KRTM001when local services are available. (The API was not listening on port 3001 during verification.)