docs(engineering): add project audit report and improvement plan

This commit introduces a comprehensive engineering audit report for the Tootaio Studio project. The report is structured into documents covering architecture, code quality, performance, security, CI/CD, and
observability. It also includes a phased improvement roadmap and a set of `.patch` files to apply immediate fixes for content schemas, package scripts, and CI configuration.
This commit is contained in:
xiaomai
2025-11-06 10:15:00 +08:00
parent 8cc04b7f59
commit 40b3ee147f
14 changed files with 744 additions and 0 deletions

34
docs/20251106/roadmap.md Normal file
View File

@@ -0,0 +1,34 @@
# 分阶段工程化改进路线图
## 阶段一基础规范化12 天)
- 目标:消除 Critical/High 风险,建立最小工程基线。
- 动作:
- 应用补丁 0001/0002
- 启用 `pnpm check` 在本地与 CI
- 修复内容与 Schema 校验。
- 验证:`pnpm check` 全绿;手测多语言与内容渲染。
## 阶段二模块解耦23 天)
- 目标:清晰分层,降低耦合与心智成本。
- 动作:
- 统一 composables 命名为 `useXxx.ts`
- 将硬编码外链迁到 `runtimeConfig.public.assetBase`
- 视需要引入 Pinia 拆分跨页状态。
- 验证:路由与数据流稳定;影响面与回归点有测试用例(增量引入 Vitest
## 阶段三自动化部署12 天)
- 目标PR 即可验证、主干可随时发布。
- 动作:
- 应用补丁 0003GitHub Actions
- 配置 Vercel/自建 Docker 部署;
- 产出构建产物与环境变量清单。
- 验证PR 触发 CI产物可预览。
## 阶段四性能与监控24 天)
- 目标:稳定响应、端到端可观测。
- 动作:
- 应用补丁 0004Route Rules/SWR
- 引入 SentryDSN + 插件);
- 图片与静态资源走 CDN 与长缓存。
- 验证:关键页面首屏数据、错误率与 Web Vitals。