chore: apply cargo fmt across workspace and update docs

- Run cargo fmt on all Rust crates for consistent formatting
- Update CLAUDE.md with WASM plugin commands and dev.ps1 instructions
- Update wiki: add WASM plugin architecture, rewrite dev environment docs
- Minor frontend cleanup (unused imports)
This commit is contained in:
iven
2026-04-15 00:49:20 +08:00
parent e16c1a85d7
commit 9568dd7875
113 changed files with 4355 additions and 937 deletions

View File

@@ -5,12 +5,13 @@
**模块化 SaaS ERP 底座**Rust + React 技术栈,提供身份权限/工作流/消息/配置四大基础模块,支持行业业务模块快速插接。
关键数字:
- 8 个 Rust crate全部已实现1 个前端 SPA
- 29 个数据库迁移
- 10 个 Rust crate8 个已实现 + 2 个插件原型1 个前端 SPA
- 32 个数据库迁移
- 5 个业务模块 (auth, config, workflow, message, server)
- 2 个插件 crate (plugin-prototype Host 运行时, plugin-test-sample 测试插件)
- Health Check API (`/api/v1/health`)
- OpenAPI JSON (`/api/docs/openapi.json`)
- Phase 1-6 全部完成
- Phase 1-6 全部完成WASM 插件原型 V1-V6 验证通过
## 模块导航树
@@ -27,10 +28,14 @@
### L3 组装层
- [[erp-server]] — Axum 服务入口 · AppState · ModuleRegistry 集成 · 配置加载 · 数据库连接 · 优雅关闭
### 插件系统
- [[wasm-plugin]] — Wasmtime 运行时 · WIT 接口契约 · Host API · Fuel 资源限制 · 插件制作完整流程
### 基础设施
- [[database]] — SeaORM 迁移 · 多租户表结构 · 软删除模式
- [[infrastructure]] — Docker Compose · PostgreSQL 16 · Redis 7
- [[infrastructure]] — Windows 开发环境 · PostgreSQL 16 · Redis 7 · 一键启动脚本
- [[frontend]] — React SPA · Ant Design 布局 · Zustand 状态
- [[testing]] — 测试环境指南 · 验证清单 · 常见问题
### 横切关注点
- [[architecture]] — 架构决策记录 · 设计原则 · 技术选型理由
@@ -47,6 +52,8 @@
**ModuleRegistry 怎么工作?** 每个 Phase 2+ 的业务模块实现 ErpModule trait在 main.rs 中链式注册。registry 自动构建路由和事件处理器。
**插件系统怎么扩展业务?** 通过 [[wasm-plugin]] 的 WASM 沙箱运行第三方插件,插件通过 WIT 定义的 Host API 与系统交互。详细流程见插件制作指南。
**版本差异怎么办?** package.json 使用 React 19 + Ant Design 6比规格文档更新以实际代码为准。
## 开发进度
@@ -59,6 +66,7 @@
| 4 | 工作流引擎 | 完成 |
| 5 | 消息中心 | 完成 |
| 6 | 整合与打磨 | 完成 |
| - | WASM 插件原型 | V1-V6 验证通过 |
## 关键文档索引
@@ -66,5 +74,7 @@
|------|------|
| 设计规格 | `docs/superpowers/specs/2026-04-10-erp-platform-base-design.md` |
| 实施计划 | `docs/superpowers/plans/2026-04-10-erp-platform-base-plan.md` |
| WASM 插件设计 | `docs/superpowers/specs/2026-04-13-wasm-plugin-system-design.md` |
| WASM 插件计划 | `docs/superpowers/plans/2026-04-13-wasm-plugin-system-plan.md` |
| 协作规则 | `CLAUDE.md` |
| 设计评审 | `plans/squishy-pondering-aho-agent-a23c7497aadc6da41.md` |