yeuimu
ab79325ab0
perf(public): 公开读路径进程内分域缓存——meta/goods/matrix 版本域 + TTL 兜底 + in-flight 合并
...
- PublicCacheService:分域版本号失效(bump 即作废,不等 TTL)、loader 期间
bump 的竞态防护(返回但不回写)、并发 miss 单飞、PUBLIC_CACHE_DISABLED
/TTL_MS/MAX_ENTRIES 应急开关;@Global 模块
- PublicService 六端点接缓存:列表缓存全量物化(分页切片在缓存外按请求执行,
修复'所有页返回第一页'的切片缓存错误)、详情/首页/树/标签组/树序元数据/
族最低价聚合各按依赖域缓存
- 全写路径挂钩 bump:admin CRUD(goods/categories/countries/tags/tag-groups/
positions/origin-goods 标签)、sync 三同步、族重算、整理全家桶——
事务提交成功后失效对应域,product-families 经 recompute 天然覆盖
- 测试:PublicCacheService 单测 13 例 + 失效链路集成 8 例(读命中/写后立即可见
端到端/每条写路径域断言);既有两套件测数据语义改为显式禁缓存
2026-09-03 03:40:20 +08:00
yeuimu
814f45c5a3
fix(categories): 分类名去括号——同步入库整段删除括号段
...
左侧分类树/官网分类名的括号段(型号限定词(JSA002)与内容性括号
(黑+卡其)/(短裤 & 长裤))整段删除。分类名每小时被 SDS 同步覆盖,
清洗落在 syncCategories 入库路径(cleanCategoryDisplayName,款号 token
保留,剥空守卫),另附幂等存量脚本 fix:category-names。
已执行:V1/V2 各 33 条分类名去括号,复跑幂等 0。注意 api 容器重建
部署前旧镜像的下一轮同步会把名称写回原文,部署后自动恢复干净。
Tests: api 23 suites/206 passed(含新增 category-name.spec 7 例),tsc clean
2026-09-03 01:20:17 +08:00
yeuimu
93ac525c55
refactor(api): parsing out of runtime — pure-mirror sync, explicit organize, auto aggregate recompute
...
解析去运行时化(三层架构,plans/refactor/organize-script-refactor.md):
- 同步 = 纯镜像:upsertOriginGood 不再写解析列、不再自动挂族;详情同步仍触发重算
- 整理 = 显式人工动作(OrganizeService):解析列回填 → 派生标签(人工接管永不
覆盖)→ auto-group 建族 → 全量重算;入口 CLI(pnpm --filter @inkreach/api
organize)+ POST /product-families/organize + 后台「整理」按钮
- 重算 = 纯结构化聚合:不再按名称重派生标签(防上游改名倒灌,回归测试覆盖);
矩阵维度只认标签/CUSTOM 显式标签,未整理成员不进矩阵;工艺=不打印时
印花数量以单面占位(纯结构化规则);「恢复自动」走整理的单链接派生
- 派生默认补齐(脚本层假设):名称无单/双面且工艺非不打印 → 印花数量单面印花
- goods 服务建品/更新后仅镜像标签+重算(不派生);含商品名入库规范化
(normalizeGoodName,管理员输入边界质检)
- organize.service.spec 由 tag-sync spec 迁移 + 防倒灌回归;sync/recompute/
public/families spec 全部适配;API 173/173,admin typecheck+22/22
2026-08-30 01:27:01 +08:00
yeuimu
b5875d33b2
fix(sync): drop local size-code column (P/M/G/GG) from SDS size charts
...
巴西/西语市场上游尺码表带一个名为「尺码」的列,值是本地尺码码
P/M/G/GG(=S/M/L/XL),与行首尺码重复且非测量值;解析时整列丢弃。
其他非数字参考列(身高/体重/建议体重)保留。存量 2 条详情已修复
并重算受影响族。
2026-08-29 08:55:16 +08:00
yeuimu
6418aa7302
feat(api): public good detail family block behind gray-release flag
2026-08-28 13:40:19 +08:00
yeuimu
502b7eba6e
docs: update references for product families; fix controller import and test isolation
2026-08-28 12:50:42 +08:00
yeuimu
c8531bfe08
feat(api): category-based family grouping, tree family info and custom goods family attribution
2026-08-28 12:43:58 +08:00
yeuimu
d63f1a6f35
feat(api): product families backfill script
2026-08-28 12:36:39 +08:00
yeuimu
d20a933e34
feat(api): sync hooks for parsing, auto-attach and family recompute
2026-08-28 12:33:33 +08:00
yeuimu
6c61a4e871
feat(deploy): production deployment setup and fixes
...
- Debian-based api image (bookworm-slim), docker/debian mirrors, prisma
binaryTargets for openssl 3.0
- nginx: admin SPA under /admin, TLS via acme.sh (ZeroSSL) + auto-renewal
cron, http->https redirect
- prisma: add origin_goods.delisted migration, sync missing schema
(good_image/tag_font_color/good_tags), fix users.createdAt Timestamptz
- api: CORS wildcard reflection, helmet CORP cross-origin, price
backfill in persistProductDetail, categoryIcon ancestor fallback,
mediaByColor per-color gallery in public goods detail
- admin: /admin base path (vite + router)
- import-data.mjs: udt_name casting, serial sequence advance fix
2026-08-26 14:23:09 +08:00
yeuimu
b04623ebdd
feat(goods): add editable custom products
2026-08-21 14:45:42 +08:00
yeuimu
a4151607c5
fix(sync): hydrate all origin product details
2026-08-21 14:05:15 +08:00
yeuimu
d375df810d
feat(admin): manage and sync product details
2026-08-21 10:18:57 +08:00
yeuimu
7d09077f1d
feat(api): add mini program catalog endpoints and product details
2026-08-21 02:11:20 +08:00
yeuimu
aed9afef92
fix(api): add sync safety guards against degenerate SDS responses
...
Add SYNC_GUARDS thresholds so a partial/degenerate upstream response never
triggers a destructive operation:
- skip stale category deletion when the fetched tree is suspiciously small
vs the existing SDS category count
- skip delist detection unless both leaf-category and seen-product counts
are healthy
Verified: 77 tests pass; live SDS returns 226 categories (guard off),
incident-case ratios (2/226, 2/2) are correctly blocked.
2026-08-20 16:37:44 +08:00
yeuimu
79fabd85f7
feat(product-center): implement Figma-designed UI, upload module, and website tests
...
- 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
2026-08-20 14:32:03 +08:00
yeuimu
7e04877bb6
chore: migrate to pnpm workspaces monorepo with Turborepo
...
- Restructure directories: apps/api, apps/admin, apps/website
- Add root pnpm-workspace.yaml, turbo.json, .prettierrc, .gitignore
- Rename packages to @inkreach/api, @inkreach/admin, @inkreach/website
- Add shared packages: packages/tsconfig, packages/shared-types
- Add pnpm.onlyBuiltDependencies for native builds
- Update docs: README.md, structs.md
- All three projects build successfully
2026-07-11 16:54:05 +08:00