Files
foka-ci/docs/decisions/0001-tech-stack.md
2026-01-11 11:59:04 +08:00

15 lines
715 B
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.
# ADR 0001: 技术选型
## 背景
需要构建一个轻量级、易扩展且易于本地部署的 CI 系统。
## 决策
- **语言**: 全栈 TypeScript确保模型定义在前后端的一致性。
- **后端框架**: Koa。相比 Express 更加轻量,利用 async/await 处理异步中间件更优雅。
- **数据库**: SQLite。CI 系统通常是单机或小规模使用SQLite 无需独立服务,运维成本极低。
- **执行工具**: `zx`。相比原生的 `child_process``zx` 处理 Shell 交互更加直观和安全。
## 后果
- 优势:开发效率极高,部署简单。
- 挑战SQLite 在极高并发写入(如数百个任务同时输出日志)时可能存在性能瓶颈。