iven e429448c42
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
feat(plugin): P2-P4 插件平台演进 — 通用服务 + 质量保障 + 市场
P2 平台通用服务:
- manifest 扩展: settings/numbering/templates/trigger_events/importable/exportable 声明
- 插件配置 UI: PluginSettingsForm 自动表单 + 后端校验 + 详情抽屉 Settings 标签页
- 编号规则: Host API numbering-generate + PostgreSQL 序列 + manifest 绑定
- 触发事件: data_service create/update/delete 自动发布 DomainEvent
- WIT 接口: 新增 numbering-generate/setting-get Host API

P3 质量保障:
- plugin_validator.rs: 安全扫描(WASM大小/实体数量/字段校验) + 复杂度评分
- 运行时监控指标: RuntimeMetrics (错误率/响应时间/Fuel/内存)
- 性能基准: BenchmarkResult 阈值定义
- 上传时自动安全扫描 + /validate API 端点

P4 插件市场:
- 数据库迁移: plugin_market_entries + plugin_market_reviews 表
- 前端 PluginMarket 页面: 分类浏览/搜索/详情/评分
- 路由注册: /plugins/market

测试: 269 全通过 (71 erp-plugin + 41 auth + 57 config + 34 core + 50 message + 16 workflow)
2026-04-19 12:16:24 +08:00

ERP Platform Base

模块化商业 SaaS ERP 平台底座。

技术栈

层级 技术
后端 Rust (Axum 0.8 + SeaORM + Tokio)
数据库 PostgreSQL 16+
缓存 Redis 7+
前端 Vite + React 18 + TypeScript + Ant Design 5

项目结构

erp/
├── crates/
│   ├── erp-core/          # 基础类型、错误、事件总线、模块 trait
│   ├── erp-common/        # 共享工具
│   ├── erp-auth/          # 身份与权限 (Phase 2)
│   ├── erp-workflow/      # 工作流引擎 (Phase 4)
│   ├── erp-message/       # 消息中心 (Phase 5)
│   ├── erp-config/        # 系统配置 (Phase 3)
│   └── erp-server/        # Axum 服务入口
│       └── migration/     # SeaORM 数据库迁移
├── apps/web/              # React SPA 前端
├── docker/                # Docker 开发环境
└── docs/                  # 文档

快速开始

1. 启动基础设施

cd docker && docker compose up -d

2. 启动后端

cargo run -p erp-server

3. 启动前端

cd apps/web && pnpm install && pnpm dev

4. 访问

开发命令

cargo check                        # 编译检查
cargo test --workspace             # 运行测试
cargo run -p erp-server            # 启动后端
cd apps/web && pnpm dev            # 启动前端
Description
No description provided
Readme 20 MiB
Languages
Rust 51.6%
HTML 23.7%
TypeScript 18.2%
Python 4.9%
CSS 1.2%
Other 0.4%