feat: initialize ERP base platform (extracted from HMS)
- Stripped 11 business crates (health, ai, dialysis, plugins) - Cleaned AppState, AppConfig, main.rs from business coupling - Reduced migrations from 169 to 53 (base-only) - Removed health_provider trait from erp-core - Removed business integration tests - Removed gateway rate limiting middleware - Base capabilities: auth, RBAC, JWT, config, workflow, message, plugin, audit, crypto, RLS, multi-tenant Cargo check: OK Cargo test: OK
This commit is contained in:
64
README.md
Normal file
64
README.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# 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. 启动基础设施
|
||||
|
||||
```bash
|
||||
cd docker && docker compose up -d
|
||||
```
|
||||
|
||||
### 2. 启动后端
|
||||
|
||||
```bash
|
||||
cargo run -p erp-server
|
||||
```
|
||||
|
||||
### 3. 启动前端
|
||||
|
||||
```bash
|
||||
cd apps/web && pnpm install && pnpm dev
|
||||
```
|
||||
|
||||
### 4. 访问
|
||||
|
||||
- 前端: http://localhost:5173
|
||||
- 后端 API: http://localhost:3000
|
||||
|
||||
## 开发命令
|
||||
|
||||
```bash
|
||||
cargo check # 编译检查
|
||||
cargo test --workspace # 运行测试
|
||||
cargo run -p erp-server # 启动后端
|
||||
cd apps/web && pnpm dev # 启动前端
|
||||
```
|
||||
Reference in New Issue
Block a user