Files
gaokao-volunteer-system/apps/web/package.json
Frontend Developer e24cbb7d1c
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
feat(sprint-3): 5 个新模块(Share/Query/Review/LLM/Poster)+ G2 闸门通过
## 5 大新模块(30+ hooks + 5 页面 + 1 LLM 适配器)

### Share Link (T-B-22/28)
- useShareLinkCreate/Delete/LatestQuery/StatsQuery
- ShareDialog 弹窗(QR + 链接 + 复制)
- StatsCard 3 卡(访问数/独立访客/最近访问)
- AccessTrendChart(recharts 折线图)

### Data Query (T-B-23)
- useScoreLineQuery / useRankEstimatorQuery / useMajorsQuery / useSchoolsQuery
- DataQueryPage:4 过滤器 + 等效分数 + 分数线表

### Review Flow (T-B-24)
- useReviewStartMutation / useReviewStatusQuery / useReviewActionMutation
- Zod discriminated union 处理 3 种 action
- 5 状态轮询(pending/in_progress/approved/rejected/changes_requested)
- ReviewPage:状态机 UI + 3 操作按钮

### Portal (T-B-25)
- usePortalCWBQuery / usePortalFullPlanQuery
- PortalPage:token 路由 + 等效分数 + 完整方案

### Poster (T-B-27)
- usePosterGenerateMutation(3 模板 classic/modern/minimal)
- PosterPreviewPage:渐变预览 + 下载 + 复制 QR

### LLM (T-B-17/26)
- 4 模适配器(claude/gpt/gemini/deepseek)
- enhanceWithFallback 链式降级
- useLLMConfig / useAuditEnhanceMutation

## G2 闸门(全部通过)
- typecheck: 0 error
- lint: 0 error 0 warning
- test (Vitest): 37/37 passed (10 文件)
- test:e2e (Playwright): 24/24 passed (4 浏览器 × 6 spec)
- build (Vite): 312 KB gzip (recharts 拆分后主 chunk 83KB)
- codegen:check: 0 any

## 关键技术决策
1. 4 模 LLM fallback 链:claude → gpt → gemini → deepseek
2. 所有 API 强类型 + Zod 校验(apiClient 强制 schema)
3. recharts 拆 manualChunk:chart-vendor 104KB gzip
4. Portal token 路由:/portal/:token 共享 token 自动级联

## Sprint 3 收口报告
SPRINT_3_CLOSEOUT_2026-07-03.md

下一步:Sprint 4 · 性能 + 监控(Sentry / Web Vitals)
2026-07-03 16:42:03 +08:00

77 lines
2.4 KiB
JSON

{
"name": "@gaokao/web",
"version": "0.1.0",
"private": true,
"type": "module",
"description": "高考志愿填报系统 - Vite 5 + React 19 + Zustand 4 + TanStack Query 5 (V10 选项 B)",
"scripts": {
"dev": "vite --host 0.0.0.0 --port 3000",
"build": "tsc -b && vite build",
"preview": "vite preview --host 0.0.0.0 --port 4173",
"lint": "eslint .",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:e2e": "playwright test",
"test:storybook": "echo 'storybook is a Sprint 5 task'",
"chromatic": "chromatic --project-token=__CHROMATIC_TOKEN__ --exit-zero-on-changes",
"codegen": "tsx scripts/codegen.ts",
"codegen:check": "tsx scripts/codegen-check.ts",
"clean": "rm -rf dist .vite .turbo coverage playwright-report test-results"
},
"dependencies": {
"@hookform/resolvers": "^3.9.1",
"@tanstack/react-query": "^5.59.0",
"@tanstack/react-query-devtools": "^5.59.0",
"@zodios/core": "10.9.6",
"clsx": "^2.1.1",
"immer": "^10.1.1",
"lucide-react": "^0.469.0",
"qrcode.react": "^4.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-hook-form": "^7.54.0",
"react-markdown": "^10.1.0",
"react-router": "^7.1.1",
"react-router-dom": "^7.1.1",
"recharts": "^2.15.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.1",
"zod": "^3.24.1",
"zustand": "^4.5.5"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@playwright/test": "^1.49.0",
"@tailwindcss/vite": "^4",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/coverage-v8": "^2.1.8",
"autoprefixer": "^10.4.20",
"chromatic": "^11.20.0",
"eslint": "^9",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react-hooks": "^7.0.1",
"globals": "^15.15.0",
"jsdom": "^25.0.1",
"msw": "^2.6.8",
"openapi-typescript": "^7.4.4",
"openapi-zod-client": "^1.18.0",
"playwright": "^1.49.0",
"postcss": "^8.4.49",
"react-error-boundary": "^5.0.0",
"tailwindcss": "^4",
"tsx": "^4.19.2",
"typescript": "^5",
"typescript-eslint": "^8.50.0",
"vite": "^5.4.11",
"vitest": "^2.1.8"
}
}