feat(ECR-006): 落地运营后台 Phase A(admin API + admin-h5)
新增独立鉴权的 /api/v1/admin 与 Vue 控制台;会员授予与审计同事务,并补集成/单测。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# ENGINEERING_SPEC — ECR-006 运营后台 Phase A
|
||||
|
||||
权威设计:`docs/BACKEND_DESIGN/ECR-006-ops-admin-phase-a.md`
|
||||
产品:`.ai/product/feature-spec/ops-admin.md`
|
||||
|
||||
## Implement order
|
||||
|
||||
1. Migration `000010_admin_ops` + ERD 同步
|
||||
2. `repository/admin_repo.go`
|
||||
3. `service/admin`(auth · users · orders · grant · audit)
|
||||
4. `middleware.AdminAuth` + `handler` 注册(**独立** Group,勿挂 DeviceAuth)
|
||||
5. config bootstrap + `config.example.yaml`
|
||||
6. OpenAPI `/admin/*` 最小路径
|
||||
7. `apps/admin-h5` Vite Vue3:login + shell + 四页
|
||||
8. root scripts:`dev:admin` / `build:admin`
|
||||
9. 测试:service 或 integration
|
||||
10. 更新 architecture / go-services / feature-map / TRACEABILITY
|
||||
|
||||
## Constraints
|
||||
|
||||
- 函数 ≤50 行 · 文件 ≤400 行
|
||||
- 密码 bcrypt;session token 随机 opaque
|
||||
- admin-h5 禁止页面内裸拼绝对 API URL
|
||||
- 不提交 `config.local.yaml`
|
||||
|
||||
## Done when
|
||||
|
||||
ECR Acceptance 勾完 + DoD Review Report
|
||||
Reference in New Issue
Block a user