feat: 初始化零工后端代码

This commit is contained in:
Daniel
2026-04-01 14:19:25 +08:00
parent c6fabe262c
commit 84f8be7c0e
41 changed files with 2813 additions and 147 deletions

View File

@@ -5,6 +5,12 @@
cd gig-poc
sh infrastructure/scripts/dev-up.sh
```
默认会自动完成:
- 启动容器并健康检查
- bootstrap 样本数据
- 闭环验收(抽取 -> 入库 -> 匹配 -> 解释)
- 导出 `docs/openapi.json`
- 可选压测并生成 `docs/CAPACITY_BASELINE.md``RUN_BASELINE_ON_UP=true`
## 演示步骤
1. 打开 `http://127.0.0.1:5173`
@@ -21,6 +27,42 @@ cd gig-poc
sh infrastructure/scripts/prod-up.sh
```
## 生产环境停止
```bash
cd gig-poc
sh infrastructure/scripts/prod-down.sh
```
## OpenAPI 交接文件导出
```bash
cd gig-poc
sh infrastructure/scripts/export-openapi.sh
```
## OpenAPI 固化入库(离线)
```bash
cd gig-poc
sh infrastructure/scripts/freeze-openapi.sh
```
## 一键闭环验收(可单独执行)
```bash
cd gig-poc
sh infrastructure/scripts/acceptance-e2e.sh
```
## 容量基线压测(可单独执行)
```bash
cd gig-poc
sh infrastructure/scripts/load-baseline.sh
```
## 高并发演示建议
1. 同步匹配:调用 `POST /poc/match/workers` 观察实时结果。
2. 异步匹配削峰:调用 `POST /poc/match/workers/async` 获取 `task_id`
3. 轮询结果:调用 `GET /poc/match/queue/{task_id}` 直到 `status=done`
4. 打开 `GET /poc/ops/system/metrics` 观察缓存命中率、队列积压和限流熔断状态。
## 演示建议
- 先演示系统状态页,确认健康与 bootstrap 正常
- 再演示岗位找人、人找岗位两个闭环