Refactor infrastructure scripts and add mock hardware support

Changes:
- Refactor project scripts for better dev/prod workflow separation
- Add mock_hardware.py for local development without real hardware
- Add Makefile for common commands
- Add .env.example for environment variable reference
- Split scripts into dev-backend.sh, dev-frontend.sh, prod-backend.sh
- Add stop.sh for clean shutdown

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-22 12:31:32 +08:00
parent 1429442dbd
commit cb6498cd2b
12 changed files with 592 additions and 167 deletions
+21
View File
@@ -0,0 +1,21 @@
# 环境变量配置示例
# 复制此文件为 .env 并修改需要的值
# ========== 开发模式 ==========
# 设置为 1 启用 Mock 硬件模式(本地开发,无需真实硬件)
MOCK_HARDWARE=0
# ========== 后端配置 ==========
FLASK_PORT=5000
# ========== 前端配置 ==========
# 前端开发服务器会代理 API 请求到后端
BACKEND_URL=http://127.0.0.1:5000
# ========== 硬件配置(生产环境) ==========
AGV_HOST=192.168.60.80
ARM_HOST=192.168.60.120
# ========== 外部 API ==========
# TEST_MODE: true=测试环境, false=正式环境
TEST_MODE=false