refactor: 默认 skills 装到 .agents,并清空 example 旧演示实现

对齐安装目录与 opencode 扫描路径;按 confirmed plan 清掉与 iteration1 不对齐的示例业务代码与 as-built 文档,只留空壳与需求输入。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ning-inspire
2026-11-17 11:46:41 +08:00
parent e5abcd101d
commit 670e0c1fa1
155 changed files with 659 additions and 5620 deletions

View File

@@ -1,6 +1,7 @@
# 咨询预约平台 / Consultation Booking Platform
基于 DDD 四层架构的全栈咨询预约单体应用,支持用户注册登录、咨询师浏览、预约管理及后台管理。
全栈工程骨架(Java 17 / Spring Boot 3.2 / Vue 3 + TypeScript)。
**业务实现已清空**;目标需求见 [`docs/features/iteration1/`](docs/features/iteration1/)。
## 技术栈
@@ -9,104 +10,56 @@
| 前端 | Vue 3 + TypeScript + Vite + Pinia + Vue Router 4 |
| 后端 | Java 17 + Spring Boot 3.2 + Spring Security + MyBatis-Plus 3.5 |
| 数据库 | MySQL 8.0 + Flyway 迁移 |
| 认证 | JWT(HMAC-SHA256,jjwt 0.12) |
| 测试 | JUnit 5 + RestAssured + MariaDB4j / Playwright |
| 认证 | JWT(HMAC-SHA256)骨架 |
| 测试 | JUnit 5 + RestAssured / Playwright |
## 项目结构
## 当前状态
```
├── apps/
│ ├── backend/ # Spring Boot 后端
│ └── frontend/ # Vue 3 前端
├── e2e/ # Playwright E2E 测试
├── docs/
│ ├── features/ # 需求规格
│ ├── plans/ # 技术方案
│ ├── facts/ # 事实文档
│ │ ├── business/ # 业务事实
│ │ └── tech-topic/ # 技术专题
│ ├── standards/ # 代码规范
│ └── test-cases/ # 测试用例文本基线
├── .overnight-runner/ # 无人值守 runner(代码 + 配置 + 队列)
└── AGENTS.md # AI Agent 工程规范
```
## 环境要求
- Java 17+
- Node.js 18+ / npm 9+
- MySQL 8.0(或使用 MariaDB4j 自动启动本地实例)
- 后端:`GET /api/v1/health` + JWT / 异常处理 / 规则与字典框架空壳
- 前端:占位首页
- 需求与原型:`docs/features/iteration1/`(含独立 Vite 原型,端口 5174)
- 规范:`AGENTS.md`、`docs/standards/`
## 快速开始
### 1. 配置后端
### 后端
```bash
cd apps/backend
cp src/main/resources/application.yml.example src/main/resources/application.yml
# 编辑 application.yml,填入 MySQL 密码和 JWT 密钥
```
### 2. 启动后端
```bash
cd apps/backend
# 填入 MySQL 密码与 JWT 密钥
mvn spring-boot:run
# 后端启动于 http://localhost:8080
# http://localhost:8080/api/v1/health
```
### 3. 启动前端
### 前端
```bash
cd apps/frontend
npm install
npm run dev
# 前端启动于 http://localhost:5173,/api 请求自动代理到后端
# http://localhost:5173
```
### iteration1 原型(需求演示,非业务前端)
```bash
cd docs/features/iteration1/prototypes
npm install && npm run dev
# http://127.0.0.1:5174/
```
## 测试
用例分两层:**开发自测**(对开发负责)与 **QA 测试**(对需求负责,合并闸门)。详见 [`docs/standards/test.md`](docs/standards/test.md)。
### 开发自测
```bash
cd apps/backend
mvn test
# 使用 MariaDB4j 自动启动临时 MySQL,无需手动建库
cd e2e
npm run test:dev
# 只跑开发自测的 E2E 用例(视觉冒烟等),不阻塞合并
cd apps/backend && mvn test
cd e2e && npm run test:dev # 开发壳冒烟
cd e2e && npm run test:qa # QA 闸门(用例待按 iteration1 重建)
```
### QA 测试(合并闸门)
```bash
cd e2e
npm run test:qa
# QA 验收用例集,与 docs/test-cases/e2e-cases/test-cases.md 的 TC-xxx 一一对应
# 一键启动前后端 + 执行全部 E2E
bash e2e-run.sh
```
## 架构概览
```
Client → Vue 前端 (:5173) → /api 代理 → Spring Boot 后端 (:8080) → MySQL
```
- **adapter**:协议转换与参数校验,不含业务逻辑
- **application**:用例编排,组合 domain 行为,管理事务边界
- **domain**:领域模型与业务不变量,不依赖任何基础设施
- **infrastructure**:持久化实现、安全配置、异常处理
## 文档
详见 [`docs/`](docs/) 目录:
- **需求与方案**:`docs/features/` — JIRA 风格 feature 文件夹(`spec.md` + `plan*.md`;横切见 `_chores/`)
- **事实文档**:`docs/facts/` — API 定义、数据库设计、领域模型、技术主题
- **代码规范**:`docs/standards/` — 架构、命名、安全、分层等规范及代码模板
- **测试用例**:`docs/test-cases/{e2e,manual,smoking,dev-self}-cases/`
- **需求**:`docs/features/iteration1/`
- **事实**:`docs/facts/`(当前为空壳 as-built)
- **规范**:`docs/standards/`
- **清理方案**:`docs/features/_chores/plan-20261117-purge-demo-impl-for-iteration1.md`