| Desktop | Renderer | Language | Terminal | Editor | Protocols | Tooling |
|---|---|---|---|---|---|---|
main process ████████████████████ Electron services, IPC, protocol lifecycle
preload bridge ████████████████░░░░ Secure API boundary for renderer
renderer UI ███████████████████░ React workspace, tabs, files, terminal
protocols ███████████████░░░░░ SSH shell, SFTP, FTP adapters
theme system ████████████████░░░░ tokens -> vars -> skins -> terminal colors远程工作每天都在发生,但工具常常被割裂成终端、文件管理器、传输窗口和连接配置。TermDock 想做的是一个真正面向日常工作的桌面 remote workspace:
- 开 SSH 时,终端和 SFTP 文件面板自然联动。
- 开 FTP 时,界面直接进入 file-only 工作流。
- 多个连接通过 tabs 并行存在,不互相打断。
- 上传、下载、进度和错误状态进入统一 transfer system。
- 连接配置、工作区状态和主题体验都为长期使用而设计。
第一版目标不是“支持所有协议”,而是把 SSH / SFTP / FTP 这条最高频链路做稳、做顺、做漂亮。
| 能力 | 状态 | 说明 |
|---|---|---|
| SSH profile 管理 | 已完成 | 新增、编辑、删除、文件夹分组、JSON 文件持久化 |
| FTP profile 管理 | 已完成 | 独立于 SSH 的连接模型 |
| SSH shell | 已完成 | xterm.js 渲染、输入输出、自适应 resize、搜索、剪贴板互通 |
| 文件编辑器 | 已完成 | Monaco Editor 提供语法高亮、编辑、查找替换、远程文件直编 |
| SFTP 文件管理 | 已完成 | 远程目录浏览、读/写/新建/删除/重命名/权限修改 |
| FTP 文件管理 | 已完成 | FTP 会话与远程文件能力 |
| Transfer center | 已完成 | 上传下载任务队列、进度、速度、取消、文件/文件夹递归 |
| Workspace tabs | 已完成 | 多标签并行连接、断开/重连、session 状态持久化 |
| Theme system | 已完成 | tokens → CSS vars → skin,深色/浅色主题一键切换 |
| 远程连接状态 | 已完成 | 连接状态提示、系统资源监控面板 |
| 命令模板 | 已完成 | 快捷命令模板、文件夹分组、参数占位符、一键发送 |
| 窗口管理 | 已完成 | 主窗口、连接管理器、命令管理器、文件编辑器独立窗口 |
TermDock 的核心交互里使用了两个成熟的开源项目:
- xterm.js:用于 SSH 终端渲染、输入输出和窗口 resize。
- Monaco Editor:用于文件编辑器,提供语法高亮、编辑体验和查找替换。
TermDock 从第一天就避免把远程协议揉成一个模糊的大对象。
Renderer UI
-> Application State
-> Preload API
-> IPC
-> Desktop Services
-> Session Controllers
-> Protocol Clients硬性边界:
packages/core是领域模型的 single source of truth。- Renderer 不直接访问 SSH / SFTP / FTP protocol clients。
- 所有系统能力必须走
main -> preload -> renderer。 - SSH/SFTP 与 FTP 在 controller/protocol 层保持分离。
- Transfer 进度统一进入 transfer system,不在组件里零散维护。
更完整的说明见 docs/architecture.md。
要求:
- Node.js >= 20
- npm
npm install
npm run dev常用命令:
npm run dev
npm run typecheck
npm run buildtermdock/
apps/
desktop/ # Electron + React desktop app
src/
main/ # main process, IPC, services
preload/ # secure renderer API
renderer/ # React workspace UI
packages/
core/ # domain types
storage/ # repository abstractions
shared/ # shared constants and utilities
docs/
architecture.md # architecture map
roadmap.md # product roadmap
plans/ # active and completed execution plans
decisions/ # architecture decisions
quality/ # quality and release checks
AGENTS.md # short map for human/AI collaborators当前重点:
- 稳住
SSH / SFTP / FTPMVP 主链路。 - 拆分
ipc.ts、workspace-service.ts、session-controllers.ts、App.tsx。 - 把领域类型继续收敛到
packages/core。 - 完善 transfer center、错误提示、主题和桌面体验。
- 准备 macOS / Windows 可分发版本。
完整计划见 docs/roadmap.md。
这个仓库把代码库本身当作记录系统:
AGENTS.md是入口地图,不是百科全书。- 稳定架构事实写入
docs/architecture.md。 - 跨层任务写入
docs/plans/active/。 - 已确认的架构选择写入
docs/decisions/。 .agents/extensions/用于功能草案和扩展设计。
如果你要贡献一个较大的功能,建议先补一份 active plan,再开始改代码。
感谢每一位让 TermDock 变得更好的贡献者。
|
St0ff3l |
构建了完整的后端逻辑,打通 Electron main process、IPC、会话控制、文件能力与工作区状态等核心链路。 |
|
Flashhhhhhzj |
重构并设计了前端样式,统一设计语言,推动主题 token、组件皮肤和整体视觉体验成形。 |
TermDock is a modern desktop remote workspace for developers and operations teams. It brings SSH terminals, SFTP files, FTP files, workspace tabs, and transfer tasks into one focused desktop client.
- SSH sessions with terminal and SFTP file panels.
- File editing powered by Monaco Editor.
- FTP sessions with a clean file-only workflow.
- Workspace tabs for parallel remote work.
- Unified transfer center for uploads, downloads, progress, and errors.
- A layered Electron architecture:
main -> preload -> renderer. - MIT licensed and open for collaboration.
TermDock uses two well-known open source projects in its core UI:
- xterm.js for SSH terminal rendering, input/output, and resize handling.
- Monaco Editor for file editing, syntax highlighting, and search/replace.
- StOff31 built the complete backend logic, including Electron main process services, IPC, session control, file capabilities, and workspace state.
- Flashhhhhhzj refactored and designed the frontend styling, unified the design language, and shaped the theme tokens, component skins, and visual experience.
npm install
npm run devTermDock 使用 MIT License 开源。