diff --git a/tenant-platform/CLAUDE.md b/tenant-platform/CLAUDE.md new file mode 100644 index 0000000..dd5d057 --- /dev/null +++ b/tenant-platform/CLAUDE.md @@ -0,0 +1,110 @@ +# tenant-platform — Claude 项目上下文 + +## 项目定位 + +XuqmGroup 租户管理平台 Web 前端。Vue3 + TypeScript + Element Plus,管理应用、IM、推送、版本、License 等功能。 + +- Git 远端:`https://xuqinmin.com/xuqmGroup/XuqmGroup-Web.git`(子目录 `tenant-platform`) +- 技术栈:Vue 3.5 + TypeScript 5.8 + Vite 6 + Element Plus 2.9 + Pinia 3 + Vue Router 4 +- 开发端口:`http://localhost:5173` + +## 目录结构 + +``` +tenant-platform/ +├── src/ +│ ├── api/ # API 接口定义(13 个模块) +│ ├── assets/ # 静态资源 +│ ├── router/ # 路由配置 +│ ├── services/ # 业务服务 +│ ├── stores/ # Pinia 状态管理 +│ ├── utils/ # 工具函数 +│ └── views/ # 页面组件(14 个目录) +├── package.json +├── vite.config.ts +└── tsconfig.json +``` + +## 功能模块 + +| 目录 | 功能 | +|------|------| +| `views/auth/` | 登录 / 注册 / 忘记密码 | +| `views/dashboard/` | 仪表盘(统计概览) | +| `views/apps/` | 应用管理(列表 + 详情) | +| `views/im/` | IM 管理(配置 / Webhook / 告警) | +| `views/push/` | 推送管理(配置 / 设备管理) | +| `views/update/` | 版本管理(APK / RN Bundle) | +| `views/license/` | License 管理 | +| `views/logs/` | 操作日志 | +| `views/accounts/` | 子账号管理 | +| `views/security/` | 安全中心 | +| `views/docs/` | 文档中心 | +| `views/system/` | 系统日志 | +| `views/database/` | 数据库查看 | + +## 路由 + +| 路径 | 页面 | +|------|------| +| `/login` | 登录 | +| `/register` | 注册 | +| `/forgot-password` | 忘记密码 | +| `/dashboard` | 仪表盘 | +| `/apps` | 应用列表 | +| `/apps/:appKey` | 应用详情 | +| `/apps/:appKey/im-config` | IM 配置 | +| `/apps/:appKey/push-config` | 推送配置 | +| `/apps/:appKey/update` | 版本管理 | +| `/apps/:appKey/license` | License 管理 | +| `/operation-logs` | 操作日志 | +| `/accounts` | 子账号 | +| `/security` | 安全中心 | + +## API 接口模块 + +| 文件 | 对应后端服务 | +|------|-------------| +| `api/auth.ts` | tenant-service(认证) | +| `api/app.ts` | tenant-service(应用管理) | +| `api/im.ts` | im-service | +| `api/push.ts` | push-service | +| `api/update.ts` | update-service | +| `api/license.ts` | license-service | +| `api/account.ts` | tenant-service(子账号) | +| `api/dashboard.ts` | tenant-service(统计) | +| `api/system.ts` | tenant-service(系统) | +| `api/operationLog.ts` | tenant-service(操作日志) | + +## 代理配置(vite.config.ts) + +```ts +proxy: { + '/api/license': { target: 'http://127.0.0.1:8085' }, + '/api/push': { target: 'http://127.0.0.1:8083' }, + '/api': { target: 'http://127.0.0.1:8081' }, +} +``` + +## 常用命令 + +```bash +yarn dev # 启动开发服务器 +yarn build # 构建生产包(vue-tsc + vite build) +yarn preview # 预览生产包 +``` + +## 新增日志监控页(待开发) + +``` +/log/overview 概览仪表盘 +/log/issues 错误列表 +/log/issues/:id 错误详情(含 ±5 行源码) +/log/events 事件流水 +/log/funnels 漏斗分析 +/log/webhooks Webhook 配置 +/log/rank/freq 高频错误排行 +/log/rank/risk 高危用户排行 +``` + +接口基础地址:`https://xuqm-log-service/log/v1/`(开发期走代理)