Files
ai4se-harness-suite/example-project/README.md
ning-inspire d243b53fe1 refactor: feature 改为 JIRA 编码文件夹并同放 plan
规格改为 <CODE>-<slug>/spec.md,方案放 plan.md/_chores;同步 skill、安装器与工作流指南。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-17 10:53:28 +08:00

113 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 咨询预约平台 / Consultation Booking Platform
基于 DDD 四层架构的全栈咨询预约单体应用,支持用户注册登录、咨询师浏览、预约管理及后台管理。
## 技术栈
| 层级 | 技术 |
|------|------|
| 前端 | 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 |
## 项目结构
```
├── 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 自动启动本地实例)
## 快速开始
### 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
mvn spring-boot:run
# 后端启动于 http://localhost:8080
```
### 3. 启动前端
```bash
cd apps/frontend
npm install
npm run dev
# 前端启动于 http://localhost:5173,/api 请求自动代理到后端
```
## 测试
用例分两层:**开发自测**(对开发负责)与 **QA 测试**(对需求负责,合并闸门)。详见 [`docs/standards/test.md`](docs/standards/test.md)。
### 开发自测
```bash
cd apps/backend
mvn test
# 使用 MariaDB4j 自动启动临时 MySQL,无需手动建库
cd e2e
npm run test:dev
# 只跑开发自测的 E2E 用例(视觉冒烟等),不阻塞合并
```
### 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/`