感谢您对 Nexus Terminal 的关注!本文档将帮助您快速参与到项目开发中。
| 依赖 | 最低版本 | 推荐版本 | 说明 |
|---|---|---|---|
| Node.js | 18.0 | 20 LTS | 运行时 |
| npm | 8.0 | 10+ | 包管理(项目使用 npm workspaces) |
| Git | 2.30 | 最新 | 版本控制 |
| Docker | 20.10 | 24.0+ | 可选,用于容器化部署测试 |
# 克隆仓库
git clone https://github.com/<your-username>/nexus-terminal.git
cd nexus-terminal
# 安装所有子包依赖(npm workspaces)
npm install项目使用 Husky 管理 Git hooks,安装依赖后会自动配置:
如需临时跳过 pre-commit 质量检查:
SKIP_PRECOMMIT_QUALITY=1 git commit -m "✨ feat(scope): 示例"npm test # 全部测试
npm run test:backend # 后端测试
npm run test:frontend # 前端测试
npm run test:coverage # 覆盖率报告
npm run typecheck:frontend # 前端类型检查
npm run typecheck:backend # 后端类型检查
npm run lint # 代码检查在 GitHub Issues 中提交 Bug 报告,请包含:
在 GitHub Discussions 中提出功能建议,描述:
git clone https://github.com/<your-username>/nexus-terminal.git
cd nexus-terminalnpm installgit checkout -b feature/your-feature分支命名规范:
feature/xxx — 新功能fix/xxx — Bug 修复docs/xxx — 文档更新refactor/xxx — 代码重构test/xxx — 测试补充# 后端
cd packages/backend && npm run dev
# 前端
cd packages/frontend && npm run dev
# 网关(如需 RDP/VNC)
cd packages/remote-gateway && npm run devnpm test # 全部测试
npm run test:backend # 后端测试
npm run test:frontend # 前端测试
npm run test:coverage # 覆盖率报告git add .
git commit -m "feat: 描述你的改动"
git push origin feature/your-feature然后在 GitHub 上创建 Pull Request。
使用 Conventional Commits 格式:
<type>(<scope>): <description>类型:
| 类型 | 说明 |
|---|---|
feat | 新功能 |
fix | Bug 修复 |
docs | 文档更新 |
style | 代码格式(不影响功能) |
refactor | 重构 |
test | 测试 |
chore | 构建/工具变更 |
示例:
feat(terminal): 添加终端搜索功能
fix(auth): 修复 Passkey 登录超时问题
docs: 更新部署文档中的 Nginx 配置kebab-casePascalCasecamelCaseUPPER_SNAKE_CASE*.test.ts| 模块类型 | 行覆盖率 | 分支覆盖率 |
|---|---|---|
| Service | >=80% | >=70% |
| Controller | >=70% | >=60% |
| Repository | >=60% | >=50% |
| Utils | >=90% | >=80% |
| Store | >=80% | >=70% |
| Component | >=60% | >=50% |
nexus-terminal/
├── packages/
│ ├── backend/ # Express + SQLite + SSH2
│ ├── frontend/ # Vue 3 + Vite + Pinia
│ └── remote-gateway/ # Guacamole Lite
└── docs/ # VitePress 文档站 + 技术文档
├── configuration/ # 配置文档(CORS、Docker、环境变量)
├── deployment/ # 部署文档(Nginx、CDN)
├── contributing/ # 贡献指南
├── technical/ # 技术文档(技术债务报告)
└── guide/ # 用户指南