diff --git a/QUICK_START.md b/QUICK_START.md new file mode 100644 index 0000000..e9977fd --- /dev/null +++ b/QUICK_START.md @@ -0,0 +1,115 @@ +# 🚀 智能客服系统 - 快速启动指南 + +## 一键启动(推荐) +```bash +# 克隆项目 +git clone https://giter.top/openclaw/smart-customer-service.git +cd smart-customer-service + +# 一键启动所有服务 +./scripts/start-dev.sh +``` + +## 手动启动 + +### 1. 启动基础设施 +```bash +# 启动数据库和缓存 +docker-compose up -d postgres redis adminer + +# 等待数据库就绪 +sleep 10 +``` + +### 2. 启动后端服务 +```bash +cd backend +go run cmd/server/main.go +# 或使用预编译版本 +# ./cmd/server/main +``` + +### 3. 启动前端服务 +```bash +cd frontend +pnpm dev +``` + +## 📍 访问地址 +- **前端界面**: http://localhost:5173 +- **后端API**: http://localhost:8080 +- **健康检查**: http://localhost:8080/health +- **数据库管理**: http://localhost:8082 (用户名: postgres, 密码: postgres) + +## 🔧 默认账号 +- **邮箱**: admin@example.com +- **密码**: admin123 + +## 📞 API测试 +```bash +# 健康检查 +curl http://localhost:8080/health + +# 用户登录 +curl -X POST http://localhost:8080/api/v1/auth/login + +# 获取用户资料 +curl http://localhost:8080/api/v1/users/profile +``` + +## 🛠️ 开发命令 +```bash +# 前端开发 +cd frontend +pnpm dev # 启动开发服务器 +pnpm build # 构建生产版本 +pnpm lint # 代码检查 + +# 后端开发 +cd backend +go run cmd/server/main.go # 启动开发服务器 +go test ./... # 运行测试 +go build ./cmd/server # 构建可执行文件 +``` + +## 📦 项目结构 +``` +smart-customer-service/ +├── frontend/ # React前端 +├── backend/ # Golang后端 +├── scripts/ # 工具脚本 +├── docker-compose.yml # Docker配置 +└── docs/ # 文档 +``` + +## 🔄 更新项目 +```bash +# 拉取最新代码 +git pull origin main + +# 重启服务 +docker-compose restart +``` + +## 🚨 故障排除 +```bash +# 查看服务状态 +docker-compose ps + +# 查看日志 +docker-compose logs -f + +# 重启服务 +docker-compose restart + +# 完全重置 +docker-compose down -v +./scripts/start-dev.sh +``` + +--- + +**最后更新**: 2026-02-27 +**版本**: v0.1.0 +**状态**: 🟢 可运行 +**仓库**: https://giter.top/openclaw/smart-customer-service \ No newline at end of file