蜀道安全管理AI智能助手
项目概述
蜀道安全AI系统是为四川省蜀道投资集团打造的AI安全管理平台,提供AI问答、公文写作、培训PPT生成、试题生成、隐患检测等功能。
技术栈
| 模块 |
技术 |
| 后端 |
Go 1.24+, Beego v2, GORM, MySQL |
| 前端 |
Vue 3, Vite 7, Element Plus, Pinia |
| AI |
Qwen3, DeepSeek, YOLO |
| 存储 |
MinIO (S3), ChromaDB |
环境说明
| 环境 |
域名/IP |
说明 |
| 本地 |
localhost / 127.0.0.1 |
开发调试 |
| 测试 |
172.16.29.101 |
内网测试 |
| 生产 |
aqai.shudaodsj.com |
正式环境 |
快速开始
1. 本地开发
# 后端
cd shudao-go-backend
cp conf/app.conf.example conf/app.conf # 首次需要
bee run
# 前端
cd shudao-vue-frontend
npm install
npm run dev
访问 http://localhost:5173
2. 一键打包部署
# 测试环境
./build_test.sh
# 生产环境
./build_release.sh
3. 服务器部署
# 上传部署包后
tar -xzf shudao-go-backend.tar.gz
cd shudao-go-backend
nohup ./shudao-go-backend > nohup.out 2>&1 &
配置文件
| 文件 |
说明 |
conf/app.conf |
当前环境配置(gitignore) |
conf/app.conf.test |
测试环境模板 |
conf/app.conf.prod |
生产环境模板 |
服务端口
| 服务 |
端口 |
| 系统后端 |
22001 |
| Nginx入口 |
22000 |
| MySQL |
21000 |
| 认证网关 |
28004 |
| AI对话服务 |
28002 |
| ChromaDB |
24000 |
| AI模型 |
8000 |
| YOLO |
18080 |
Nginx 代理配置
location /apiv1 { proxy_pass http://127.0.0.1:22001; }
location /chatwithai/ { proxy_pass http://127.0.0.1:28002/; }
location /auth/ { proxy_pass http://127.0.0.1:28004/; }
location /tts { proxy_pass http://172.16.29.101:22000; }
目录结构
├── shudao-go-backend/ # Go后端
│ ├── conf/ # 配置文件
│ ├── controllers/ # 控制器
│ ├── models/ # 数据模型
│ ├── utils/ # 工具函数
│ └── main.go
├── shudao-vue-frontend/ # Vue前端
│ ├── src/
│ │ ├── views/ # 页面组件
│ │ ├── utils/ # 工具(apiConfig.js等)
│ │ └── request/ # API请求
│ └── vite.config.js
├── build_release.sh # 生产环境打包
├── build_test.sh # 测试环境打包
└── nginx.conf # Nginx配置参考