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

28
docs/20251106/README.md Normal file
View File

@@ -0,0 +1,28 @@
# Tootaio Studio 工程与架构审计2025-11-06
本报告对当前基于 Nuxt 4.2.0 的网站项目进行一次性全方位工程化审计涵盖架构、代码质量、性能、CI/CD、安全与可观测性并提供可直接落地的改进方案与补丁。
## 摘要
- 架构总体清晰,采用 Nuxt Content + i18n + @nuxt/ui模块职责明确Low
- 发现内容 Schema 与实际 YAML 不一致Critical导致构建期校验风险与类型漂移。
- 缺少统一工程工具链lint/typecheck/CIHigh
- 未配置 Route Rules/SWR 与静态资源缓存Medium
- 运行时配置、监控与安全头未体系化Medium
## 关键输出
- 补丁:
- 修正 `content.config.ts` Schema 与内容对齐0001
- 增加 `package.json` 脚本lint/typecheck/check0002
- 提供 GitHub Actions 工作流lint → typecheck → build0003
- 可选:为首页与静态资源增加 `routeRules`0004
- 提供 8 份专题文档架构、质量、性能、CI/CD、安全、可观测性与路线图。
## 执行指引
1) 审阅 `docs/20251106/` 文档;
2) 依次应用补丁(位于 `docs/20251106/patches/`
- `git apply docs/20251106/patches/0001-content-config-align.patch`
- `git apply docs/20251106/patches/0002-package-scripts.patch`
- `git apply docs/20251106/patches/0003-github-actions-ci.patch`
- (可选)`git apply docs/20251106/patches/0004-nuxt-route-rules.patch`
3) 本地验证:`pnpm i && pnpm check && pnpm preview`