feat(script): SEO auditor + PROGRESS.md v24 update

Add seo_auditor.py - crawls external websites, scores 6 SEO dimensions (meta/heading/content/performance/links/mobile), generates optimization tasks. Update PROGRESS.md with v24 external promotion feature.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
yuzhiran
2026-06-21 16:07:43 +08:00
parent 8a04a23e86
commit e9cd0374f4
2 changed files with 476 additions and 1 deletions
+60 -1
View File
@@ -3,7 +3,7 @@
> 本文件为项目进度唯一真理源,所有进度信息以此为准。
> 其他文档中的进度描述一律以本文为准。
**最后更新**2026-06-17 (v23)
**最后更新**2026-06-21 (v24)
---
@@ -173,6 +173,65 @@
| Landing 页 GitHub 链接修正 | 2026-06-18 | `your-org``github.com` |
| v23 全部功能验收 | 2026-06-18 | 12 页 200 OK、org_id 隔离生效、RBAC(require_role)11路由、菜单7项正确、factory/insights 新页、dashboard 重设计 |
## 十一、外推营销系统(v24 · 2026-06-21
### 从「内容生产」到「外部推广」
**背景**:平台此前只覆盖平台内生产的内容的 SEO/GEO 优化,无法对用户已有的外部网站、公众号、小程序等做 SEO 推广。v24 新增完整的外部推广模块。
### 新增数据模型(6 张表)
| 模型 | 表名 | 说明 |
|------|------|------|
| `ExternalProduct` | `external_products` | 外部推广产品(website/article/wechat_account/miniprogram|
| `PromotionCampaign` | `promotion_campaigns` | 推广活动,关联产品和关键词 |
| `CampaignKeyword` | `campaign_keywords` | 关键词跟踪(搜索量/难度/排名)|
| `SEOAudit` | `seo_audits` | SEO 审计报告(6 维度评分)|
| `KeywordRanking` | `keyword_rankings` | 多引擎关键词排名记录 |
| `OptimizationTask` | `optimization_tasks` | AI 生成的优化建议 |
### API 端点(20 个)
| 端点 | 功能 |
|------|------|
| `GET/POST/PUT/DELETE /api/external/products` | 产品 CRUD |
| `GET/POST/PUT/DELETE /api/external/campaigns` | 活动 CRUD |
| `GET/POST/PUT/DELETE /api/external/keywords` | 关键词 CRUD |
| `GET /api/external/audits` | SEO 审计记录列表 |
| `GET /api/external/audits/{id}` | 审计详情(含优化建议)|
| `GET /api/external/rankings` | 关键词排名列表 |
| `GET /api/external/rankings/overview` | 排名概览统计 |
| `GET /api/external/optimization-tasks` | 优化建议列表 |
| `PATCH /api/external/optimization-tasks/{id}` | 更新任务状态 |
| `GET /api/external/overview` | 外推营销总览 |
### SEO 审计脚本
`scripts/seo_auditor.py` — 自动抓取目标网站并分析:
| 维度 | 权重 | 检测项 |
|------|------|--------|
| Meta 标签 | 20% | title/description/keywords/OG tags |
| 标题结构 | 15% | H1/H2 存在性、层级连续性 |
| 内容质量 | 25% | 字数、图片 alt、关键词密度 |
| 性能 | 10% | 渲染阻塞资源、图片尺寸 |
| 链接 | 10% | 内链/外链/断链/nofollow |
| 移动端 | 20% | viewport、响应式、字号 |
审计结果自动保存到 DB,生成可追踪的 OptimizationTask。
### 关键文件变更
| 文件 | 改动 |
|------|------|
| `platform/backend/app/models.py` | 新增 6 个模型(ExternalProduct/PromotionCampaign/CampaignKeyword/SEOAudit/KeywordRanking/OptimizationTask|
| `platform/backend/app/schemas.py` | 新增 18 个 Pydantic schema 类 |
| `platform/backend/app/api/external_promotion.py` | **新建** — 20 个 API 端点 |
| `platform/backend/app/main.py` | 注册 external_promotion router |
| `platform/frontend/campaigns.html` | **新建** — 外推营销 SPA 页面(6 Tab)|
| `platform/frontend/uni-nav.js` | 导航增加「外推营销」入口 |
| `scripts/seo_auditor.py` | **新建** — SEO 审计自动化脚本 |
---
## 六、归档日志