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
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
# Product Center Backend Integration Implementation Plan
|
||||
|
||||
**Goal:** Make product-center countries, categories, tag filters, and their icons fully driven by backend configuration while matching the Figma assets.
|
||||
|
||||
**Architecture:** Store Figma-derived icons as versioned API static assets and update existing database records through an idempotent Prisma script. The website resolves backend-relative asset URLs against `backendUrl` and builds filter controls from backend tag-group membership rather than sort-order guesses or tag-name allowlists.
|
||||
|
||||
**Tech Stack:** NestJS, Prisma, PostgreSQL, Nuxt 4, Vue 3, Vitest, Jest.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Backend Icon Assets and Configuration Script
|
||||
|
||||
- [x] Export country and top-level category icons from Figma into `apps/api/public/product-center`.
|
||||
- [x] Serve committed API assets under `/assets/`.
|
||||
- [x] Add an idempotent Prisma script that updates matching country/category icon fields.
|
||||
- [x] Run the script against the configured database and verify public API values.
|
||||
|
||||
### Task 2: Website Backend Asset Resolution
|
||||
|
||||
- [x] Add failing tests for absolute, data, and backend-relative icon URLs.
|
||||
- [x] Implement URL resolution in the product-center data mapper.
|
||||
- [x] Verify country and category components render API-provided icons.
|
||||
|
||||
### Task 3: Backend-Driven Tag Groups
|
||||
|
||||
- [x] Add failing component tests using backend group IDs/names.
|
||||
- [x] Pass tag groups into `ProductTagFilter` and derive logistics/process groups from backend metadata.
|
||||
- [x] Remove sort-order and tag-name allowlist assumptions.
|
||||
|
||||
### Task 4: End-to-End Verification
|
||||
|
||||
- [x] Run website and API tests/builds.
|
||||
- [x] Verify public endpoints contain durable icon URLs.
|
||||
- [x] Browser-test icons and filters on `/product-center`.
|
||||
# Product Center Backend Integration Implementation Plan
|
||||
|
||||
**Goal:** Make product-center countries, categories, tag filters, and their icons fully driven by backend configuration while matching the Figma assets.
|
||||
|
||||
**Architecture:** Store Figma-derived icons as versioned API static assets and update existing database records through an idempotent Prisma script. The website resolves backend-relative asset URLs against `backendUrl` and builds filter controls from backend tag-group membership rather than sort-order guesses or tag-name allowlists.
|
||||
|
||||
**Tech Stack:** NestJS, Prisma, PostgreSQL, Nuxt 4, Vue 3, Vitest, Jest.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Backend Icon Assets and Configuration Script
|
||||
|
||||
- [x] Export country and top-level category icons from Figma into `apps/api/public/product-center`.
|
||||
- [x] Serve committed API assets under `/assets/`.
|
||||
- [x] Add an idempotent Prisma script that updates matching country/category icon fields.
|
||||
- [x] Run the script against the configured database and verify public API values.
|
||||
|
||||
### Task 2: Website Backend Asset Resolution
|
||||
|
||||
- [x] Add failing tests for absolute, data, and backend-relative icon URLs.
|
||||
- [x] Implement URL resolution in the product-center data mapper.
|
||||
- [x] Verify country and category components render API-provided icons.
|
||||
|
||||
### Task 3: Backend-Driven Tag Groups
|
||||
|
||||
- [x] Add failing component tests using backend group IDs/names.
|
||||
- [x] Pass tag groups into `ProductTagFilter` and derive logistics/process groups from backend metadata.
|
||||
- [x] Remove sort-order and tag-name allowlist assumptions.
|
||||
|
||||
### Task 4: End-to-End Verification
|
||||
|
||||
- [x] Run website and API tests/builds.
|
||||
- [x] Verify public endpoints contain durable icon URLs.
|
||||
- [x] Browser-test icons and filters on `/product-center`.
|
||||
|
||||
Reference in New Issue
Block a user