拾光而上,有序人生
一款使用 Rust (Tauri v2.8.0) + React 开发的现代化任务管理软件。
GuangJie/ ├── src/ # 前端源代码 │ ├── components/ # React 组件 │ │ ├── Sidebar.tsx # 侧边栏 │ │ ├── Overview.tsx # 总览页面 │ │ ├── ContributionGraph.tsx # 贡献热力图 │ │ ├── GoalProgress.tsx # 目标进度图表 │ │ ├── TaskCompletionChart.tsx # 任务完成度图表 │ │ ├── PomodoroStats.tsx # 番茄钟统计 │ │ ├── Boards.tsx # 看板页面 │ │ ├── BoardList.tsx # 看板列表 │ │ ├── BoardView.tsx # 看板视图 │ │ ├── BoardColumn.tsx # 看板列 │ │ ├── TaskCard.tsx # 任务卡片 │ │ ├── CreateBoardModal.tsx # 创建看板弹窗 │ │ ├── CreateTaskModal.tsx # 创建任务弹窗 │ │ ├── Goals.tsx # 目标页面 │ │ ├── GoalCard.tsx # 目标卡片 │ │ ├── GoalSubTargetItem.tsx # 子目标项 │ │ ├── CreateGoalModal.tsx # 创建目标弹窗 │ │ ├── Calendar.tsx # 日历页面 │ │ ├── DailyView.tsx # 日视图 │ │ ├── EventModal.tsx # 事件弹窗 │ │ ├── Pomodoro.tsx # 番茄钟页面 │ │ ├── PomodoroSettings.tsx # 番茄钟设置 │ │ ├── Profile.tsx # 个人资料 │ │ └── Settings.tsx # 设置页面 │ ├── store/ # 状态管理 │ │ └── useStore.ts # Zustand store │ ├── types/ # TypeScript 类型定义 │ │ └── index.ts │ ├── styles/ # 样式文件 │ │ └── App.css │ ├── i18n.tsx # 国际化配置 │ ├── App.tsx # 主应用组件 │ ├── main.tsx # 入口文件 │ └── index.css # 全局样式 ├── src-tauri/ # Rust 后端 │ ├── src/ │ │ ├── main.rs # 主入口 │ │ ├── state.rs # 数据结构定义 │ │ ├── commands.rs # Tauri 命令 │ │ └── storage.rs # 本地存储 │ ├── tauri.conf.json # Tauri 配置 │ ├── Cargo.toml # Rust 依赖 │ └── build.rs # 构建脚本 ├── package.json # Node 依赖 ├── tsconfig.json # TypeScript 配置 ├── vite.config.ts # Vite 配置 └── README.md # 项目说明
# 克隆仓库
git clone https://github.com/your-repo/guangjie-todo.git
cd guangjie-todo
# 安装前端依赖
pnpm install
# Rust 依赖会在构建时自动安装
# 启动开发服务器
pnpm tauri dev
# 或使用构建脚本
./build.sh dev
# 使用 Tauri 构建
pnpm tauri build
# 或使用构建脚本
./build.sh build # 生产构建
./build.sh clean # 清理构建
./build.sh all # 完整构建(清理+构建)
构建产物将位于 src-tauri/target/release/bundle/ 目录。
本项目支持在 Windows、macOS 和 Linux 三个平台上打包发布。
# Linux/macOS
./scripts/build-all-platforms.sh
# Windows (PowerShell)
.\scripts\build-all-platforms.ps1
请查看 CROSS_PLATFORM_BUILD.md 获取完整的跨平台打包指南,包括:
| 平台 | 格式 | 说明 |
|---|---|---|
| Windows | MSI, NSIS | Windows 安装程序 |
| macOS | DMG, APP | macOS 磁盘映像和应用包 |
| Linux | AppImage, DEB, RPM | 便携式应用和发行版包 |
推送带有版本标签的提交即可触发自动构建:
git tag v0.1.0 git push origin v0.1.0
构建完成后,安装包会自动上传到 GitHub Releases。
# 需要准备一个 1024x1024 的 PNG 源图
./scripts/generate-icons.sh source-icon.png
%APPDATA%\guangjie\~/Library/Application Support/guangjie/~/.config/guangjie/settings.json - 应用设置data.json - 用户数据(看板、任务、目标等)应用支持以下语言(可在设置中切换):
提供 4 种主题:
应用支持自动更新检测:
src/components/ 创建新组件src/store/useStore.ts 添加状态和方法src-tauri/src/commands.rs 添加后端命令(如需要)src/i18n.tsx 添加多语言翻译// 前端调用
import { invoke } from '@tauri-apps/api/core';
const result = await invoke('command_name', { param1: value1 });
// Rust 实现
#[tauri::command]
pub async fn command_name(param1: String) -> Result<(), String> {
// 实现逻辑
Ok(())
}
MIT
GuangJie Team
拾光而上,有序人生 🌟