Backend (FastAPI + SQLAlchemy + Claude API + RAG): - Config management with Pydantic v2 - Database engine with connection pooling and SQL injection prevention - AI engine with Claude API integration (support custom base URL) - RAG engine with ChromaDB and sentence-transformers - Requirement analysis service - Config generation service - Executor engine with SQL validation - REST API endpoints: /analyze, /generate, /execute Frontend (Vue 3 + Element Plus + Pinia): - Complete 3-step workflow: analyze → generate → execute - Step indicator with progress visualization - Analysis result display with field table - SQL preview with monospace font - Execute confirmation dialog with safety warning - Execution result display - State management with Pinia - API service integration Security: - SQL injection prevention with parameterized queries - Dangerous SQL operation blocking - Database password URL encoding - Transaction auto-rollback - Pydantic config validation Features: - Natural language requirement analysis - Automated SQL configuration generation - Safe execution with human review - LAN access support - Custom Claude API endpoint support Documentation: - README with quick start guide - Quick start guide - LAN access configuration - Dependency fixes guide - Claude API configuration - Git operation guide - Implementation report Dependencies fixed: - numpy<2.0.0 for chromadb compatibility - sentence-transformers==2.7.0 for huggingface_hub compatibility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
快速配置卡片
🎯 局域网访问配置
✅ 已配置项目
-
前端 -
frontend/vite.config.jshost: '0.0.0.0' // ✓ 已添加 -
后端 -
backend/app/main.pyhost="0.0.0.0" // ✓ 已配置 allow_origins=["*"] if settings.DEBUG // ✓ 开发模式允许所有来源
📋 使用步骤
# 1. 查看服务器 IP
ipconfig # Windows
ifconfig # Linux/Mac
# 2. 启动后端
cd backend && python -m app.main
# 3. 启动前端
cd frontend && npm run dev
# 4. 局域网访问
# 前端: http://192.168.1.100:5173
# 后端: http://192.168.1.100:8000
🔥 防火墙快速配置
Windows:
# 管理员 PowerShell
netsh advfirewall firewall add rule name="ERP Frontend" dir=in action=allow protocol=tcp localport=5173
netsh advfirewall firewall add rule name="ERP Backend" dir=in action=allow protocol=tcp localport=8000
Linux (Ubuntu):
sudo ufw allow 5173/tcp
sudo ufw allow 8000/tcp
⚠️ 安全提醒
- 开发环境:
DEBUG=True(允许所有来源) - 生产环境:
DEBUG=False+ 配置具体域名
详细说明: docs/LAN_ACCESS.md