Files
000-platform/README.md
111 c4bd7c8251
All checks were successful
continuous-integration/drone/push Build is passing
feat: 租户级企微配置改造
- 新增 platform_tenant_wechat_apps 表(租户企微应用配置)
- platform_apps 增加 require_jssdk 字段
- platform_tenant_apps 增加 wechat_app_id 关联字段
- 新增企微应用管理 API 和页面
- 应用管理页面增加 JS-SDK 开关
- 应用配置页面增加企微应用选择
2026-01-23 19:05:00 +08:00

130 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AI 对话启动指南
> 本文档用于快速让新 AI 了解项目背景和当前状态
---
## 项目概述
这是一个多租户 AI 应用平台,包含:
| 项目 | 说明 | 技术栈 |
|------|------|--------|
| 000-platform | 统一管理平台Admin UI | Python FastAPI + Vue 3 |
| 001-tools | PHP+n8n 工具迁移 | Python FastAPI + Vue 3 |
| 011-ai-interview | AI 面试应用 | Python FastAPI + Vue 3 |
---
## 当前状态
### 已完成
- DevOps: Gitea + Drone CI/CD + Docker 自动部署
- 多租户鉴权: URL 参数签名验证 (tid, aid, ts, sign)
- 应用管理: Admin UI 可配置应用和生成签名链接
- 5 个工具迁移: 头脑风暴、高情商回复、面诊方案、客户画像、医疗合规
- AI 调用统计: 记录到 platform_ai_call_events
### 待完成
- 企业微信 JS-SDK 集成
- n8n 返回 token 统计
- 生产环境部署
---
## 关键文件位置
```
AgentWD/
├── _shared/ # 共享文档
│ ├── AI对话启动指南.md # 本文件
│ ├── 项目进度/ # 进度文档
│ │ ├── 整体进度汇总.md
│ │ ├── 000-platform进度.md
│ │ └── 001-tools迁移进度.md
│ └── 数据库/
│ └── 测试环境配置.md # 服务器/数据库信息
├── 框架/
│ └── CICD配置.md # CI/CD 说明
├── projects/
│ ├── 000-platform/ # 管理平台
│ ├── 001-tools/ # 工具集
│ └── 011-ai-interview/ # AI 面试
└── scripts/ # 数据库脚本
```
---
## 服务器信息
| 服务 | 地址 | 说明 |
|------|------|------|
| 测试服务器 | 47.107.172.23 | root / Nj861021 |
| MySQL | 47.107.71.55 | scrm_reader / ScrmReader2024Pass |
| n8n | https://n8n.ireborn.com.cn | 工作流引擎 |
| Gitea | https://git.ai.ireborn.com.cn | 代码托管 |
| Drone CI | https://ci.ai.ireborn.com.cn | 自动部署 |
---
## 测试地址
| 服务 | 测试环境 |
|------|----------|
| 管理平台 | https://platform.test.ai.ireborn.com.cn/admin |
| 工具集 | https://tools.test.ai.ireborn.com.cn |
| AI 面试 | https://interview.test.ai.ireborn.com.cn |
---
## 鉴权机制
### 001-tools 租户鉴权
```
URL: https://tools.test.ai.ireborn.com.cn/brainstorm?tid=test&aid=tools
```
- `tid`: 租户ID必须
- `aid`: 应用代码(必须,默认 tools
- `ts`: 时间戳(需签名的租户必须)
- `sign`: HMAC-SHA256(tid+aid+ts, token_secret)
### 测试租户
- `test`: 免签名,直接 `?tid=test&aid=tools`
- `qiqi`: 需签名,通过 Admin UI 生成链接
---
## 开发规范
1. **分支策略**: develop → 测试环境, main → 生产环境
2. **代码提交**: 推送后自动触发 Drone CI/CD
3. **样式保留**: 001-tools 各工具保持原 PHP 样式,不统一
4. **数据库表**: 统一使用 `platform_` 前缀
---
## 常用命令
```bash
# 检查构建状态
curl "https://ci.ai.ireborn.com.cn/api/repos/admin/000-platform/builds?per_page=1"
# SSH 到服务器
ssh root@47.107.172.23 # 密码: Nj861021
# 执行 MySQL
mysql -h 47.107.71.55 -u scrm_reader -pScrmReader2024Pass new_qiqi
```
---
## 详细进度
请阅读以下文件获取更多信息:
1. `_shared/项目进度/整体进度汇总.md` - 整体架构和状态
2. `_shared/项目进度/001-tools迁移进度.md` - 工具迁移详情
3. `_shared/项目进度/000-platform进度.md` - 平台服务详情
4. `_shared/数据库/测试环境配置.md` - 环境配置详情