startup-plan/技术设计/api-server/已完成/[已完成]-后端实现状态.md
WangDL 23a6999b56 docs: 推送所有未提交的文档更新
- 5/19-5/20 工作日志
- 后端实现状态更新
- 服务器部署方案更新
- 知识库设计更新
- 进行中文档更新
- 执行计划与任务清单更新

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 18:10:44 +08:00

65 lines
2.8 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.

---
updated: 2026-05-17
---
# 知习 api-server 后端实现状态
> 记录当前已完成和部分完成的模块状态。完整架构设计见 `[进行中]-架构总览.md`。
## 模块完成度
| 模块 | 状态 | 备注 |
|------|------|------|
| AuthApple + JWT | ✅ | Apple 登录、JWT、刷新、退出 |
| Role / Permission | ✅ | @Roles() + RolesGuard + USER/ADMIN/SUPER_ADMIN |
| Users | ✅ | 个人资料 CRUD、偏好设置外观/语言/提醒) |
| Knowledge Base | ✅ | CRUD + 软删除Prisma |
| Knowledge Items | ✅ | CRUD + 排序Prisma |
| Learning Session | ✅ | 开始/结束/列表 |
| Active Recall | ✅ | 回答提交 + AI 分析集成 |
| AI Analysis | ✅ | 同步分析 + 结果存储 |
| AI Gateway | ✅ | 三层架构ProviderDeepSeek+MiniMax+Mock→ Gateway → Workflow |
| AI Workflows | 🔶 1/5 | 主动回忆分析完成,缺:费曼/导入/复习卡片/趋势 |
| Focus Items | ✅ | CRUD + 完成标记 |
| Review | ✅ | 到期卡片 + 提交复习 |
| Learning Activity | ✅ | 热力图 + 摘要统计 |
| Document Import | ✅ | 导入创建 + 状态查询claim/heartbeat/stale recovery |
| Knowledge Source | ✅ | 资料来源 CRUD + DocumentImport 自动生成 |
| Import Candidate | ✅ | 候选知识点管理 + KnowledgeItem 自动生成 |
| RAG (内部 API) | ✅ | 7 个端点,@Public 绕过 JWT |
| Python RAG Worker | 🔶 | 代码已部署10 文件systemd 待创建,依赖待补全 |
| UploadedFile | ✅ | sha256 去重 |
| Notifications | ✅ | 列表 + 已读标记(推送待接) |
| Feedback | ✅ | 提交 + 列表 + 统计 |
| System | ✅ | 健康检查 |
| Redis | 🔶 | RedisService 可用BullMQ 未接 |
| iOS 对接 | 🔶 | Auth 已对接,其他页面待接 |
## 基础设施
| 项目 | 状态 |
|------|------|
| NestJS + TypeScript | ✅ |
| Prisma + MySQL | ✅ |
| Docker + Nginx | ✅ api.longde.cloud8核32G |
| Let's Encrypt SSL | ✅ |
| SwaggerBasic Auth 保护) | ✅ |
| 全局 JwtAuthGuard@Public 白名单) | ✅ |
| 全局 RolesGuard角色层级 | ✅ |
| 全局 ExceptionFilter | ✅ |
| 全局 ValidationPipe | ✅ |
| `npx tsc --noEmit` | ✅ 0 errors |
| CI/CD Pipelineapi-server | ✅ gitea-runner + deploy.yml |
| CI/CD Pipelineweb-projects | ✅ gitea-runner + deploy.yml今日 13:38 部署) |
## 待推进
- AI Workflows费曼解释评估、知识导入解析、复习卡片生成、长期趋势分析
- BullMQ队列 + Worker 异步处理
- Redis缓存 + 限流接入
- Python RAG Worker补全依赖 + 创建 systemd 服务(代码已部署)
- iOS知识库列表、学习会话、复习等页面接后端
- CI/CD4核4G 安装 gitea-runner-web + web-projects workflow
- COS Bucket 验证 + 百度 OCR 开通
- 管理员后台Admin API + 审计日志