feat: scaffold gold_monitor web hub, API, PM2 deploy and docs

This commit is contained in:
dekun
2026-10-17 17:43:17 +08:00
commit fb35968a1f
35 changed files with 2080 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
# gold_monitor
MT5 **黄金** 下单辅助中控:**网页登录 → 下载通用 exe → 首次激活绑定机器/账户 → 成交上报 → 网页复盘(四周期 K 线 + 入场形式标注)**。
**远程仓库**:[https://git.bz121.com/dekun/gold_monitor.git](https://git.bz121.com/dekun/gold_monitor.git)
复盘 UI / 深色面板风格对齐本组织项目 [crypto_monitor](https://git.bz121.com/dekun/crypto_monitor.git) 的「交易记录与复盘」体验。
---
## 部署环境(必读)
| 项 | 约定 |
|----|------|
| 系统 | **Ubuntu 22.04 / 24.04** |
| 用户 | **root** |
| 路径 | **`/opt/gold_monitor`** |
| 进程 | **PM2** |
| 端口 | **5800** |
```bash
# 新服务器(推荐)
curl -fsSL https://git.bz121.com/dekun/gold_monitor/raw/branch/main/deploy/manage.sh | bash
# 或手动
cd /opt
git clone https://git.bz121.com/dekun/gold_monitor.git gold_monitor
cd /opt/gold_monitor
bash deploy/manage.sh
```
- 部署文档:[docs/deploy.md](./docs/deploy.md) · [docs/ubuntu-server.md](./docs/ubuntu-server.md)
- 使用文档:[docs/usage.md](./docs/usage.md)
- 技术文档:[docs/technical.md](./docs/technical.md)
---
## 功能导航
| 功能 | 说明 |
|------|------|
| **登录** | 网页账号(默认 admin) |
| **下载中心** | 通用辅助包 + 生成激活码 |
| **账户 / 机器** | 标注名称、备注、类型 |
| **首次激活** | exe 调用 API 绑定指纹与 token |
| **成交上报** | 已激活客户端 POST 成交与可选 K 线 |
| **交易复盘** | 列表 + 详情四周期(M1/M5/M15/H1)+ 入场形式标注 |
---
## 仓库目录
| 目录 | 说明 |
|------|------|
| `app/` | Flask Web + API |
| `desktop/` | 客户端说明(下单逻辑从既有 Desktop 迁移) |
| `deploy/` | 一键交互部署 / PM2 |
| `docs/` | 部署 / 使用 / 技术文档 |
| `releases/` | 放置通用 `黄金市价辅助.exe` |
| `data/` | SQLite 数据(部署后生成) |
---
## 本地开发(Windows / Linux)
```bash
cd gold_monitor
python -m venv .venv
# Windows: .venv\Scripts\activate
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python wsgi.py
```
浏览器打开 [http://127.0.0.1:5800](http://127.0.0.1:5800) 。