从 Simple-FR 拆出 Platform.Server 并重命名为 MiGu.Server;frontends 源码与构建脚本迁入本仓库。地图监控在 projection/cars 失败或为空时回退 reflection 车辆列表;Simple 仓库已移除旧 Platform.Server。 Co-authored-by: Cursor <cursoragent@cursor.com>
69 lines
2.6 KiB
Markdown
69 lines
2.6 KiB
Markdown
# Migu2.0
|
||
|
||
「**迷毂 · 智能调度平台**」后端仓库。由原 Simple-FR monorepo 中的 `Platform.Server` 拆出并重命名为 **`MiGu.Server`**。
|
||
|
||
## 仓库结构
|
||
|
||
```
|
||
Migu2.0/
|
||
├── MiGu.Server/ # ASP.NET Core 8 主入口(Kestrel :8080 + YARP + 静态 SPA)
|
||
│ ├── wwwroot/ # 已构建的平台前端(克隆即可运行)
|
||
│ └── data/ # 运行时配置持久化(config-*.json,git 忽略)
|
||
├── frontends/ # 平台 Vue 源码(simple-platform-vue)
|
||
├── build-platform-frontend.bat
|
||
├── ARCHITECTURE.md # 总体架构(已从 Simple 移植并更新路径)
|
||
├── PLATFORM_V3_CHANGES.md
|
||
└── Doc/ # 代码复审记录
|
||
```
|
||
|
||
## 与 Simple 仓库的关系
|
||
|
||
| 组件 | 本仓库 | Simple 仓库 (`../Simple`) |
|
||
|------|--------|---------------------------|
|
||
| 平台后端 | **MiGu.Server** | 已移除 `Platform.Server` |
|
||
| 调度内核 | — | SimpleLite |
|
||
| 前端源码 | `frontends/apps/simple-platform-vue` | 已迁出 |
|
||
| 前端构建 | `.\build-platform-frontend.bat` → `MiGu.Server/wwwroot` | — |
|
||
|
||
登录后 `MiGu.Server` 按所选启动模式拉起 **SimpleLite.exe**。开发环境路径见 `MiGu.Server/appsettings.Development.json`(默认指向 `../Simple/SimpleLite/bin/Debug`)。
|
||
|
||
## 快速启动
|
||
|
||
```pwsh
|
||
cd MiGu.Server
|
||
dotnet run
|
||
# 浏览器: http://localhost:8080/login
|
||
# 默认账号: admin/admin、ops/ops(仅开发用)
|
||
```
|
||
|
||
仅调试平台 UI、不拉 SimpleLite:将 `appsettings.json` 中 `SimpleLite.Enabled` 设为 `false`。
|
||
|
||
## 配置 SimpleLite(开发机)
|
||
|
||
1. 在 Simple 仓库编译内核:
|
||
|
||
```pwsh
|
||
cd ..\Simple
|
||
dotnet build SimpleLite\SimpleLite.csproj -c Debug
|
||
```
|
||
|
||
2. 打开 **`MiGu.Server/appsettings.json`**,找到 **`"SimpleLite"`**,确认 `ExecutablePath` 指向你的 `SimpleLite.exe`(默认相对路径 `..\\..\\Simple\\SimpleLite\\bin\\Debug\\SimpleLite.exe`)。也可访问 **http://localhost:8080/api/health/simplelite** 查看是否解析成功。
|
||
|
||
3. 启动 MiGu.Server 后登录,选择「本地 + Web」或「仅 Web」即可拉起 SimpleLite。
|
||
|
||
详细说明见 [MiGu.Server/README.md — 配置 SimpleLite 路径](MiGu.Server/README.md#配置-simplelite-路径)。
|
||
|
||
## 文档
|
||
|
||
- [MiGu.Server/README.md](MiGu.Server/README.md) — 部署、YARP、鉴权、联调
|
||
- [ARCHITECTURE.md](ARCHITECTURE.md) — 架构总览
|
||
- [PLATFORM_V3_CHANGES.md](PLATFORM_V3_CHANGES.md) — V3 变更说明
|
||
|
||
## 更新前端
|
||
|
||
```pwsh
|
||
# 在本仓库根目录
|
||
.\build-platform-frontend.bat
|
||
# 产物同步到 MiGu.Server\wwwroot\
|
||
```
|