refactor: 将 apps 重命名为 containers 并同步 harness 默认路径
example-project 与占位符/安装器默认改为 containers/backend|frontend,探测仍兼容旧 apps/。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,25 +9,25 @@ description: 遵循四层 DDD 架构实现功能。当为 example-project 编写
|
||||
|
||||
## 后端
|
||||
|
||||
- `apps/backend/adapter/rest/` — Controller:仅做协议转换,不含业务逻辑
|
||||
- `apps/backend/application/service/` — AppService:用例编排,`@Transactional`
|
||||
- `apps/backend/domain/` — 聚合、值对象、领域服务:业务不变量
|
||||
- `apps/backend/infrastructure/` — 持久化、安全、配置
|
||||
- `containers/backend/adapter/rest/` — Controller:仅做协议转换,不含业务逻辑
|
||||
- `containers/backend/application/service/` — AppService:用例编排,`@Transactional`
|
||||
- `containers/backend/domain/` — 聚合、值对象、领域服务:业务不变量
|
||||
- `containers/backend/infrastructure/` — 持久化、安全、配置
|
||||
|
||||
层依赖关系:adapter → application → domain ← infrastructure
|
||||
|
||||
## 前端
|
||||
|
||||
- Vue 3 Composition API + `<script setup>`
|
||||
- Pinia store 管理认证状态,位于 `apps/frontend/src/stores/auth.ts`
|
||||
- 视图位于 `apps/frontend/src/views/user/` 或 `apps/frontend/src/views/admin/`
|
||||
- Pinia store 管理认证状态,位于 `containers/frontend/src/stores/auth.ts`
|
||||
- 视图位于 `containers/frontend/src/views/user/` 或 `containers/frontend/src/views/admin/`
|
||||
- Axios 拦截器处理 JWT 和 401 跳转
|
||||
|
||||
## 验证
|
||||
|
||||
```bash
|
||||
cd apps/backend && mvn test
|
||||
cd apps/frontend && npm run build
|
||||
cd containers/backend && mvn test
|
||||
cd containers/frontend && npm run build
|
||||
```
|
||||
|
||||
## 文档同步
|
||||
|
||||
@@ -96,7 +96,7 @@ git diff main...HEAD --stat # 改动文件清单
|
||||
## 评审意见写法
|
||||
|
||||
```
|
||||
[Blocker] apps/backend/.../AppointmentService.java:42
|
||||
[Blocker] containers/backend/.../AppointmentService.java:42
|
||||
事务边界放错了:@Transactional 标在 repository 实现上,违反 AGENTS.md §6。
|
||||
应移到 AppService 的用例方法上。
|
||||
```
|
||||
|
||||
@@ -53,8 +53,8 @@ git diff main...HEAD --stat
|
||||
|
||||
## 2. 测试通过
|
||||
|
||||
- [ ] 后端单元测试全绿(`cd apps/backend && mvn test`)
|
||||
- [ ] 前端构建通过(`cd apps/frontend && npm run build`)
|
||||
- [ ] 后端单元测试全绿(`cd containers/backend && mvn test`)
|
||||
- [ ] 前端构建通过(`cd containers/frontend && npm run build`)
|
||||
- [ ] **QA 验收用例集全绿**(`cd e2e && npm run test:qa`)
|
||||
- [ ] QA 已逐条验收 `docs/test-cases/e2e-cases/test-cases.md`
|
||||
- [ ] 冒烟用例全绿(`docs/test-cases/smoking-cases/smoking-test-cases.md`)
|
||||
|
||||
@@ -28,8 +28,8 @@ description: 运行并修复开发自测(后端单元/集成测试、前端构
|
||||
```
|
||||
|
||||
```bash
|
||||
cd apps/backend && mvn test
|
||||
cd apps/frontend && npm run build
|
||||
cd containers/backend && mvn test
|
||||
cd containers/frontend && npm run build
|
||||
|
||||
cd e2e && npm run test:dev # 开发自测 E2E,不含 QA 用例
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user