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
f68898dea4
feat(api): product families module with CRUD, auto-group, members, custom members and price overrides
2026-08-28 12:30:57 +08:00
yeuimu
de0f5509b1
feat(api): add family recompute service with union and price matrix
2026-08-28 12:27:29 +08:00
yeuimu
c07b28def7
feat(api): add product_families schema and migration
2026-08-28 12:24:24 +08:00
yeuimu
60946b5f64
feat(api): add origin good name parser
2026-08-28 12:23:35 +08:00
yeuimu
37b45a4679
docs(plans): add product family merge phase-1 implementation plan
2026-08-28 12:22:23 +08:00
yeuimu
573549eb15
docs(specs): reuse public endpoints and include admin frontend scope
2026-08-28 12:04:35 +08:00
yeuimu
14d77fbab2
docs(specs): allow manual price overrides and custom family members
2026-08-28 12:01:13 +08:00
yeuimu
1186d615e2
docs(specs): add product family merge design
2026-08-28 11:45:18 +08:00
yeuimu
8233dda07a
fix(admin): initial goods load also uses pageSize 1000
2026-08-28 09:49:40 +08:00
yeuimu
cbdb507be9
fix(api): allow pageSize up to 1000 so admin goods tree can load full list
2026-08-28 09:36:15 +08:00
yeuimu
b3bd10de06
fix(admin): load all goods in left tree (pageSize 1000) so low-priority new goods are searchable
2026-08-28 09:31:02 +08:00
yeuimu
e7582bbd6e
fix(deploy): add .dockerignore so host node_modules does not break image build
2026-08-27 19:13:57 +08:00
yeuimu
4c50189538
merge: multi-origin-good-merge-zll into develop
2026-08-27 18:51:28 +08:00
yeuimu
4bebb9e4b2
docs: document merged origin goods feature
2026-08-27 18:49:17 +08:00
yeuimu
ac29a0c7bf
feat(admin): show merged count badge on good nodes
2026-08-27 18:45:51 +08:00
yeuimu
ac3a39f40d
feat(admin): manage merged origin goods in good edit modal
2026-08-27 18:43:30 +08:00
yeuimu
491e74b905
feat(admin): add origin name grouping utils with vitest coverage
2026-08-27 18:40:22 +08:00
yeuimu
0aa6cbf1d9
feat(admin): suggest and merge sibling origin goods in config modal
2026-08-27 18:40:13 +08:00
yeuimu
697b82a64b
fix(admin): resolve pre-existing template type errors blocking build
2026-08-27 18:40:08 +08:00
yeuimu
f06dfffbda
feat(public): resolve goods by secondary sds id and merge variants
2026-08-27 18:20:25 +08:00
yeuimu
d9ecd04747
feat(origin-goods): include merged secondary references in tree stats
2026-08-27 18:18:29 +08:00
yeuimu
9c279ae393
feat(goods): support merged secondary origin goods in create/update/detail
2026-08-27 18:15:56 +08:00
yeuimu
848eed0b6f
feat(db): add good_origin_goods junction table for merged origin goods
2026-08-27 18:09:00 +08:00
yeuimu
043d2463a6
docs(plan): add multi origin good merge design and implementation plan
2026-08-27 17:08:06 +08:00
yeuimu
005ab5b585
chore: restore files unintentionally deleted in 6c61a4e
2026-08-26 17:54:35 +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
be0b90e68f
feat(security): HttpOnly cookie sessions, token revocation, and RBAC
...
- Add User.role (enum Role/ADMIN) and User.tokenVersion with migration
- Login now issues short-lived access token (30m default) + 7d refresh
token, both embedding tokenVersion and a typ discriminator
- Tokens delivered via HttpOnly SameSite cookies (ir_at, ir_rt scoped
to /auth); refresh token never leaves the cookie
- New endpoints: POST /auth/refresh (rotation), GET /auth/me,
POST /auth/logout (bumps tokenVersion, revoking all tokens)
- JWT strategy accepts bearer or cookie, rejects refresh tokens, and
verifies tokenVersion + user existence on every request
- Global RolesGuard: authenticated routes require ADMIN unless widened
via @Roles(...)
- Admin SPA: session fully cookie-based, no token in localStorage;
router guard restores session via /auth/me; axios auto-refreshes once
on 401; stale localStorage keys cleaned up
2026-08-22 12:04:56 +08:00
yeuimu
755b40aded
merge: security hardening fixes
2026-08-22 11:55:14 +08:00
yeuimu
9c1106586a
fix(security): harden auth, upload, and API configuration
...
- Lock public registration to first-user bootstrap (403 afterwards)
- Require JwtAuthGuard on upload + whitelist png/jpg/webp/gif (SVG/XSS blocked)
- Add global throttling (login/register 5/min, upload 10/min)
- Add helmet security headers; serve uploads with nosniff
- Replace permissive CORS (origin:true+credentials) with CORS_ORIGINS whitelist
- Disable Swagger outside development; sanitize 500 error responses
- Enforce 32+ char JWT_SECRET; make token expiry configurable (TOKEN_EXPIRES_IN)
- Re-check user in DB on every JWT validation (revocation on user delete)
- Dummy bcrypt compare to prevent login user-enumeration via timing
- Map malformed BigInt inputs to 400 instead of 500
- Widen .gitignore to .env* and add apps/api/.env.example
- Disable Nuxt devtools and sourcemaps
2026-08-22 11:55:13 +08:00
yeuimu
9ed569f5bc
fix(admin): simplify product forms
2026-08-21 14:54:08 +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
4cc99f3f23
fix(docs): describe tags as grouped array
2026-08-21 11:44:25 +08:00
yeuimu
8b38d6fef7
refactor(api): group public tag filters
2026-08-21 11:34:57 +08:00
yeuimu
4963a5c463
docs: update local API startup command
2026-08-21 11:01:02 +08:00
yeuimu
a43353aa98
fix(dev): support admin access over LAN
2026-08-21 10:53:47 +08:00
yeuimu
6e5f7edbb7
chore: update admin generated types and env ignore
2026-08-21 10:39:23 +08:00
yeuimu
437d9ca93b
refactor(api): pair public tag filters with groups
2026-08-21 10:24:35 +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
fcbf8bb494
chore: stop tracking env files (.env, .env.development)
...
Credentials and per-environment config should not be committed.
Files stay on disk locally; .gitignore now covers .env.development.
2026-08-20 18:44:44 +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
b5fc88f3fa
chore: merge website submodule fix to develop
2026-07-16 01:42:58 +08:00
yeuimu
9595030625
fix: convert apps/website from submodule to regular directory
2026-07-16 01:42:45 +08:00
yeuimu
f12ae12ad3
chore: modify README.md
2026-07-15 18:27:37 +08:00
yeuimu
75dd9d47df
chore: merge monorepo migration to develop
2026-07-15 14:51:23 +08:00
yeuimu
9c6a36e0d0
chore(api): add dev script for turbo orchestration
2026-07-15 14:51:15 +08:00