Files
platform/README.md

64 lines
2.0 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.
## todo
- 撤销令牌需要改成用户权限,只有本人可以撤销
- 移动端适配
- 扩展 device 权限验证方式,提供一种方法区分内部和外部服务
- 检查数据库枚举字段0 值只作为空值使用
- 更新数据库填充
- 错误处理类型转换失败问题
- channel 接口
- 重新梳理逻辑流程,简化循环
- 端口分配时加锁
- 用对称加密处理密钥
- 环境变量配置默认会话配置
- 微信支付
- 支付回调处理
- 页面 账户总览
- 保存 session 到数据库
- 中间件 Limiter
- 中间件 Compress
- 页面 提取记录
- 页面 使用记录
- 废弃 password 授权模式,迁移到 authorization code 授权模式
- oauth token 验证授权范围
- 实现白银节点的 warp 服务,用来去重与端口分配,保证测试与生产环境不会产生端口竞争
- 增加 domain 层,缓解同包字段过长的问题
- callback 结果直接由 api 端提供,不通过前端转发
- debug白银节点提供一些工具接口方便快速操作
- 批量下线端口
- 统一使用 validator 进行参数验证
### 长期
- 业务代码和测试代码共用的控制变量可以优化为环境变量
- 考虑统计接口调用频率并通过接口展示
- 考虑登录时曾经输入过验证码的用户,登录成功后允许一段时间内免输验证码
## 环境变量和脚本
在 init/env 中有定义和默认值
开发环境数据库迁移:
```powershell
pg-schema-diff apply --schema-dir .\scripts\sql --dsn "host=localhost user=test password=test dbname=app port=5432 sslmode=disable TimeZone=Asia/Shanghai"
```
## 枚举字典
### 产品
| 代码 | 缩写 | 产品 |
|----------------------|-----|------|
| proxy/shared-static | pss | 动态代理 |
| proxy/shared-rotate | psr | 隧道代理 |
| proxy/private-static | pps | 独享代理 |
### 订单类型
| 枚举 | 说明 |
|----|------|
| 1 | 充值余额 |
| 2 | 直接购买 |
## 业务逻辑