Skip to content

Commit 9b5f9f9

Browse files
committed
feat: 完善全栈基础设施 — 加密模块、AI 网关 GLM 提供商、同步服务 WebSocket 与 Redis 缓存
Client: - 新增 crypto 模块(CryptoManager、encryption 加密工具) - 新增 useMode Hook 与 ModeManager 测试 - 新增 AI 网关 Tauri 桥接模块(ai_gateway.rs) - 新增 RemoteAIPlugin、apiClient、SyncEngine、NetworkManager 单元测试 - 重构 AI 插件加载器与远程插件类型定义 - 重构存储层(StorageAdapter、storageFactory、writeWithLog) - 重构同步引擎与网络管理器 - 更新 Tauri 配置、Cargo 依赖与 capabilities - 更新 Navbar、NoteEditPage、SettingsPage 页面 Server AI Gateway: - 新增智谱 GLM 提供商(glm_provider.py) - 新增完整测试套件(providers、routers、config、errors) - 重构认证中间件与提供商基类 - 更新 DeepSeek、通义千问提供商与路由模块 Server Sync Service: - 新增 WebSocket 实时同步处理器 - 新增 Redis 缓存层 - 新增数据模型层(models、database) - 新增同步处理器与模型单元测试 - 重构同步处理器、认证中间件与主入口
1 parent 60ffe1d commit 9b5f9f9

66 files changed

Lines changed: 6081 additions & 1826 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.env.example‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ REDIS_URL=redis://localhost:6379
3434
# JWT 安全密钥(生产环境必须修改为随机字符串)
3535
JWT_SECRET=change-this-to-a-random-string-in-production
3636

37+
# Supabase JWT 公钥(从 Supabase Dashboard > Settings > API > JWT Settings 获取)
38+
# 用于后端服务验证前端 Supabase Auth 签发的 RS256 JWT
39+
SUPABASE_JWT_SECRET=
40+
41+
# Supabase 项目 URL(用于后端验证 JWT issuer)
42+
SUPABASE_URL=https://your-project-id.supabase.co
43+
3744
# 服务端口
3845
SYNC_SERVICE_PORT=8080
3946
AI_GATEWAY_PORT=8000

‎client/package.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"build": "tsc -b && vite build",
99
"lint": "oxlint",
1010
"preview": "vite preview",
11+
"tauri": "tauri",
12+
"tauri:dev": "tauri dev",
13+
"tauri:build": "tauri build",
1114
"test": "vitest run",
1215
"test:watch": "vitest"
1316
},
@@ -18,9 +21,7 @@
1821
"@tauri-apps/cli": "^2.11.4",
1922
"@tauri-apps/plugin-dialog": "^2.7.1",
2023
"@tauri-apps/plugin-fs": "^2.5.1",
21-
"@tauri-apps/plugin-os": "^2.3.2",
2224
"@tauri-apps/plugin-shell": "^2.3.5",
23-
"@tauri-apps/plugin-sql": "^2.4.0",
2425
"@tiptap/extension-highlight": "^3.27.3",
2526
"@tiptap/extension-placeholder": "^3.27.3",
2627
"@tiptap/extension-underline": "^3.27.3",

0 commit comments

Comments
 (0)