feat: 前后端分离架构 — FastAPI SSE后端 + Vue 3前端

将单体 Streamlit 应用拆分为三层架构:
- api_server.py: FastAPI SSE 流式后端 (端口 8000)
- frontend/: Vue 3 + Vite + Pinia 聊天前端 (端口 5173)
- agent/graph.py: 新增 node_start 回调支持
- 更新启动脚本为三服务模式

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 20:04:27 +08:00
parent 2befd44430
commit 74f3f03d2c
29 changed files with 3668 additions and 72 deletions
+11 -7
View File
@@ -1,18 +1,21 @@
@echo off
echo ============================================
echo JRXML 代理 - 全自动启动 (验证服务 + UI)
echo JRXML 代理 - 全自动启动 (验证 + API + UI)
echo ============================================
set STREAMLIT_SERVER_HEADLESS=true
echo.
echo [1/2] 启动验证服务 (端口 8001)...
echo [1/3] 启动验证服务 (端口 8001)...
start "JRXML 验证服务" cmd /c "cd /d %~dp0 && .venv\Scripts\python -m uvicorn validation_service.main:app --port 8001 --host 0.0.0.0"
timeout /t 3 /nobreak >nul
echo [2/2] 启动 Streamlit UI (端口 8501)...
start "JRXML UI" cmd /c "cd /d %~dp0 && .venv\Scripts\streamlit run app.py --server.port 8501"
echo [2/3] 启动后端 API (端口 8000)...
start "JRXML API" cmd /c "cd /d %~dp0 && .venv\Scripts\python -m uvicorn api_server:app --port 8000 --host 0.0.0.0"
timeout /t 3 /nobreak >nul
echo [3/3] 启动前端开发服务器 (端口 5173)...
start "JRXML Frontend" cmd /c "cd /d %~dp0\frontend && npm run dev"
timeout /t 3 /nobreak >nul
@@ -20,7 +23,8 @@ echo.
echo ============================================
echo 启动完成
echo 验证服务: http://localhost:8001
echo UI 界面: http://localhost:8501
echo 后端 API: http://localhost:8000
echo 前端界面: http://localhost:5173
echo ============================================
echo.
echo 关闭此窗口不会停止服务。关闭服务窗口或运行 stop.bat 停止。