Files
ai-workflow/README.zh-CN.md
T

81 lines
1.8 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.
[English](README.md)
# ai-workflow-v2
这个仓库现在按“独立模块”来组织,而不是把运行时、缓存和多套旧代码混在一起。
## 模块划分
| 模块 | 路径 | 作用 |
| --- | --- | --- |
| Inbox host | `inbox/` | Go 控制面:CLI、HTTP API、运行时存储、Agent 调度 |
| Dashboard | `dashboard/` | 面向 Inbox host 的 React 运维界面 |
| Blog backend | `apps/blog/backend/` | 示例 Express API |
| Blog frontend | `apps/blog/frontend/` | 示例 React 客户端 |
| Blog E2E | `apps/blog/e2e/` | 面向 blog 应用的 Playwright 黑盒测试 |
模块边界说明见 [docs/modules.md](docs/modules.md)。
## 仓库规则
- 每个模块都应该可以独立开发、独立测试。
- 跨模块只通过 HTTP 或 CLI 边界通信,不直接相互引用源码。
- 运行时数据、本地数据库、worktree、缓存和构建产物默认都不进仓库。
## 快速开始
统一从根目录 `Makefile` 进入:
```bash
make help
make build-inbox
make test-inbox
make test-dashboard
make test-blog-backend
make test-blog-frontend
make test-blog-e2e
```
## 各模块独立使用
### Inbox host
```bash
cd inbox
go build ./cmd/inbox
go test ./...
```
更多说明见 [inbox/README.md](inbox/README.md)。
### Dashboard
```bash
cd dashboard
npm ci
npm run dev
npm test
```
更多说明见 [dashboard/README.md](dashboard/README.md)。
### Blog 应用
```bash
cd apps/blog/backend && npm ci && npm test
cd apps/blog/frontend && npm ci && npm test
cd apps/blog/e2e && npm ci && npm test
```
更多说明见 [apps/blog/README.md](apps/blog/README.md)。
## 测试入口
- 快速测试:`make test-all`
- 浏览器 / E2E`make test-all-e2e`
- 一次性安装全部 JS 依赖:`make deps-all`
## 当前目标
让每个模块边界清晰、职责单一,并且默认就是“方便使用、方便测试”的状态。