docs(readme): 修正过时联调指引(JDK17→21/8084→8093/账号/自举→build_devdb)
- 后端联调改走 scripts/run-dev.sh(dev :8093,JDK 21 守卫),删 JDK17 毒指引(项目必须 21,17 连编译都过不了) - 账号分口径:dev 库 admin/111111(日常)/ local 自举 alice/123456(CI/对拍) - .env 表 VITE_BACKEND_TARGET 默认对齐实际 8093 - 本地库指引:日常 eip4dev 用 build_devdb.sh,自举集仅 CI/对拍 - 页面 schema 契约行删「开发期静态 mock」过时表述;设计器行改「已闭环」 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
31
README.md
31
README.md
@@ -21,28 +21,33 @@ SDK 产物来自 C5 构建预演(eip4-poc 的 `sdk-local/`),整套渲染器(图
|
|||||||
|
|
||||||
## 启动
|
## 启动
|
||||||
|
|
||||||
前置:Node v22+,后端 platform-app(端口 8084),本地 PG(`localhost:5433/eip4m0`,已自举)。
|
前置:Node v22+、后端 **JDK 21**(严禁 26,Groovy 红线,见 `../eip4-platform/README.md`)、
|
||||||
|
本地 PG(`localhost:5433`,日常开发库 `eip4dev`,构建见下)。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install
|
npm install
|
||||||
npm run dev # dev server :5173,/api 反代到后端(默认 8084)
|
npm run dev # dev server :5173,/api 反代到后端(dev profile 默认 8093)
|
||||||
```
|
```
|
||||||
|
|
||||||
浏览器开 http://localhost:5173/login,默认账号 `alice` / `123456`。
|
浏览器开 http://localhost:5173/login:
|
||||||
|
- **dev 库(eip4dev,日常开发)**:账号 `admin` / `111111`
|
||||||
|
- local 自举库(eip4m0,CI/对拍用):账号 `alice` / `123456`
|
||||||
|
|
||||||
### 后端联调(单独终端)
|
### 后端联调(单独终端)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ../eip4-platform
|
cd ../eip4-platform
|
||||||
JAVA_HOME=/opt/homebrew/opt/openjdk@17 \
|
mvn -pl platform-app,flowable-service -am package -DskipTests # 先出 jar
|
||||||
mvn spring-boot:run -pl platform-app -Dspring-boot.run.profiles=local
|
bash scripts/run-dev.sh platform # dev profile :8093(内置 JDK 21 守卫,自动关旧实例)
|
||||||
# 端口 8084;若被占,加 -Dspring-boot.run.arguments="--server.port=8090"
|
# 审批流联调用: bash scripts/run-dev.sh both (再起 flowable-service :8089)
|
||||||
# 并把前端 .env 的 VITE_BACKEND_TARGET 同步改为 http://localhost:8090
|
# 日志 /tmp/eip4-platform.log;健康判定 curl :8093/v3/api-docs
|
||||||
|
# 前端反代端口冲突:复制 .env 为 .env.local 改 VITE_BACKEND_TARGET(已 gitignore)
|
||||||
```
|
```
|
||||||
|
|
||||||
本地库自举(首次):依次灌入 `../eip4-platform/platform-parity/src/main/resources/bootstrap/`
|
日常开发库 `eip4dev` 构建:`bash tools/local-devdb/build_devdb.sh --drop-target`
|
||||||
的 `bootstrap-sys.sql` → `bootstrap-privilege.sql` → `bootstrap-auth.sql`,
|
(约 6 分钟,需内网可达客户库副本 192.168.20.68:5435)。
|
||||||
再灌 `platform-flow-gateway/.../bootstrap-datastatus.sql`(详见 P4 报告附录)。
|
CI/对拍走 local profile + `eip4m0` 极简自举集(bootstrap SQL 见
|
||||||
|
`platform-parity/src/main/resources/bootstrap/`,含 alice 测试账号)。
|
||||||
|
|
||||||
## 构建
|
## 构建
|
||||||
|
|
||||||
@@ -62,7 +67,7 @@ Nginx 关键配置:SPA 路由回退 `try_files $uri /index.html`;`/api` 反代
|
|||||||
|
|
||||||
| 变量 | 默认 | 说明 |
|
| 变量 | 默认 | 说明 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| `VITE_BACKEND_TARGET` | `http://localhost:8084` | dev server 的 `/api` 反代目标;8084 被占改 8090 |
|
| `VITE_BACKEND_TARGET` | `http://localhost:8093` | dev server 的 `/api` 反代目标(dev profile 后端);冲突用 `.env.local` 覆盖 |
|
||||||
| `VITE_SCHEMA_SOURCE` | `mock` | `mock`=读 `public/schemas/`;`backend`=读后端 schema 接口 |
|
| `VITE_SCHEMA_SOURCE` | `mock` | `mock`=读 `public/schemas/`;`backend`=读后端 schema 接口 |
|
||||||
|
|
||||||
## 与后端契约清单
|
## 与后端契约清单
|
||||||
@@ -72,7 +77,7 @@ Nginx 关键配置:SPA 路由回退 `try_files $uri /index.html`;`/api` 反代
|
|||||||
| 登录签发 JWT | `POST /api/auth/login` | platform-auth/P2认证实测报告.md | `src/api/auth.ts` |
|
| 登录签发 JWT | `POST /api/auth/login` | platform-auth/P2认证实测报告.md | `src/api/auth.ts` |
|
||||||
| 实体 amis CRUD 列表 | `GET /api/entity/{t}/list` | EntityController(amis 格式 `{status,msg,data:{items,total}}`) | `src/components/AmisRenderer.tsx`(fetcher) |
|
| 实体 amis CRUD 列表 | `GET /api/entity/{t}/list` | EntityController(amis 格式 `{status,msg,data:{items,total}}`) | `src/components/AmisRenderer.tsx`(fetcher) |
|
||||||
| 待办聚合 | `GET /api/todo` | platform-flow-gateway/P3网关实测报告.md(503 熔断降级) | `src/api/todo.ts` |
|
| 待办聚合 | `GET /api/todo` | platform-flow-gateway/P3网关实测报告.md(503 熔断降级) | `src/api/todo.ts` |
|
||||||
| 页面 schema(生产期) | `GET /api/page/schema/{templateId}` | **本期设计契约**(P5 后端落地),开发期用静态 mock 替代 | `src/api/schema.ts` |
|
| 页面 schema | `GET /api/page/schema/{templateId}` | PageSchemaController(`sys_page_schema` 唯一真相,已落地) | `src/api/schema.ts` |
|
||||||
|
|
||||||
JWT 经 `src/api/http.ts` 拦截器注入 `Authorization: Bearer`;401(非登录端点)自动清会话 + 跳 `/login`。
|
JWT 经 `src/api/http.ts` 拦截器注入 `Authorization: Bearer`;401(非登录端点)自动清会话 + 跳 `/login`。
|
||||||
|
|
||||||
@@ -89,7 +94,7 @@ JWT 经 `src/api/http.ts` 拦截器注入 `Authorization: Bearer`;401(非登录
|
|||||||
- amis 锁 6.13.0 本地化部署,不依赖 CDN(SDK 在 `public/sdk-local/`,来源见 C5 构建预演)✅
|
- amis 锁 6.13.0 本地化部署,不依赖 CDN(SDK 在 `public/sdk-local/`,来源见 C5 构建预演)✅
|
||||||
- 渲染宿主参照 PoC `amis-local.html`(本地 SDK 引用方式)✅
|
- 渲染宿主参照 PoC `amis-local.html`(本地 SDK 引用方式)✅
|
||||||
- 页面 schema 双闸:官方 schema.json 校验闸 + 运行时渲染冒烟闸(迁移手册 §8)✅
|
- 页面 schema 双闸:官方 schema.json 校验闸 + 运行时渲染冒烟闸(迁移手册 §8)✅
|
||||||
- 设计器(amis-editor 二开)排 P4 后半,本期未做(装配点见 P4 报告遗留)✅
|
- 设计器:amis-editor 已接入并闭环(`src/editor/DesignerPage.tsx` + `editor.html`,设计中心独立 tab)✅
|
||||||
- 渲染层备选(amis fork 失败时):lowcode-engine / ProComponents(架构设计第七节)✅
|
- 渲染层备选(amis fork 失败时):lowcode-engine / ProComponents(架构设计第七节)✅
|
||||||
|
|
||||||
## 目录
|
## 目录
|
||||||
|
|||||||
Reference in New Issue
Block a user