Commit Graph

2 Commits

Author SHA1 Message Date
imeepos 26cd0139bf feat: 完整的生成流程 - 登录检查、文件上传、支付凭证验证
主要功能:
1.  添加 canGenerate() - 检查登录、metered 订阅、余额
2.  添加 uploadBlobFiles() - 自动上传所有 blob URL 到服务器
3.  支付凭证强制验证 - identifier 缺失时报错"支付失败"
4.  新增 lib/api/upload.ts - 文件上传 API
5.  更新 useTemplateRun hook 支持 identifier 参数

完整流程(7步骤):
  1. 表单验证
  2. canGenerate 检查(登录 + 订阅 + 余额)
  3. 上传 blob 文件到服务器
  4. recordTokenUsage 扣费并获取 identifier
  5. 验证所有 URL 都是服务器 URL
  6. 转换数据格式
  7. runTemplate(id, data, identifier) 创建任务

安全保障:
-  无 identifier → 抛出错误"支付凭证缺失"
-  blob URL 未上传 → 报错"存在未上传的文件"
-  余额不足 → 引导用户充值

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 18:51:31 +08:00
imeepos 7e3f94bae3 Initial commit: Expo app with Better Auth integration
- Complete Expo React Native app setup with TypeScript
- Better Auth authentication system integration
- Secure storage implementation for session tokens
- Authentication flow with login/logout functionality
- API client configuration for backend communication
- Responsive UI components with themed styling
- Expo Router navigation setup
- Development configuration and scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:32:52 +08:00