Features - User Management (Phase 4.1): - Database: Add user_modules table for fine-grained module permissions - Database: Add 4 user permissions (view/create/edit/delete) to role_permissions - Backend: UserService (780 lines) - CRUD with tenant isolation - Backend: UserController + UserRoutes (648 lines) - 13 API endpoints - Backend: Batch import users from Excel - Frontend: UserListPage (412 lines) - list/filter/search/pagination - Frontend: UserFormPage (341 lines) - create/edit with module config - Frontend: UserDetailPage (393 lines) - details/tenant/module management - Frontend: 3 modal components (592 lines) - import/assign/configure - API: GET/POST/PUT/DELETE /api/admin/users/* endpoints Architecture Upgrade - Module Permission System: - Backend: Add getUserModules() method in auth.service - Backend: Login API returns modules array in user object - Frontend: AuthContext adds hasModule() method - Frontend: Navigation filters modules based on user.modules - Frontend: RouteGuard checks requiredModule instead of requiredVersion - Frontend: Remove deprecated version-based permission system - UX: Only show accessible modules in navigation (clean UI) - UX: Smart redirect after login (avoid 403 for regular users) Fixes: - Fix UTF-8 encoding corruption in ~100 docs files - Fix pageSize type conversion in userService (String to Number) - Fix authUser undefined error in TopNavigation - Fix login redirect logic with role-based access check - Update Git commit guidelines v1.2 with UTF-8 safety rules Database Changes: - CREATE TABLE user_modules (user_id, tenant_id, module_code, is_enabled) - ADD UNIQUE CONSTRAINT (user_id, tenant_id, module_code) - INSERT 4 permissions + role assignments - UPDATE PUBLIC tenant with 8 module subscriptions Technical: - Backend: 5 new files (~2400 lines) - Frontend: 10 new files (~2500 lines) - Docs: 1 development record + 2 status updates + 1 guideline update - Total: ~4900 lines of code Status: User management 100% complete, module permission system operational
1.9 KiB
1.9 KiB
AI智能文献模块 - 系统架构设计
文档版本: v1.0
创建日期: 2025-10-29
维护者: AI智能文献开发团队
最后更新: 2025-10-29
📋 文档说明
本文档描述AI智能文献模块的系统架构设计,包括模块架构、技术架构、数据架构等。
🏗️ 模块架构
核心功能模块
AI智能文献模块
├── 1. 研究方案生成
├── 2. 智能文献检索
├── 3. 标题摘要初筛 ⭐ 当前优先开发
├── 4. 全文复筛
├── 5. 全文解析与数据提取
└── 6. 数据综合分析与报告生成
模块间关系
研究方案生成 → 指导后续所有模块
↓
智能文献检索 → 生成文献列表
↓
标题摘要初筛 → 初步筛选结果
↓
全文复筛 → 最终纳入列表
↓
全文解析与数据提取 → 结构化数据
↓
数据综合分析与报告生成 → 最终报告
🔧 技术架构
前端架构
- 框架: React + TypeScript
- UI库: Ant Design + Tailwind CSS
- 状态管理: Zustand / React Query
- 路由: React Router
后端架构
- 框架: Node.js + TypeScript + Fastify
- 数据库: PostgreSQL + Prisma ORM
- 文件存储: 本地存储 / 对象存储
- AI集成: DeepSeek-V3、Qwen3-72B
AI服务架构
- 双模型系统: DS模型 + Q3模型
- 流式输出: Server-Sent Events (SSE)
- 批处理: 支持批量任务处理
📊 数据架构
核心数据实体
- 研究方案 (Research Protocol)
- 文献项目 (Literature Project)
- 文献条目 (Literature Item)
- 筛选结果 (Screening Result)
- 提取数据 (Extracted Data)
⏳ 待完善内容
本文档内容正在完善中,后续将补充:
- 详细的架构图
- 模块间通信机制
- 数据流设计
- 安全性设计
文档版本: v1.0
最后更新: 2025-10-29