docs: 集成短信宝 SMS Bao 验证码服务

- 新增 docs/smsbao-integration.md(完整集成文档+代码示例)
- 更新 PRD:注册/登录使用短信宝发送验证码
- 更新架构设计:技术栈+选型矩阵+配置说明
- 更新 API 规范:新增 /send-code 接口
- 更新 AGENTS.md:短信服务配置说明

短信宝 API:
- 发送: GET https://api.smsbao.com/sms?u=&p=&m=&c=
- 查询: GET http://api.smsbao.com/query?u=&p=
- 签名格式: 【QihuAI】您的验证码是123456
This commit is contained in:
qyyfw committed 2026-06-27 12:03:28 +00:00
1 parent d45410abef
commit a9e141b695
5 files changed
+356 -6

No files matched your search

+20
View File
@@ -26,6 +26,7 @@
| **实名认证** | 自建 OCR | 阿里云 API | **阿里云** | 国内最权威,接口稳定 |
| **AI 服务框架** | Go 自研 | FastAPI | **FastAPI** | AI 生态标准,79k Stars,异步高性能 |
| **本地 LLM** | 自建 | Ollama | **Ollama** | 130k Stars,本地部署事实标准 |
| **短信服务** | 阿里云短信 | 短信宝 | **短信宝** | 简单 HTTP GET 接口,快速接入 |
| **API 网关** | 自研 | APISIX | **APISIX** | 高性能,插件丰富,国内团队 |
| **数据库** | MySQL | PostgreSQL | **PostgreSQL** | JSONB + RLS,功能更强 |
| **缓存** | Memcached | Redis | **Redis** | Lua 脚本支持,原子计费必备 |
@@ -247,6 +248,25 @@ return 'OK:' .. new_balance
## 6. 开源组件集成方案
### 6.0 SMS Bao (短信服务)
```
接入方式: HTTP GET 接口(无需 SDK)
接口地址: https://api.smsbao.com/sms
认证方式: ApiKey 或 MD5 密码
配置文件: infra/smsbao/config.yaml
smsbao:
username: "your_username"
api_key: "your_api_key" # 优先使用 ApiKey
sign_name: "QihuAI" # 短信签名
api_url: "https://api.smsbao.com/sms"
query_url: "http://api.smsbao.com/query"
code_length: 6 # 验证码长度
code_ttl: 300 # 验证码有效期(秒)
rate_limit: 60 # 同号码发送间隔(秒)
daily_limit: 10 # 同号码每日上限
```
### 6.1 Casdoor (SSO 认证中心)
```