# yao-env
**Repository Path**: yao-coder/yao-env
## Basic Information
- **Project Name**: yao-env
- **Description**: 面向全栈开发者的 Windows 桌面开发环境控制台。
用 Tauri 2 + React + Rust 打造,把本机与服务器上分散的开发环境、项目、运行时、端口进程、数据库容器、SSH 资产统一汇总到一个界面,实现一处发现问题、定位根因、切换版本、编排启动、查看部署。康分诊断+修复建议、SSH 只读运维与远程日志、环境快照对比,以及全局隐私脱敏模式
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2026-06-18
- **Last Updated**: 2026-06-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

# DevStation
**面向全栈开发者的 Windows 桌面开发环境控制台**
**A one-stop Windows desktop console for full-stack development environments**
[](https://tauri.app)
[](https://react.dev)
[](https://www.typescriptlang.org/)
[](https://www.rust-lang.org/)



**[中文](#中文文档)** · **[English](#english)**
---
## 中文文档
DevStation 是一款面向全栈开发工程师的 **Windows 桌面端开发环境控制台**,把分散在本机和服务器上的开发环境、项目、运行时、端口、进程、数据库、容器、SSH 资产统一汇总,做到 **一处发现问题、定位问题、切换环境、启动项目、查看部署状态**。
设计风格参考 ClaudeCode GUI——克制、工程感、低饱和度高级灰棕,内置 **深色 / 浅色 / Claude 暖橙** 三套主题。
### ✨ 它解决什么问题
- 本机装了多个 Node / JDK / Python / Go,不同项目要求不同版本,切换繁琐、`JAVA_HOME` 指向不清
- 项目起不来,不知道是端口、环境变量、依赖、运行时还是 Docker 的问题
- Nginx、PM2、systemd、Docker 容器分散在各处命令里,服务器部署久了不知道哪个域名对应哪个服务
- 本机和服务器环境差异大,排查成本高;SSH 账号、密钥、端口、项目路径管理混乱
- 想把环境状态发给 AI 分析,又怕截图里带出敏感信息
### 📥 下载安装
> Windows 10 / 11(x64)。安装包免管理员、装到当前用户目录;首次运行若缺 WebView2 会自动下载。
**方式一:直接下载安装包(推荐)** —— 前往 **[Gitee Releases](https://gitee.com/yao-coder/yao-env/releases)** 下载最新的 `DevStation_<版本>_x64-setup.exe`,双击安装。
> ⚠️ 安装包暂未做代码签名,Windows SmartScreen 可能提示「未知发布者」——点「更多信息 → 仍要运行」即可(代码签名证书就绪后该提示会消失)。
**方式二:命令行一键安装**(需对应清单已提交/自建源,见 [`packaging/`](./packaging))
```powershell
winget install YaoCoder.DevStation # winget
scoop install devstation # scoop(需先把清单加入你的 bucket)
```
**自动更新**:安装版在「设置 → 关于 → 检查更新」可在线检测并一键升级(更新源为本仓库的 [`latest.json`](./latest.json))。
### 🖥️ 界面总览(三主题)
同一「总览」页在三套主题下的真实渲染——所有颜色走 CSS Token,零硬编码:
| Claude 暖橙(默认) | 浅色 Light | 深色 Dark |
| :---: | :---: | :---: |
|
|
|
|
### 🧩 核心功能
#### 总览 Dashboard
- 五维 **健康评分**(系统 / 网络 / 服务 / 项目 / 安全),颜色分级一眼看清
- 关键指标 6 宫格:运行中服务、监听端口、项目数、待办问题、环境变量、Git 状态
- 本机状态卡:OS、运行时长、CPU / 内存 / 磁盘占用进度条、网络吞吐
- 项目概览 / 服务器概览 Top 5 表,带运行状态、技术栈徽章、端口、在线状态
- 最近问题卡(P1–P4 严重度筛选)+ 6 个快捷入口,一键全局刷新
#### 本机环境 Local Environment
- **Node / Java / Python / Go 多版本检测**:扫描 nvm-windows、Volta、fnm、Scoop、pyenv-win、conda、Program Files 等来源,从目录名推断版本(无子进程开销),标注当前激活项与 LTS / EOL 状态
- 一键 **版本切换**(会话级 / 项目级 / 全局级),切换前弹风险确认
- `JAVA_HOME` / `M2_HOME` / `GRADLE_HOME` 指向错配告警;Maven / Gradle、统一版本管理器(mise/asdf/proto)、系统包管理器(Scoop/winget/Choco)、Node 包管理器(npm/pnpm/yarn/corepack)一览
- **项目兼容性**面板:用项目要求(Node/Java 版本)对比当前运行时,给出 兼容 / 部分 / 不兼容 判定
- 环境变量摘要 + 运行时规则诊断(NODE / JAVA / PYTHON / GO 分类)
#### 项目工作区 Projects
- 项目卡片网格,自动识别 **技术栈**(Vue / React / Next.js / Vite / Spring Boot / Node / Docker / Hexo / 静态站点…)
- **全盘自动扫描**发现项目(marker 预筛 + 按盘并发,实测 17.4s→6.3s),或原生目录选择器手动添加
- 卡片元信息:包管理器、默认端口、运行时要求、启动命令;monorepo 子项目计数
- 项目详情页:模块、Git、诊断、运行时控制(启动 / 停止)
#### 启动编排 Launch Orchestration
- 按依赖顺序 **编排启动** 项目与数据库服务,串行 / 并行可切,支持失败回滚
- 依赖流水线轨道实时显示每步阶段(空闲 / 启动中 / 运行 / 崩溃 / 停止)
- 启动顺序表:逐项启停、上下移、移除;运行时显示已运行时长
- **预设场景**(创建 / 重命名 / 删除多套编排配置)
- 聚合实时启动日志台:按项目分页过滤、全屏查看;一键全部启动 / 全部停止
#### 端口进程 Ports & Processes
- 经 IPHLPAPI **实时扫描** TCP/UDP 监听端口,关联进程详情
- 健康分类:正常 / 冲突 / 空闲 / 高危,统计卡 + 状态页签
- 可过滤表:端口、协议、状态、进程、PID、归属、启动时间;跨字段实时搜索;系统进程显隐
- **进程关系**面板:父进程、树深度、占端口的亲缘进程、监听地址;进程详情(路径 / 命令行 / 内存 / 用户 / 父 PID)
- 单个或批量 **结束进程**(行内二次确认);端口报告导出 JSON
#### 数据库与服务 Databases & Services
- 按数据库类型聚合卡(MySQL / PostgreSQL / Redis / Oracle / MongoDB… 共 18 类),统计本地服务 + Docker 容器数
- 扫描 Windows 服务中注册的数据库实例,**启停服务**(UAC 提权)+ TCP 端口连通性探测
- 服务表:状态、启动类型、PID、配置路径;路径一键复制 / 资源管理器定位
- **Docker 容器**区(镜像、状态、端口映射);数据库诊断(本地与容器端口冲突、MongoDB `--auth` 配置)
- 已安装数据库客户端栏(Navicat / DBeaver / DataGrip…)一键启动
#### 诊断中心 Diagnostics
- **环境健康评分**仪表 + 八维度拆解;关键问题表(优先级 / 状态 / 影响)
- **根因分析**卡(因果链 + 证据)与 **修复建议**卡(自动 / 手动两栏,命令一键复制)
- 系统级动作:打开 hosts 文件、环境变量编辑器
- **报告导出**(4 种范围 × Markdown / JSON / TXT)、存为快照、按问题或按规则抑制
#### 服务器管理 Server Management
- 服务器名册,SSH 密码 / 私钥认证,**首连主机指纹确认**,支持 **ProxyJump 多层跳板**(最多 4 跳,带环检测)
- **只读扫描**远程:系统信息、服务、诊断、安全配置、已部署项目
- 运维控制台:本机 Docker 容器 与 远程 Docker / Nginx / PM2 / systemd 的 启动 / 停止 / 重启 / 重载
- 预编译 **安全命令模板**(诊断 / 巡检 / 服务 / 系统信息)
- 内置 **SFTP** 文件浏览器(上传 / 下载 / 编辑 / 删除 / mkdir / 重命名)
#### 服务器日志 Server Logs
- 服务器 / 日志源树,按名称或 IP 搜索,**收藏夹**置顶常看日志源
- 自动发现日志源(systemd / PM2 / Docker / Nginx)
- 关键词搜索 + 日志级别过滤;静态拉取(100–2000 行可调)或 **实时流式**(启动 / 暂停)
- IPv4 **隐私打码**、行号、自动滚动、一键复制全部、全屏
#### 系统设置 Settings
- 主题(深色 / 浅色 / Claude 暖橙)、语言切换(中 / 英)
- 开机自启(写入注册表)、启动后最小化、关闭到托盘
- 启动时自动扫描、定时重扫间隔(5m/15m/30m/1h/关)
- 数据 / 配置 / 日志目录展示(打开 / 复制)、隐私模式默认、抑制规则管理、版本与 License
#### 更多页面
- **环境快照对比 Snapshots**:为环境状态打快照(标签 + 备注),勾选两份对比 PATH / 环境变量 / 运行时差异,按变更类型过滤,给出影响评估(受影响项目 / 服务 / 风险级),导出对比报告
- **隐私模式 Privacy**:左右双栏对比「原始值 vs 脱敏值」共 9 类敏感字段(用户名 / 主机名 / IPv4 / MAC / 数据目录 / 项目路径 / 服务器地址 / SSH 用户 / 密钥路径),导出仅含脱敏值的安全报告——所见即所得,可放心发给 AI
- **Shell 诊断 ShellDiagnose**:PATH 分段溯源与冲突检测(谁覆盖了谁)、Shell 配置文件、PowerShell ExecutionPolicy、hosts 可疑项、六来源代理矩阵、WSL 发行版与 `.wslconfig`、Hyper-V / VMP / 应用执行别名
> 隐私模式为全局开关:任何敏感字段统一走 `` 组件渲染,脱敏不可逆。
### 🛠️ 技术栈
| 层 | 选型 |
| --- | --- |
| 桌面框架 | **Tauri 2**(Rust 内核 + 系统 WebView,tray-icon / autostart / dialog / shell 插件) |
| 前端 | **React 18** + **TypeScript**(strict) + **Vite 6** + **Tailwind CSS 3** + **Zustand 5** + React Router 6 |
| 后端 | **Rust 2021** + tokio + **rusqlite**(bundled SQLite) + sysinfo + chrono / uuid / serde |
| SSH / SFTP | **russh** + russh-sftp(纯 Rust async,ed25519 / rsa / ProxyJump / openssh known_hosts) |
| 容器 | **bollard**(named pipe / unix socket 连本机 Docker daemon) |
| 系统集成 | `windows` / `winreg`(Win32 SCM / 注册表 / WSL / 服务)、**keyring**(Windows 凭据管理器 / DPAPI) |
| 国际化 | react-i18next,zh-CN / en-US,14 个命名空间 |
| 可视化 | 圆环 / sparkline / 徽章 / 图标 **全部手写 SVG**,不引图表库 |
| 打包 | **NSIS**(简体中文 + English) |
### 🏗️ 架构
数据自下而上单向流动,前后端类型双向同步,UI 订阅单一快照源:
```
React 页面 (13) ──订阅──▶ Zustand stores(单一快照源, localStorage 持久化)
▲ │
│ ipc/client.ts(typed helper, 浏览器预览有 mock)
│ │
└──────────────── 89 个 #[tauri::command] ◀── Rust ipc/ 层
│
adapters/(系统集成层)
runtime · project · ssh · service · shell · network · snapshot · credentials
│
Win32 SCM · 凭据管理器 · PowerShell · PATH · 注册表 · WSL · Docker · 远程 SSH
│
JSON 仓库(projects/servers/snapshots)+ 凭据管理器(密钥)
```
要点:
- **类型双向同步**:每个 IPC 命令同时改 Rust `#[tauri::command]` + struct + TS `types.ts` + `client.ts`,前端禁止用 `any` 接返回
- **错误码枚举**:`Result`,`code` 取自稳定 `ErrorCode` 枚举,前端按 code 分支而非匹配文案
- **单一快照源**:跨页共享数据(如 `LocalSystemInfo`)放 `useSystemStore`,App 启动扫一次,全页订阅
- **凭据安全**:密钥/口令存 Windows 凭据管理器(keyring),命名空间 `ssh:server::password`
- **三主题 + i18n + 隐私** 为横切关注点,组件层统一约束
### 📊 工程质量
| 指标 | 数值 |
| --- | --- |
| IPC 命令(`#[tauri::command]`) | **89** |
| 功能页 | **13** |
| Rust 单元测试 | **717** |
| 前端单元测试(Vitest) | **547**(30 个测试文件) |
| Rust 源文件 / 前端源文件 | 87 / 103 |
| i18n 命名空间(zh + en) | 14 |
> 约定:每个新模块(utils / store / Rust adapter)至少带 1 个单测,不允许"测试以后补"。
### 🚀 快速开始
> 终端用户请看上方「下载安装」;本节是**从源码构建**(开发者)。打包并发布到 Gitee 的完整流程见 [`packaging/RELEASE.md`](./packaging/RELEASE.md)。
**前置要求**
- Windows 10 / 11(x64)
- [Node.js](https://nodejs.org) ≥ 18.18、[pnpm](https://pnpm.io) ≥ 9(仓库已用 `packageManager` 锁定 pnpm 10.33)
- [Rust](https://rustup.rs) ≥ 1.77(stable)+ MSVC 构建工具
- WebView2 运行时(Windows 11 已预装)
**安装与运行**
```bash
pnpm install # 安装依赖
pnpm tauri:dev # 开发:启动 Vite(:1420)并拉起 Tauri 原生窗口
pnpm dev # 仅前端(浏览器 http://localhost:1420,IPC 走 mock)
pnpm tauri:build # 产出 NSIS 安装包(简体中文 + English)
```
**质量闸门**
```bash
pnpm lint # ESLint(--max-warnings 0)
pnpm typecheck # tsc --noEmit
pnpm test # 前端 Vitest
cd apps/desktop/src-tauri && cargo test # 后端 Rust 测试
```
### 📁 仓库结构
```
yao-env/
├─ apps/desktop/ # Tauri 2 桌面应用
│ ├─ src/ # React 前端
│ │ ├─ pages/ # 13 个功能页
│ │ ├─ components/ # 共享组件(AppShell / Sidebar / Modal / Sensitive…)
│ │ ├─ stores/ # Zustand 状态(单一快照源)
│ │ ├─ ipc/ # client.ts(typed)+ types.ts
│ │ ├─ utils/ # 诊断规则 / 健康分 / 格式化(均带单测)
│ │ ├─ i18n/ # zh-CN / en-US(14 命名空间)
│ │ └─ theme/ # CSS Token(dark / light / claude)
│ └─ src-tauri/ # Rust 后端
│ ├─ src/ipc/ # 89 个 #[tauri::command]
│ ├─ src/adapters/ # 系统集成(runtime/project/ssh/service/shell/network…)
│ └─ tauri.conf.json
├─ docs/ # 开发文档(CONVENTIONS / PROGRESS / SSH_ADAPTER_LLD)
├─ images/ # 产品成品效果图(本 README 使用)
├─ product-design-images/ # 设计稿(UI 实现契约)
├─ fullstack-dev-env-manager-prd-polished.md # 产品 PRD(v1.3.0)
├─ COMMIT_CONVENTION.md # 提交规范
└─ pnpm-workspace.yaml
```
### 📚 文档
- 产品 PRD:[fullstack-dev-env-manager-prd-polished.md](./fullstack-dev-env-manager-prd-polished.md)(v1.3.0)
- 开发约定:[docs/CONVENTIONS.md](./docs/CONVENTIONS.md) — UI / 数据流 / IPC / 提交规范,**写代码前必读**
- 开发进度:[docs/PROGRESS.md](./docs/PROGRESS.md)
- SSH 适配器设计:[docs/SSH_ADAPTER_LLD.md](./docs/SSH_ADAPTER_LLD.md)
- 提交规范:[COMMIT_CONVENTION.md](./COMMIT_CONVENTION.md)
### 📄 License
**闭源商业软件(Closed-source commercial software)**,不开放源代码、不接受外部代码贡献。
第三方依赖的开源 License 在应用 About 页与官网"开源致谢"页集中展示。
---
## English
DevStation is a **Windows desktop console for full-stack development environments**. It unifies everything scattered across your local machine and remote servers — dev environments, projects, runtimes, ports, processes, databases, containers, SSH assets — so you can **spot issues, diagnose them, switch environments, launch projects, and inspect deployments in one place**.
The visual language follows the ClaudeCode GUI — restrained, engineering-grade, low-saturation warm greys — and ships with **Dark / Light / Claude (warm)** themes.
### ✨ What it solves
- Multiple Node / JDK / Python / Go versions on one machine, each project wanting a different one — switching is tedious and `JAVA_HOME` is unclear
- A project won't start and it's unclear whether the culprit is a port, an env var, a dependency, the runtime, or Docker
- Nginx, PM2, systemd, and Docker containers live in scattered commands; over time you forget which domain maps to which service
- Local and server environments drift apart; SSH accounts, keys, ports, and project paths are a mess to track
- You want to send your environment state to an AI for analysis, but screenshots leak sensitive information
### 📥 Download & install
> Windows 10 / 11 (x64). The installer needs no admin rights and installs per-user; WebView2 is auto-downloaded on first run if missing.
**Option 1 — download the installer (recommended)** — grab the latest `DevStation__x64-setup.exe` from **[Gitee Releases](https://gitee.com/yao-coder/yao-env/releases)** and double-click to install.
> ⚠️ The installer is not yet code-signed, so Windows SmartScreen may warn about an "unknown publisher" — click **More info → Run anyway** (the warning goes away once a signing certificate is in place).
**Option 2 — one-line install** (requires the manifests to be published; see [`packaging/`](./packaging))
```powershell
winget install YaoCoder.DevStation # winget
scoop install devstation # scoop (add the manifest to your bucket first)
```
**Auto-update**: the installed app checks and updates in place via **Settings → About → Check for updates** (source: this repo's [`latest.json`](./latest.json)).
### 🖥️ Interface at a glance (three themes)
The same **Dashboard** rendered in all three themes — every color comes from CSS tokens, zero hard-coded hex:
| Claude (default) | Light | Dark |
| :---: | :---: | :---: |
|
|
|
|
### 🧩 Core features
#### Dashboard
- Five-dimension **health score** (System / Network / Service / Project / Security) with color-coded status
- Six key-metric chips: running services, listening ports, project count, open issues, env vars, git status
- Local status card: OS, uptime, CPU / Memory / Disk bars, network throughput
- Top-5 project & server overview tables with runtime status, stack badges, ports, online state
- Recent-issues card (P1–P4 severity filter) + six quick actions, one-click global refresh
#### Local Environment
- **Multi-version detection for Node / Java / Python / Go** — scans nvm-windows, Volta, fnm, Scoop, pyenv-win, conda, Program Files…; infers versions from directory names (no subprocess overhead); marks the active install and LTS / EOL status
- One-click **version switching** (session / project / global scope) with a pre-switch risk confirmation
- `JAVA_HOME` / `M2_HOME` / `GRADLE_HOME` mismatch warnings; overview of Maven/Gradle, unified managers (mise/asdf/proto), OS package managers (Scoop/winget/Choco), Node package managers (npm/pnpm/yarn/corepack)
- **Project compatibility** panel comparing project requirements against active runtimes (Compatible / Partial / Incompatible)
- Env-var summary + runtime-rule diagnostics (NODE / JAVA / PYTHON / GO categories)
#### Project Workspace
- Project card grid with auto-detected **tech stack** (Vue / React / Next.js / Vite / Spring Boot / Node / Docker / Hexo / static site…)
- **Full-disk auto-scan** discovery (marker pre-filter + per-drive concurrency, measured 17.4s → 6.3s) or a native directory picker
- Card metadata: package manager, default port, runtime requirements, start command; monorepo sub-project count
- Project detail page with modules, git, diagnostics, and runtime control (start / stop)
#### Launch Orchestration
- **Orchestrate** projects and database services in dependency order — sequential or parallel, with rollback-on-failure
- Dependency pipeline rail with live phase badges (Idle / Starting / Running / Crashed / Stopped)
- Launch-order table: per-step start/stop, move up/down, remove; live uptime when running
- **Preset scenarios** (create / rename / delete named orchestration configs)
- Aggregated real-time launch-log console with per-project tab filtering and fullscreen; launch-all / stop-all
#### Ports & Processes
- **Real-time port scanning** via IPHLPAPI for TCP/UDP listeners with process details
- Health classification: normal / conflict / idle / high-risk, with stat cards and status tabs
- Filterable table (port, protocol, state, process, PID, owner, start time); cross-field live search; system-process toggle
- **Process relations** panel (parent, tree depth, port-holding relatives, listen addresses) + process detail (path / cmdline / memory / user / parent PID)
- Single or bulk **process termination** with inline confirmation; port report export to JSON
#### Databases & Services
- Aggregate cards per database type (MySQL / PostgreSQL / Redis / Oracle / MongoDB… 18 kinds) counting local services + Docker containers
- Scan registered DB instances in Windows services, **start/stop** (UAC elevation) + TCP port-probe connectivity test
- Services table: state, start type, PID, config paths; copy path / reveal in Explorer
- **Docker containers** section (image, state, port mapping); DB diagnostics (local-vs-container port conflicts, MongoDB `--auth`)
- Detected DB clients bar (Navicat / DBeaver / DataGrip…) with launch buttons
#### Diagnostics
- **Environment health-score** gauge with an 8-dimension breakdown; key-issues table (priority / status / impact)
- **Root-cause analysis** card (causal chain + evidence) and **recommended fix** card (auto / manual tabs, copy command)
- System actions: open the hosts file and the environment-variable editor
- **Report export** (4 scopes × Markdown / JSON / TXT), save as snapshot, per-issue or rule-wide suppression
#### Server Management
- Server roster, SSH password / private-key auth, **host-key fingerprint confirmation** on first connect, **multi-hop ProxyJump** tunneling (up to 4 hops, cycle detection)
- **Read-only scans** of remote servers: system info, services, diagnostics, security config, deployed projects
- Ops control board for local Docker containers and remote Docker / Nginx / PM2 / systemd (start / stop / restart / reload)
- Pre-compiled **safe-command templates** (diagnostics / inspection / services / system info)
- Built-in **SFTP** file browser (upload / download / edit / delete / mkdir / rename)
#### Server Logs
- Server / log-source tree, search by name or IP, **favorites** to pin frequently watched sources
- Auto-discovery of log sources (systemd / PM2 / Docker / Nginx)
- Keyword search + level filter; static fetch (100–2000 lines) or **real-time streaming** (start / pause)
- IPv4 **privacy masking**, line numbers, auto-scroll, copy-all, fullscreen
#### Settings
- Theme (Dark / Light / Claude), language switch (zh / en)
- Launch at startup (registry sync), start minimized, close to tray
- Auto-scan on startup, periodic rescan interval (5m/15m/30m/1h/off)
- Data / config / log directory display (open / copy), privacy default, suppressed-rule management, version & license
#### More pages
- **Snapshots** — capture environment state (label + note), compare two snapshots for PATH / env-var / runtime diffs, filter by change type, view impact assessment (affected projects / services / risk level), export a comparison report
- **Privacy** — side-by-side "raw vs masked" comparison across 9 sensitive field types (username / hostname / IPv4 / MAC / data dir / project path / server host / SSH user / key path); export a masked-only report that's safe to share with an AI
- **Shell Diagnostics** — PATH segment attribution & collision detection (who shadows whom), shell profiles, PowerShell ExecutionPolicy, suspicious hosts entries, six-source proxy matrix, WSL distros & `.wslconfig`, Hyper-V / VMP / app execution aliases
> Privacy mode is a global switch: every sensitive field renders through a single `` component, and masking is irreversible.
### 🛠️ Tech stack
| Layer | Choice |
| --- | --- |
| Desktop | **Tauri 2** (Rust core + system WebView; tray-icon / autostart / dialog / shell plugins) |
| Frontend | **React 18** + **TypeScript** (strict) + **Vite 6** + **Tailwind CSS 3** + **Zustand 5** + React Router 6 |
| Backend | **Rust 2021** + tokio + **rusqlite** (bundled SQLite) + sysinfo + chrono / uuid / serde |
| SSH / SFTP | **russh** + russh-sftp (pure-Rust async; ed25519 / rsa / ProxyJump / openssh known_hosts) |
| Containers | **bollard** (named pipe / unix socket to the local Docker daemon) |
| System integration | `windows` / `winreg` (Win32 SCM / registry / WSL / services), **keyring** (Windows Credential Manager / DPAPI) |
| i18n | react-i18next, zh-CN / en-US, 14 namespaces |
| Visualization | rings / sparklines / badges / icons are **hand-written SVG** — no charting library |
| Packaging | **NSIS** (Simplified Chinese + English) |
### 🏗️ Architecture
Data flows one way, bottom-up; types are kept in sync on both sides; the UI subscribes to a single snapshot source:
```
React pages (13) ──subscribe──▶ Zustand stores (single snapshot source, localStorage)
▲ │
│ ipc/client.ts (typed helper, mocked in browser preview)
│ │
└────────────────── 89 × #[tauri::command] ◀── Rust ipc/ layer
│
adapters/ (system-integration layer)
runtime · project · ssh · service · shell · network · snapshot · credentials
│
Win32 SCM · Credential Manager · PowerShell · PATH · registry · WSL · Docker · remote SSH
│
JSON repositories (projects/servers/snapshots) + Credential Manager (secrets)
```
Principles:
- **Two-way type sync** — every IPC command touches Rust `#[tauri::command]` + struct + TS `types.ts` + `client.ts`; the frontend never types IPC results as `any`
- **Error-code enum** — `Result` with a stable `ErrorCode`; the frontend branches on `code`, not on message text
- **Single snapshot source** — shared data (e.g. `LocalSystemInfo`) lives in `useSystemStore`; one scan at boot, every page subscribes
- **Credential safety** — secrets stored in Windows Credential Manager via `keyring`, namespaced `ssh:server::password`
- **Three themes + i18n + privacy** are cross-cutting concerns enforced at the component layer
### 📊 Engineering quality
| Metric | Value |
| --- | --- |
| IPC commands (`#[tauri::command]`) | **89** |
| Feature pages | **13** |
| Rust unit tests | **717** |
| Frontend unit tests (Vitest) | **547** (30 files) |
| Rust / frontend source files | 87 / 103 |
| i18n namespaces (zh + en) | 14 |
> Convention: every new module (util / store / Rust adapter) ships with at least one test — no "tests later".
### 🚀 Getting started
> End users: see "Download & install" above. This section covers **building from source** (developers). For packaging and publishing to Gitee, see [`packaging/RELEASE.md`](./packaging/RELEASE.md).
**Prerequisites**
- Windows 10 / 11 (x64)
- [Node.js](https://nodejs.org) ≥ 18.18, [pnpm](https://pnpm.io) ≥ 9 (the repo pins pnpm 10.33 via `packageManager`)
- [Rust](https://rustup.rs) ≥ 1.77 (stable) + MSVC build tools
- WebView2 runtime (preinstalled on Windows 11)
**Install & run**
```bash
pnpm install # install dependencies
pnpm tauri:dev # dev: start Vite (:1420) and open the native Tauri window
pnpm dev # frontend only (browser at http://localhost:1420, IPC mocked)
pnpm tauri:build # produce the NSIS installer (Simplified Chinese + English)
```
**Quality gates**
```bash
pnpm lint # ESLint (--max-warnings 0)
pnpm typecheck # tsc --noEmit
pnpm test # frontend Vitest
cd apps/desktop/src-tauri && cargo test # backend Rust tests
```
### 📁 Project structure
```
yao-env/
├─ apps/desktop/ # Tauri 2 desktop app
│ ├─ src/ # React frontend
│ │ ├─ pages/ # 13 feature pages
│ │ ├─ components/ # shared components (AppShell / Sidebar / Modal / Sensitive…)
│ │ ├─ stores/ # Zustand state (single snapshot source)
│ │ ├─ ipc/ # client.ts (typed) + types.ts
│ │ ├─ utils/ # diagnostics rules / health score / formatting (all unit-tested)
│ │ ├─ i18n/ # zh-CN / en-US (14 namespaces)
│ │ └─ theme/ # CSS tokens (dark / light / claude)
│ └─ src-tauri/ # Rust backend
│ ├─ src/ipc/ # 89 × #[tauri::command]
│ ├─ src/adapters/ # system integration (runtime/project/ssh/service/shell/network…)
│ └─ tauri.conf.json
├─ docs/ # dev docs (CONVENTIONS / PROGRESS / SSH_ADAPTER_LLD)
├─ images/ # product screenshots (used by this README)
├─ product-design-images/ # design mockups (the UI implementation contract)
├─ fullstack-dev-env-manager-prd-polished.md # product PRD (v1.3.0)
├─ COMMIT_CONVENTION.md # commit convention
└─ pnpm-workspace.yaml
```
### 📚 Documentation
- Product PRD: [fullstack-dev-env-manager-prd-polished.md](./fullstack-dev-env-manager-prd-polished.md) (v1.3.0)
- Conventions: [docs/CONVENTIONS.md](./docs/CONVENTIONS.md) — UI / data-flow / IPC / commit rules, **read before coding**
- Progress: [docs/PROGRESS.md](./docs/PROGRESS.md)
- SSH adapter design: [docs/SSH_ADAPTER_LLD.md](./docs/SSH_ADAPTER_LLD.md)
- Commit convention: [COMMIT_CONVENTION.md](./COMMIT_CONVENTION.md)
### 📄 License
**Closed-source commercial software.** Source code is not open and external code contributions are not accepted.
Open-source licenses of third-party dependencies are listed on the in-app About page and the website's acknowledgements page.
---
DevStation · Windows desktop dev-environment console · Built with Tauri 2 · React · Rust