From fc7138786b01b9e6278b1b60f89ff7e7b8aa5de0 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 27 Feb 2026 17:01:14 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A0=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 📝 新增QUICK_START.md文档,包含: - 一键启动脚本使用说明 - 手动启动步骤 - 访问地址和默认账号 - API测试示例 - 开发命令参考 - 故障排除指南 方便用户快速上手和部署系统 --- QUICK_START.md | 115 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 QUICK_START.md 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