docs: architecture, guidelines, domain designs, progressive code index
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Index: Catalog
|
||||
|
||||
Domain design: `docs/domains/catalog.md`. Specs: `openspec/specs/product/`,
|
||||
`category/`, `brand/`.
|
||||
|
||||
## Backend (`apps/api`)
|
||||
|
||||
| File | Holds |
|
||||
|---|---|
|
||||
| `src/modules/product/service.rs` | public list/detail, merchant CRUD, publish/unpublish, SKU upsert, template link validation |
|
||||
| `src/modules/product/repo.rs` | SKU attach + sold_count aggregation |
|
||||
| `src/modules/category/` | public category tree |
|
||||
| `src/modules/brand/` | public list; admin whole-list replacement |
|
||||
| `migrations/0003_catalog.sql`, `0005_seed_category_tree.sql`, `0008_brands.sql` | schema + seeds |
|
||||
|
||||
## Shared contract
|
||||
|
||||
`types.ts`: `Product`, `Sku`, `Category`, `Brand`, `ProductStatus`.
|
||||
`api.ts`: `listProducts`, `getProduct`, `listCategories`, `listBrands`,
|
||||
`shop.*` product/SKU methods, `admin.replaceBrands`.
|
||||
|
||||
## Frontends
|
||||
|
||||
- Mall: `pages/index.vue` (floors), `pages/search.vue`, `pages/goods/[id].vue`,
|
||||
`components/ui/ProductCard.vue`
|
||||
- Shop-admin: `pages/products/{index,new,[id]}.vue`,
|
||||
`components/ProductForm.vue`
|
||||
- Admin: `pages/brands.vue`
|
||||
Reference in New Issue
Block a user