refactor: RBAC权限系统重构 + UI组件拆分 + 测试修复 + 架构文档
Some checks failed
CI / build-deploy (push) Has been cancelled

- RBAC: 新增30个权限点、DataScope行级权限、requirePermission守卫,所有57+ Server Action接入权限校验
- UI拆分: exam-form(1623行→11文件)、textbook-reader(744行→7文件),均降至300行以内
- 测试: 新增5个单元测试文件(19用例),修复4个集成测试文件(38用例全部通过)
- 架构文档: 新增架构影响地图(004/005)、标准功能清单(006)、差距审计报告(007)
- 项目规则: 架构图优先规则,改码必同步图
- 安全: rehype-sanitize净化、AES加密API Key、权限路由守卫
- 无障碍: skip-link、aria-label、prefers-reduced-motion
- 性能: next/font优化、next/image、代码分割
This commit is contained in:
SpecialX
2026-06-16 23:38:33 +08:00
parent 99f116cb64
commit 125f7ec54c
75 changed files with 9480 additions and 3289 deletions

View File

@@ -8,8 +8,10 @@
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit",
"test": "npm run test:integration && npm run test:e2e",
"test:ci": "npm run test:integration && npm run test:e2e",
"test": "npm run test:unit && npm run test:integration && npm run test:e2e",
"test:ci": "npm run test:unit && npm run test:integration && npm run test:e2e",
"test:unit": "vitest run --config vitest.unit.config.ts",
"test:unit:watch": "vitest --config vitest.unit.config.ts",
"test:integration": "vitest run --config vitest.config.ts",
"test:integration:watch": "vitest --config vitest.config.ts",
"test:integration:coverage": "vitest run --config vitest.config.ts --coverage",
@@ -66,6 +68,7 @@
"react-hook-form": "^7.69.0",
"react-markdown": "^10.1.0",
"recharts": "^3.6.0",
"rehype-sanitize": "^6.0.0",
"remark-breaks": "^4.0.0",
"remark-gfm": "^4.0.1",
"sonner": "^2.0.7",
@@ -80,6 +83,8 @@
"@playwright/test": "^1.58.2",
"@tailwindcss/postcss": "^4",
"@tailwindcss/typography": "^0.5.16",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/bcryptjs": "^2.4.6",
"@types/node": "^20",
"@types/react": "^19",
@@ -89,6 +94,7 @@
"drizzle-kit": "^0.31.8",
"eslint": "^9",
"eslint-config-next": "16.0.10",
"jsdom": "^29.1.1",
"prettier": "^3.7.4",
"prettier-plugin-tailwindcss": "^0.7.2",
"tailwindcss": "^4",