SpecialX
c90748124d
feat: introduce i18n system and class invitation codes
...
Add complete i18n infrastructure using next-intl (cookie-driven, without i18n routing) with zh-CN/en dictionary files, locale switcher, and NextIntlClientProvider in root layout. Add class invitation code system with new class_invitation_codes table, data-access layer (generate/validate/consume/revoke), server actions with permission checks, rate limiting, and audit logging. Add class-invitation-manager UI component. Refactor onboarding stepper to use i18n translations and accept new invitation code format (6-char alphanumeric) with backward compatibility for legacy 6-digit codes.
2026-06-22 14:04:55 +08:00
SpecialX
978d9a8309
feat: 新增备课模块并修复全模块 P0/P1/P2 缺陷
...
Security / deep-security-scan (push) Failing after 20m5s
DR Drill / dr-drill (push) Failing after 1m31s
CI / scheduled-backup (push) Failing after 1m31s
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled
主要变更:
- 新增 lesson-preparation 模块: 备课编辑器、节点编辑、AI 建议、知识点选择、版本历史、作业发布
- 新增 shared 通用组件: charts/question-bank-filters/schedule-list/ui (chip-nav/filter-bar/page-header/stat-card/stat-item)
- 新增 student/admin 端 loading.tsx 与 error.tsx, 优化加载与错误态体验
- 新增 teacher/lesson-plans 页面 (列表/新建/编辑)
- 新增 drizzle 迁移 0002_tiny_lionheart 及 snapshot
- 新增 textbooks/schema.ts 与 exams/utils/normalize-structure.ts
- 修复 Tiptap v3 SSR hydration 崩溃 (rich-text-block immediatelyRender: false)
- 重构多模块 data-access/actions/组件, 修复权限校验与类型规范
- 同步架构文档 004/005 反映新增模块、导出、依赖关系
- 归档 bugs/* 测试报告与 e2e 测试脚本 (admin/parent/student/teacher web_test)
2026-06-22 01:06:16 +08:00
SpecialX
6585e10c6f
feat(P2): 实现质量保障类5项功能(无障碍/视觉回归/通知渠道/漏洞扫描/灾备)
...
## 新增功能
### 1. 屏幕阅读器兼容性增强(a11y)
- 无障碍工具库:src/shared/lib/a11y.ts
- aria-live Hook:src/shared/hooks/use-aria-live.ts
- a11y 组件:skip-link/visually-hidden/focus-trap/aria-status
- 增强 UI:table.tsx 系统性 ARIA role,dialog.tsx aria-modal
- 审计文档:docs/accessibility/a11y-audit.md(WCAG 2.1 AA 清单)
### 2. 视觉回归测试
- 测试套件:tests/visual/(homepage + 3 个 dashboard)
- 3 视口(desktop/tablet/mobile)× 2 主题(light/dark)
- 动态元素遮罩,避免误报
- playwright.config.ts 新增 visual-chromium 项目
- 文档:docs/testing/visual-regression.md
### 3. 短信/微信推送渠道集成
- 新模块:src/modules/notifications/
- 4 个渠道:SMS(阿里云/腾讯云)、WeChat(公众号)、Email(SMTP)、In-App
- 分发器按用户偏好并行多渠道发送
- 外部 SDK 动态 import,Mock 模式开发可用
- 文档:docs/notifications/channels.md
### 4. 漏洞扫描 CI 集成
- CI security-scan job:npm audit + Snyk + Trivy FS + OWASP ZAP
- 独立工作流 security.yml:每周一深度扫描 + 容器镜像扫描
- 配置:suppressions.json + .trivyignore
- 本地脚本:security-scan.sh/ps1
- 文档:docs/security/scanning.md(SLA 分级)
### 5. 灾备方案
- 脚本:backup-verify/backup-offsite-sync/dr-drill/failover/health-check
- CI 增强:备份后校验+异地同步,每周灾备演练
- 独立工作流 dr-drill.yml:每周一凌晨 4 点自动演练
- 文档:docs/dr/dr-plan.md(RTO 4h/RPO 24h)+ dr-runbook.md(6 故障场景)
## 验证
- npx tsc --noEmit:0 错误
- npm run lint:0 错误 0 警告
2026-06-17 20:18:29 +08:00
SpecialX
baf8f679bf
refactor: 迁移脚本系统重构 + 新增 db 脚本 + 工作日志
...
- 清理全部旧迁移文件(0000-0011)和 meta 目录
- 使用 drizzle-kit generate 从 schema 重新生成单一迁移文件
- 0000_perfect_pestilence.sql: 包含全部 49 张表
- 修复 0011_ai_providers.sql 未在 journal 注册导致 migrate 失败的问题
- 修复缺少 snapshot 文件的问题
- 移除复杂 PREPARE/EXECUTE 条件 SQL,使用标准 CREATE TABLE
- package.json 新增脚本:
- db:create: 创建数据库
- db:push: 直接同步 schema(开发用)
- db:setup: 一键 create → migrate → seed
- 干净数据库全流程测试通过: create → migrate → seed
- 更新工作日志(docs/work_log.md)
2026-06-17 14:21:24 +08:00
SpecialX
3b6272c99d
feat: 完成 P1 全部功能 + 修复 proxy 导出 + 切换 MySQL 端口至 14013
...
## P1 功能(20 项)
- 站内消息系统、家长仪表盘、学生考勤管理
- Excel 导入导出、用户批量导入、成绩导出
- 排课规则+自动排课+课表调整
- 成绩趋势+对比分析、密码安全策略、速率限制
- 数据变更日志、文件预览+存储策略、全文检索
- 依赖审计集成 CI、数据库定时备份、E2E 测试完善
- 通知偏好管理
## 基础设施修复
- src/proxy.ts: 将 middleware 导出重命名为 proxy(Next.js 16 要求)
- .env: MySQL 端口从 13002 切换至 14013
- scripts/create-db.ts: 新增数据库初始化脚本
## 架构文档同步
- 004_architecture_impact_map.md 和 005_architecture_data.json
完整记录所有新增表、模块、路由、权限、依赖关系
2026-06-17 13:44:37 +08:00
SpecialX
125f7ec54c
refactor: RBAC权限系统重构 + UI组件拆分 + 测试修复 + 架构文档
...
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、代码分割
2026-06-16 23:38:33 +08:00
SpecialX
99f116cb64
=test_update_homework_tests_and_work_log
CI / build-deploy (push) Has been cancelled
2026-03-19 13:16:49 +08:00
SpecialX
a2e89ce795
Fix-auth-hashing-update-worklog
2026-02-24 15:50:38 +08:00
SpecialX
bb4555f611
feat: enhance textbook reader with anchor text support and improve knowledge point management
2026-01-16 10:22:16 +08:00
SpecialX
9bfc621d3f
feat(classes): optimize teacher dashboard ui and implement grade management
2026-01-14 13:59:11 +08:00
SpecialX
ade8d4346c
feat(dashboard): optimize teacher dashboard ui and layout
...
- Refactor layout: move Needs Grading to main column, Homework to sidebar
- Enhance TeacherStats: replace static counts with actionable metrics (Needs Grading, Active Assignments, Avg Score, Submission Rate)
- Update RecentSubmissions: table view with quick grade actions and late status
- Update TeacherSchedule: vertical timeline view with scroll hints
- Update TeacherHomeworkCard: compact list view
- Integrate Recharts: add TeacherGradeTrends chart and shared chart component
- Update documentation
2026-01-12 11:38:27 +08:00
SpecialX
57807def37
完整性更新
...
现在已经实现了大部分基础功能
2026-01-08 11:14:03 +08:00
SpecialX
e7c902e8e1
Module Update
2025-12-30 14:42:30 +08:00
SpecialX
83dd36d842
feat: init Next.js app and CI
2025-12-12 16:21:14 +08:00