yeuimu a903dd4903 feat(admin): redesign GoodsView with dual-tree UX, filter bar, inline CRUD
- Two-line good nodes with country + tag chips, hover tooltip
- Resizable dual-tree with fixed-height panels (no node overlap)
- Filter bar: search, country filter, tag filter (multi-select with rename)
- Mode switch (品类/国家) pushed to right via spacer
- Inline create country/tag in edit & config modals via quick-create buttons
- Right tree node height auto-fix for locate highlight
- Filter dropdown styles in global scope for teleported popper
- Backend: multi-tag (GoodTag junction), goodImage column, origin goods tree API
- Admin response interceptor unwraps {data, success} envelope
- Simplified sidebar to single 商品管理 entry with tabs
- SyncView simplified to product sync only
2026-06-22 01:47:20 +08:00
2026-06-15 02:31:15 +08:00

InkReach Product Center

InkReach 官方产品中心项目,包含三个协同工作的子项目:

子项目 技术栈 端口 角色
inkreach-official-nestjs NestJS 10 + Prisma 5 + PostgreSQL 3001 后端 API(鉴权 / CRUD / SDS 同步 / 公开 API / Swagger
inkreach-official-admin Vue 3 + Vite + Element Plus + Pinia 5173 后台管理(登录 / 商品 / 品类 / 国家 / 标签 / 坑位 / 同步)
inkreach-official-website Nuxt 4 + Vue 3 + Tailwind v4 3000 官方展示站 + 产品中心页

快速开始

1. 启动顺序

后端必须先于前两个子项目启动,否则前端代理会失败。

# Terminal 1:后端(需要 PostgreSQL
cd inkreach-official-nestjs
npm install
npm run prisma:generate
npm run prisma:migrate
npm run start:dev
# → http://localhost:3001  · Swagger: http://localhost:3001/api/docs

# Terminal 2:官网
cd inkreach-official-website
npm install
npm run dev
# → http://localhost:3000

# Terminal 3:后台
cd inkreach-official-admin
npm install
npm run dev
# → http://localhost:5173

2. 环境变量

在仓库根目录的 .env 中配置数据库:

DATABASE_URL=postgresql://postgres:<password>@localhost:5432/inkreach-official

后端额外需要的变量(在 inkreach-official-nestjs/.env 中):

JWT_SECRET=<your-secret>
SDS_API_BASE=https://api.sds.example.com
SDS_API_KEY=<your-key>
PORT=3001

官网默认通过 NUXT_PUBLIC_BACKEND_URL=http://localhost:3001 指向后端,可写入 inkreach-official-website/.env 覆盖。

后台无需额外环境变量;Vite 代理已把 /api/* 转给 http://localhost:3001

端口分配

端口 项目 入口
3001 NestJS 后端 inkreach-official-nestjs/src/main.ts
5173 Vue Admin inkreach-official-admin/vite.config.ts
3000 Nuxt 官网 inkreach-official-website/nuxt.config.ts

数据流概览

[SDS 外部 API]
      │ (同步)
      ▼
[NestJS 后端 :3001]  ── public/goods ──► [Nitro 代理 /api/backend/*]  ──► [Nuxt 官网 :3000]
      │                                            ▲
      ├── /auth /goods /categories ...  ──►        │ Vite proxy /api/*
      │                                            │
[PostgreSQL]                                [Vue Admin :5173]

常用命令

# 后端
cd inkreach-official-nestjs
npm run start:dev     # 开发
npm run build         # 编译
npm run test          # 单元测试
npm run prisma:studio # 打开 Prisma Studio

# 官网
cd inkreach-official-website
npm run dev           # 开发
npm run build         # 构建
npm run generate      # 静态站点生成

# 后台
cd inkreach-official-admin
npm run dev           # 开发
npm run build         # 构建(含 vue-tsc 类型检查)

文档

S
Description
No description provided
Readme
43 MiB
Languages
JavaScript 69.8%
TypeScript 11.8%
Vue 10.1%
Python 4.3%
HTML 3.2%
Other 0.8%