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.
29 lines
1.5 KiB
Markdown
29 lines
1.5 KiB
Markdown
# Tootaio Studio 工程与架构审计(2025-11-06)
|
||
|
||
本报告对当前基于 Nuxt 4.2.0 的网站项目进行一次性全方位工程化审计,涵盖架构、代码质量、性能、CI/CD、安全与可观测性,并提供可直接落地的改进方案与补丁。
|
||
|
||
## 摘要
|
||
- 架构总体清晰,采用 Nuxt Content + i18n + @nuxt/ui,模块职责明确(Low)。
|
||
- 发现内容 Schema 与实际 YAML 不一致(Critical),导致构建期校验风险与类型漂移。
|
||
- 缺少统一工程工具链(lint/typecheck/CI)(High)。
|
||
- 未配置 Route Rules/SWR 与静态资源缓存(Medium)。
|
||
- 运行时配置、监控与安全头未体系化(Medium)。
|
||
|
||
## 关键输出
|
||
- 补丁:
|
||
- 修正 `content.config.ts` Schema 与内容对齐(0001)。
|
||
- 增加 `package.json` 脚本(lint/typecheck/check)(0002)。
|
||
- 提供 GitHub Actions 工作流(lint → typecheck → build)(0003)。
|
||
- 可选:为首页与静态资源增加 `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`。
|
||
|