# 情感博物馆项目结构 ## 📁 目录结构 ``` emotion-museum/ ├── 📁 backend/ # 后端微服务 │ ├── 📁 emotion-gateway/ # API网关服务 │ ├── 📁 emotion-user/ # 用户管理服务 │ ├── 📁 emotion-ai/ # AI聊天服务 │ ├── 📁 emotion-auth/ # 认证服务 │ ├── 📁 emotion-record/ # 记录管理服务 │ ├── 📁 emotion-growth/ # 成长跟踪服务 │ ├── 📁 emotion-explore/ # 探索服务 │ ├── 📁 emotion-reward/ # 奖励服务 │ ├── 📁 emotion-websocket/ # WebSocket服务 │ ├── 📁 emotion-stats/ # 统计服务 │ ├── 📁 emotion-common/ # 公共模块 │ ├── 🔧 build-all.sh # 构建脚本 │ ├── 🔧 deploy-all.sh # 综合部署脚本 │ ├── 🔧 deploy-remote.sh # 远程部署脚本 │ └── 📄 pom.xml # Maven父项目配置 ├── 📁 web-flowith/ # 前端Vue项目 │ ├── 📁 src/ # 源代码 │ ├── 📁 public/ # 静态资源 │ ├── 🔧 deploy.sh # 前端部署脚本 │ └── 📄 package.json # 前端依赖配置 ├── 📁 docs/ # 项目文档 │ ├── 📁 deployment/ # 部署相关文档 │ ├── 📁 architecture/ # 架构设计文档 │ └── 📁 database/ # 数据库相关文档 ├── 📁 configs/ # 配置文件 │ ├── 📁 nginx/ # Nginx配置 │ ├── 📁 docker/ # Docker配置 │ └── 📁 env/ # 环境配置 ├── 🔧 one-click-deploy.sh # 一键部署脚本 ├── 🔧 restart-middleware.sh # 中间件重启脚本 ├── 🔧 cleanup-project.sh # 项目清理脚本 └── 📄 README.md # 项目说明 ``` ## 🚀 快速开始 ### 1. 一键部署 ```bash # 完整部署(前端+后端) ./one-click-deploy.sh # 仅部署后端 ./one-click-deploy.sh backend # 仅部署前端 ./one-click-deploy.sh frontend # 健康检查 ./one-click-deploy.sh check ``` ### 2. 中间件管理 ```bash # 重启中间件(MySQL, Redis, Nacos) ./restart-middleware.sh ``` ### 3. 分步部署 ```bash # 构建后端 cd backend && ./build-all.sh # 部署后端到远程 cd backend && ./deploy-remote.sh # 部署前端 cd web-flowith && ./deploy.sh ``` ## 📋 服务端口 | 服务 | 端口 | 描述 | |------|------|------| | emotion-gateway | 19000 | API网关 | | emotion-user | 19001 | 用户服务 | | emotion-ai | 19002 | AI服务 | | emotion-record | 19003 | 记录服务 | | emotion-growth | 19004 | 成长服务 | | emotion-explore | 19005 | 探索服务 | | emotion-reward | 19006 | 奖励服务 | | emotion-websocket | 19007 | WebSocket服务 | | emotion-auth | 19008 | 认证服务 | | emotion-stats | 19009 | 统计服务 | ## 🔧 中间件端口 | 服务 | 端口 | 描述 | |------|------|------| | MySQL | 3306 | 数据库 | | Redis | 6379 | 缓存 | | Nacos | 8848 | 注册中心 | ## 📖 文档链接 - [部署指南](docs/deployment/) - [架构设计](docs/architecture/) - [数据库设计](docs/database/)