diff --git a/PROJECT_COMPLETION_REPORT.md b/PROJECT_COMPLETION_REPORT.md
deleted file mode 100644
index 7c6cb20..0000000
--- a/PROJECT_COMPLETION_REPORT.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# 宇之然内容创作平台 - 项目完成报告
-
-## 📊 总体进度
-- 基础平台 (4月29日): ✅ 完成
-- 管理功能扩展 (5月1-2日): ✅ 完成
-
-## ✅ 已实现功能
-
-### 后端 API
-- 选题管理: GET/POST /api/topics, ...
-- 用户管理: /api/admin/users
-- 案例管理: /api/admin/cases (CRUD)
-- 任务日志: /api/admin/tasklogs (CRUD)
-- LLM配置: /api/admin/llmconfigs (CRUD)
-- 系统配置: /api/admin/systemconfigs (CRUD, value自动JSON解析)
-
-### 数据库与数据
-- 初始数据导入: 20选题 + 30案例
-- 自动创建管理员账号 (admin/admin123)
-- 默认LLM配置和系统配置
-
-### 前端界面
-- 系统管理页面: admin.html (标签页统一管理)
-- 导航菜单: 在 topics.html, logs.html, users.html 的侧边栏与移动导航中添加“系统管理”入口
-- 深色主题保持一致
-
-## 🚀 启动方式
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran
-./start-platform.sh 8001
-# 或
-uvicorn app.main:app --port 8001
-```
-
-默认管理员: admin / admin123
-
-## 📁 关键文件变更
-- `platform/backend/app/main.py`: 注册新路由
-- `platform/backend/app/api/`: 新增 cases.py, task_logs.py, llm_configs.py, system_configs.py
-- `platform/backend/app/schemas.py`: 新增 Case, TaskLog, LLMConfig, SystemConfig 的Schema
-- `automation/data/initial_cases.json`: 扩展至30条案例
-- `platform/frontend/`: 新增 admin.html, 更新导航链接(侧边栏+移动端)
-
-## ⚠️ 注意事项
-- 所有 AI 调用必须串行,频率不超过 30次/分钟
-- 使用 Bearer Token (JWT) 认证
-
----
-生成时间: 2026-05-02
\ No newline at end of file
diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md
deleted file mode 100644
index e194772..0000000
--- a/PROJECT_STRUCTURE.md
+++ /dev/null
@@ -1,243 +0,0 @@
-# 宇之然项目目录结构说明
-
-## 整体布局
-
-```
-yu-zhi-ran/ # 项目根目录
-├── platform/ # ⭐ 管理平台(Web UI + API)
-│ ├── backend/ # FastAPI 后端
-│ │ ├── app/
-│ │ │ ├── main.py # 入口
-│ │ │ ├── database.py # 数据库连接(SQLite)
-│ │ │ ├── models.py # Topic, Article 模型
-│ │ │ ├── schemas.py # Pydantic 验证
-│ │ │ ├── initial_data.py # 初始数据导入
-│ │ │ ├── api/ # REST API 路由
-│ │ │ │ ├── system.py # │ 系统状态、流水线控制、日志
-│ │ │ │ ├── topics.py # │ 选题 CRUD
-│ │ │ │ ├── publisher.py # │ 发布包管理
-│ │ │ │ └── articles.py # │ 文章查看
-│ │ │ └── core/ # │ 业务逻辑封装
-│ │ │ ├── generator.py # │ 调用 scripts/creator.py
-│ │ │ ├── optimizer.py # │ 调用 scripts/compliance_optimizer.py
-│ │ │ └── sync.py # │ 同步 JSON → 数据库
-│ │ └── requirements.txt
-│ ├── frontend/
-│ │ └── index.html # Vue 3 SPA(CDN 依赖)
-│ ├── run.sh # 快速启动脚本
-│ ├── check.py # 部署前检查
-│ ├── README.md # 平台使用文档
-│ └── PORTFOLIO.md # 架构详解
-│
-├── automation/ # 🔄 自动化流水线数据与日志
-│ ├── scripts/ (软链) → ../scripts/ # 实际脚本在 ../scripts/
-│ ├── data/ # 数据存储
-│ │ ├── sustainability_topics.json # ⭐ 核心:选题库
-│ │ ├── drafts/ # 草稿(按日期)
-│ │ │ └── 2026-04-19/
-│ │ │ ├── A02_zhihu.md
-│ │ │ ├── A02_wechat.md
-│ │ │ └── A02_xiaohongshu.md
-│ │ └── releases/ # 发布包(按日期)
-│ │ └── 2026-04-19/
-│ │ ├── zhihu/zhihu_A02_zhihu.html
-│ │ ├── wechat/wechat_A02_wechat.html
-│ │ └── xiaohongshu/
-│ └── logs/ # 运行日志
-│ ├── collector_2026-04-19.log
-│ ├── creator_2026-04-19.log
-│ ├── optimizer_2026-04-19.log
-│ └── publisher_summary_2026-04-19.json
-│
-├── scripts/ # 🛠️ 底层 CLI 脚本(被 automation/scripts/ 调用)
-│ ├── collector.py # 采集热点 + 本地降级
-│ ├── creator.py # 研究→大纲→撰写流水线
-│ ├── compliance_optimizer.py # 合规检查 + 自动修复
-│ ├── publisher.py # 发布包生成(HTML + 指南)
-│ ├── research.py # 资料收集(API + 本地)
-│ ├── outline.py # 大纲生成
-│ ├── writer.py # 核心撰写逻辑
-│ ├── wecom_notifier.py # 企业微信通知(可选)
-│ └── ...(其他辅助脚本)
-│
-├── content/ # 📚 已发布内容存储
-│ ├── published/ # 按 topic_id 组织
-│ │ ├── A01/
-│ │ │ └── 手动发布/
-│ │ │ ├── 知乎/文章.html
-│ │ │ └── 小红书/文章.html
-│ │ └── A02/
-│ ├── drafts/ # 草稿(可选)
-│ ├── ideas/ # 选题记录(Markdown)
-│ └── images/ # 配图资源
-│
-├── config/ # ⚙️ 配置文件
-│ ├── sources.yaml # RSS/网页源配置
-│ └── wecom_config.yaml # 企业微信机器人配置
-│
-├── brand/ # 🏷️ 品牌资产
-│ ├── brand-book.md # 愿景、调性、原则
-│ └── guidelines.md # 内容创作指南
-│
-├── strategy/ # 📈 内容策略
-│ └── 全球-本土比较研究与全新内容战略规划-2026-04-15.md
-│
-├── tasks/ # 📋 项目管理
-│ └── todo.md
-│
-├── research/ # 📊 行业研究
-│ └── trends-2026.md
-│
-├── logs/ # 📝 根目录日志(兼容)
-├── backup/ # 💾 备份归档
-├── README.md # 项目总览
-├── YUZHIRAN_PLATFORM.md # 完整文档(本文件同级)
-├── TEST_FULL_PIPELINE.md # 测试指南
-├── test_full_pipeline.py # 全流程测试脚本
-├── run_publisher.sh # 快速发布脚本
-└── start-platform.sh # 启动管理平台(新增)
-
-# 软链接
-automation/scripts → ../scripts/
-```
-
----
-
-## 🔗 关键依赖关系
-
-### platform/backend/app/core/*.py 的路径计算
-
-| 文件 | parents 层数 | PROJECT_ROOT 指向 |
-|------|-------------|-------------------|
-| `database.py` | `parents[3]` | `yu-zhi-ran/` |
-| `initial_data.py` | `parents[3]` | `yu-zhi-ran/` |
-| `generator.py` | `parents[4]` | `yu-zhi-ran/` |
-| `optimizer.py` | `parents[4]` | `yu-zhi-ran/` |
-| `sync.py` | `parents[4]` | `yu-zhi-ran/` |
-| `api/system.py` | `parents[4]` | `yu-zhi-ran/` |
-| `api/publisher.py` | `parents[4]` | `yu-zhi-ran/` |
-
-**规律**:
-- 在 `app/` 一级:`parents[3]` → `yu-zhi-ran/`
-- 在 `app/api/` 或 `app/core/`:`parents[4]` → `yu-zhi-ran/`
-
-✅ 所有路径已统一修正,可正常工作。
-
----
-
-## 🚀 工作流程
-
-### 自动流水线(cron)
-
-```
-每天 05:00 → collector.py → automation/data/sustainability_topics.json(新增选题)
-每天 05:30 → creator.py → automation/data/drafts/ + HTML 发布包
-每天 05:45 → compliance_optimizer.py → 自动合规检查
-每天 06:00 → publisher.py → content/published/(手动发布包)
-```
-
-### Web 平台手动控制
-
-```
-前端界面
- │
- ├─▶ POST /api/system/generate/run
- │ ↓
- │ core/generator.py → subprocess(scripts/creator.py)
- │ ↓
- │ sync_all_topics() → 更新数据库
- │
- ├─▶ POST /api/system/optimize/run
- │ ↓
- │ core/optimizer.py → subprocess(scripts/compliance_optimizer.py)
- │ ↓
- │ 读取 optimization_report.json → 更新数据库
- │
- └─▶ POST /api/publisher/generate/{topic_id}
- ↓
- api/publisher.py → subprocess(scripts/publisher.py --topic-id X)
- ↓
- 复制 HTML 到 content/published/X/手动发布/
-```
-
----
-
-## 📁 数据源唯一性
-
-**核心数据文件**:`automation/data/sustainability_topics.json`
-
-这是系统中**唯一**的选题状态源:
-- `collector.py` 写入新选题(status: "待处理")
-- `creator.py` 更新为"待审查" → "draft"
-- `compliance_optimizer.py` 更新为"待发布"
-- `publisher.py` 更新为"已发布"
-- `platform` 的 `sync.py` 同步此 JSON 到 SQLite 供前端快速查询
-
-**不要手动编辑数据库**!应通过脚本或 API 修改 JSON。
-
----
-
-## 🎯 部署检查清单
-
-- [x] Python 依赖安装 (`platform/backend/requirements.txt`)
-- [x] 虚拟环境创建(可选)
-- [x] 数据目录存在 (`automation/data/`)
-- [x] 日志目录存在 (`automation/logs/`)
-- [x] 选题 JSON 存在 (`automation/data/sustainability_topics.json`)
-- [x] 前端文件就绪 (`platform/frontend/index.html`)
-- [x] 软链接 `automation/scripts → ../scripts/` 正常
-- [x] 端口 8000 可用
-- [ ] cron 定时任务已配置(如需自动运行)
-
----
-
-## 🔧 常见命令
-
-```bash
-# 1. 启动管理平台
-cd yu-zhi-ran
-./start-platform.sh 8000
-
-# 2. 手动运行完整流水线(测试)
-python test_full_pipeline.py --topic-id A05
-
-# 3. 查看日志
-tail -f automation/logs/creator_$(date +%Y-%m-%d).log
-tail -f automation/logs/optimizer_$(date +%Y-%m-%d).log
-tail -f automation/logs/publisher_summary_$(date +%Y-%m-%d).json
-
-# 4. 查看选题库状态
-python -c "import json; d=json.load(open('automation/data/sustainability_topics.json')); print(f'总:{len(d)}, 待处理:{sum(1 for t in d if t.get(\"status\")==\"待处理\")}, 待发布:{sum(1 for t in d if t.get(\"status\")==\"待发布\")}')"
-
-# 5. 触发单步任务
-python scripts/collector.py
-python scripts/creator.py --topic-id A01
-python scripts/publisher.py --topic-id A01
-
-# 6. API 测试
-curl http://localhost:8000/api/system/status | python3 -m json.tool
-```
-
----
-
-## 📝 说明
-
-### 为何保留软链接?
-
-`automation/scripts/` 通过软链接指向 `../scripts/`,原因:
-- 历史兼容:部分脚本内部使用了硬编码路径 `PROJECT_ROOT/scripts/`
-- 统一管理:所有脚本集中在一个目录,便于维护
-- 避免复制:减少磁盘占用和同步问题
-
-### platform 与 automation 的关系
-
-- **platform**: Web 管理界面 + API 服务
-- **automation**: 数据存储 + 日志归档 + 软链接脚本
-- **scripts**: 实际执行逻辑(CLI 工具)
-
-platform 通过 `subprocess` 调用 `scripts/` 中的脚本,输出写入 `automation/data/` 和 `automation/logs/`。
-
----
-
-**更新日期**: 2026-04-19
-**维护**: AI 助手小然
diff --git a/PROJECT_UPGRADE.md b/PROJECT_UPGRADE.md
deleted file mode 100644
index ee62252..0000000
--- a/PROJECT_UPGRADE.md
+++ /dev/null
@@ -1,321 +0,0 @@
-# 宇之然内容平台 - 项目升级规划
-
-> 从"可持续生活垂直工具" → "通用内容运营全流程平台"
-> Phase 1: 自用验证 → Phase 2: SaaS 产品化
-> **最后更新: 2026-05-08**
-
----
-
-## 一、项目定位
-
-**目标**: 构建覆盖"选题→创作→审核→发布→搜集→反馈"全链路的内容运营工具。
-**当前阶段**: 自用验证(Own Use),同时为 SaaS 产品化预留架构。
-
-**核心原则**:
-- 所有业务逻辑不写死领域/行业相关字段
-- 选题系统完全配置化(评分字段/状态/标签/分类均可自定义)
-- 数据库迁移到 PostgreSQL,支持后续多租户扩展
-
----
-
-## 二、当前进度
-
-### ✅ 已完成
-
-| 模块 | 状态 | 说明 |
-|------|------|------|
-| **数据库迁移** | ✅ 完成 | SQLite → PostgreSQL (yzr_nr),所有表已创建/同步 |
-| **选题配置化** | ✅ 完成 | TopicField + TopicConfigField + TopicStatusConfig 模型,灵活领域/评分字段 |
-| **选题 CRUD** | ✅ 完成 | 支持 field_id/status/tags 过滤,批量操作,评分计算 |
-| **内容日历 API** | ✅ 完成 | 创建/更新/删除排期,按年月查询,状态管理 |
-| **数据追踪 API** | ✅ 完成 | ContentMetrics 模型,仪表盘/趋势/多平台汇总 |
-| **素材库 API** | ✅ 完成 | 上传/管理/标签/搜索,usage_count 统计 |
-| **创作任务 API** | ✅ 完成 | ContentTask 异步任务,状态/进度/结果管理 |
-| **平台配置 API** | ✅ 完成 | 知乎/微信/小红书 平台配置,含合规规则 |
-| **初始化数据** | ✅ 完成 | 默认领域(10个)、状态(5种)、平台(3个)、管理员 |
-| **服务器运行** | ✅ 运行中 | http://localhost:8001 |
-
-### ⚠️ 待前端适配
-
-以下新 API 已完成后端,但前端页面尚未适配:
-
-| 模块 | API | 前端文件 |
-|------|-----|---------|
-| 选题配置 | /api/topic-config/* | topics.html 需改版 |
-| 内容日历 | /api/calendar/* | 需新建 calendar.html |
-| 数据分析 | /api/metrics/* | 需新建 metrics.html |
-| 素材库 | /api/assets/* | 需新建 assets.html |
-| 创作任务 | /api/tasks/* | 需新建 tasks.html |
-| 平台配置 | /api/platform-config/* | 需新建 platforms.html |
-
-### ⏳ 未实现功能
-
-| 优先级 | 模块 | 功能点 | 说明 |
-|--------|------|--------|------|
-| P0 | **内容日历前端** | 日历视图、拖拽排期、提醒设置 | API 已就绪,需前端 |
-| P0 | **数据看板前端** | 趋势图、平台对比、选题推荐 | API 已就绪,需前端 |
-| P0 | **素材库前端** | 图片上传/管理/预览 | API 已就绪,需前端 |
-| P0 | **创作任务前端** | 实时进度条、任务列表、取消 | API 已就绪,需前端 |
-| P1 | **多平台适配** | 一篇长文 → 知乎/小红书/微信各格式 | 核心差异化功能 |
-| P1 | **热点采集** | 跨平台热搜、趋势追踪 | 有 collector 脚本待集成 |
-| P1 | **选题推荐** | 基于历史数据推荐选题 | API 已就绪 (recommend-topics) |
-| P2 | **内容复用** | 长文 → 短笔记 → 回答 → 朋友圈文案 | 自动化脚本 |
-| P2 | **通知系统** | 企业微信/飞书推送 | 有 wecom_notifier.py 待集成 |
-| P2 | **定时任务** | APScheduler 自动执行流水线 | core/scheduler.py 已有 |
-| P3 | **多租户** | 租户隔离、团队协作 | SaaS 预留 |
-| P3 | **支付订阅** | 免费/专业版分级、用量统计 | SaaS 预留 |
-
----
-
-## 三、技术架构
-
-### 3.1 技术栈
-
-| 层次 | 技术 | 说明 |
-|------|------|------|
-| 后端 | FastAPI 0.104+ | ASGI 异步框架 |
-| ORM | SQLAlchemy 2.0+ | PostgreSQL + psycopg2 |
-| 前端 | Vue 3 (CDN) + Element Plus | SPA 单页应用 |
-| 数据库 | PostgreSQL 15 | 自用阶段单租户,SaaS 预留多租户 |
-| 认证 | JWT (python-jose) + bcrypt | Bearer Token |
-| 定时 | APScheduler | 内容日历/定时任务 |
-
-### 3.2 数据库连接
-
-```
-环境变量:
- USE_POSTGRES=true
- PG_HOST=127.0.0.1
- PG_PORT=5432
- PG_DATABASE=yzr_nr
- PG_USER=yzr_nr
- PG_PASSWORD=aTX3WKKnPfRnM5PC
-```
-
-### 3.3 项目结构(后端)
-
-```
-platform/backend/app/
-├── api/ # REST API 路由
-│ ├── auth.py # 认证
-│ ├── topics.py # 选题 CRUD [重构]
-│ ├── articles.py # 文章管理
-│ ├── publishing.py # 发布记录
-│ ├── calendar.py # 内容日历 [NEW]
-│ ├── metrics.py # 数据分析 [NEW]
-│ ├── assets.py # 素材库 [NEW]
-│ ├── tasks.py # 创作任务 [NEW]
-│ ├── platform_config.py # 平台配置 [NEW]
-│ ├── topic_config.py # 选题配置 [NEW]
-│ └── admin/ # 管理后台
-├── core/ # 业务逻辑
-├── models.py # SQLAlchemy 模型 [重构]
-├── schemas.py # Pydantic 验证 [重构]
-├── database.py # 数据库连接 [重构]
-├── initial_data.py # 初始化数据 [重构]
-└── main.py # FastAPI 入口 [更新]
-
-platform/frontend/
-├── index.html # 主仪表盘
-├── topics.html # 选题管理
-├── calendar.html # 内容日历 [待建]
-├── metrics.html # 数据分析 [待建]
-├── assets.html # 素材库 [待建]
-├── login.html
-├── admin.html
-└── ...
-```
-
----
-
-## 四、数据模型
-
-### 4.1 选题系统(配置化)
-
-```
-TopicField(领域/分类)
- id, name, icon, color, description, parent_id, sort_order, is_active
-
-TopicConfigField(选题评分字段配置)
- id, field_id → TopicField, name, key, field_type, weight, options, min/max, is_required, sort_order
-
-TopicStatusConfig(状态配置)
- id, status, label, color, icon, sort_order, is_default
-
-Topic(选题,主表)
- id, field_id → TopicField, field_name, title, status, priority_score, total_score,
- format, core_concept, audience_pain, unique_angle, priority,
- tags(JSON), custom_data(JSON), scoring_data(JSON),
- cases(JSON), source_file, lock_by, lock_at,
- created_at, updated_at, generated_at, ready_at, published_at,
- compliance_score, platform_urls(JSON)
-```
-
-### 4.2 新增模型
-
-| 模型 | 用途 |
-|------|------|
-| ContentCalendar | 内容日历/排期管理 |
-| ContentMetrics | 文章数据追踪(阅读/点赞/评论等) |
-| MediaAsset | 素材库(图片/视频/文档) |
-| PlatformConfig | 平台配置(知乎/微信/小红书格式规则) |
-| ContentTask | 创作任务(异步流水线状态) |
-
----
-
-## 五、API 清单
-
-### 选题配置
-
-```
-GET /api/topic-config/fields
-POST /api/topic-config/fields
-PUT /api/topic-config/fields/{field_id}
-DELETE /api/topic-config/fields/{field_id}
-GET /api/topic-config/fields/{field_id}/scoring
-POST /api/topic-config/fields/{field_id}/scoring
-PUT /api/topic-config/scoring/{config_id}
-DELETE /api/topic-config/scoring/{config_id}
-POST /api/topic-config/fields/{field_id}/scoring/batch
-```
-
-### 选题
-
-```
-GET /api/topics?field_id=&status=&tag=&search=&limit=&offset=
-POST /api/topics
-GET /api/topics/stats
-GET /api/topics/{topic_id}
-PUT /api/topics/{topic_id}
-DELETE /api/topics/{topic_id}
-POST /api/topics/{topic_id}/score
-POST /api/topics/{topic_id}/publish
-POST /api/topics/{topic_id}/lock
-POST /api/topics/{topic_id}/unlock
-GET /api/topics/{topic_id}/articles
-GET /api/topics/{topic_id}/metrics
-POST /api/topics/batch-update-status
-GET /api/topics/field-distribution
-```
-
-### 内容日历
-
-```
-GET /api/calendar?year=&month=
-GET /api/calendar/entries?start_date=&end_date=&status=&platform=
-POST /api/calendar/entries
-PUT /api/calendar/entries/{entry_id}
-DELETE /api/calendar/entries/{entry_id}
-POST /api/calendar/entries/bind-topic
-POST /api/calendar/entries/from-topic?topic_id=&platform=
-GET /api/calendar/stats?year=&month=
-```
-
-### 数据分析
-
-```
-GET /api/metrics/dashboard?days=
-GET /api/metrics/trend?days=&group_by=
-GET /api/metrics/entries?topic_id=&platform=
-POST /api/metrics/entries
-PUT /api/metrics/entries/{metric_id}
-DELETE /api/metrics/entries/{metric_id}
-GET /api/metrics/topics/{topic_id}
-GET /api/metrics/by-platform
-GET /api/metrics/recommend-topics?limit=
-```
-
-### 素材库
-
-```
-GET /api/assets?file_type=&tag=&topic_id=&search=&limit=&offset=
-GET /api/assets/tags
-GET /api/assets/counts
-POST /api/assets/upload
-PUT /api/assets/{asset_id}
-DELETE /api/assets/{asset_id}
-POST /api/assets/{asset_id}/use
-```
-
-### 创作任务
-
-```
-GET /api/tasks?status=&topic_id=&stage=&limit=
-GET /api/tasks/active
-POST /api/tasks
-GET /api/tasks/{task_id}
-PUT /api/tasks/{task_id}/start
-PUT /api/tasks/{task_id}/progress
-PUT /api/tasks/{task_id}/complete
-PUT /api/tasks/{task_id}/fail
-DELETE /api/tasks/{task_id}
-POST /api/tasks/run-creator
-```
-
-### 平台配置
-
-```
-GET /api/platform-config?active_only=
-POST /api/platform-config
-GET /api/platform-config/{platform}
-PUT /api/platform-config/{platform}
-DELETE /api/platform-config/{platform}
-```
-
----
-
-## 六、实施计划
-
-### Phase 1(当前):自用验证
-
-**目标**: 2个月内完成全链路闭环,自己稳定产出10-20篇文章
-
-**已完成**:
-- ✅ 数据库迁移 PostgreSQL
-- ✅ 选题系统配置化
-- ✅ 所有新模型 + API 后端完成
-- ✅ 服务运行中
-
-**进行中**:
-- ⏳ 前端适配(新页面)
-
-**待开发**:
-- 前端: 内容日历/数据分析/素材库/创作任务 页面
-- 前端: 选题管理改版(适配配置化)
-- 集成: 热点采集脚本 → API
-- 集成: 企微通知 → API
-- 集成: 多平台格式适配
-
-### Phase 2:SaaS 产品化(待定)
-
----
-
-## 七、启动方式
-
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran/platform/backend
-
-# 环境变量(.env 已配置)
-USE_POSTGRES=true PG_HOST=127.0.0.1 PG_PORT=5432 \
-PG_DATABASE=yzr_nr PG_USER=yzr_nr PG_PASSWORD=aTX3WKKnPfRnM5PC \
-python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8001 --reload
-
-# 默认管理员: admin / admin123
-# API 文档: http://localhost:8001/docs
-```
-
----
-
-## 八、数据库当前状态
-
-```
-领域: 10 个(未来工作方式、AI与效率、可持续生活、数字游民、个人成长、科技人文、个人知识工厂、科技人文交叉、可持续生活系统、测试)
-选题: 26 个
-状态分布: 待处理20 / 待审查2 / 待发布3 / 已发布1
-平台: 3 个(知乎/微信公众号/小红书)
-```
-
----
-
-*文档版本: v0.2*
-*更新时间: 2026-05-08*
\ No newline at end of file
diff --git a/README-xhs-promoter.md b/README-xhs-promoter.md
deleted file mode 100644
index 8ea5bac..0000000
--- a/README-xhs-promoter.md
+++ /dev/null
@@ -1,141 +0,0 @@
-# 小红书自动化推广系统(宇之然项目组件)
-
-## 📋 项目概览
-
-为手机配件京东店铺设计的**小红书自动化内容发布系统**,当前会话完全隔离,不影响其他agent。
-
-## 🗂️ 目录结构
-
-```
-/root/openclaw-workspace/projects/yu-zhi-ran/
-├── sessions/promoter/ # 🔒 会话隔离存储
-│ ├── cookies/ # 登录状态
-│ ├── screenshots/ # 操作截图
-│ └── logs/ # 运行日志
-├── scripts/ # 自动化脚本
-│ ├── xhs-promoter.sh # 基础脚本
-│ └── xhs-publish-advanced.sh # 高级脚本
-├── content/ # 内容库
-│ ├── posts/ # 笔记内容
-│ └── images/ # 图片素材
-├── cron/ # 定时任务配置
-│ └── promoter-schedule.json
-└── docs/ # 文档
- └── xhs-setup-guide.md
-```
-
-## ✅ 已完成
-
-1. **环境搭建**
- - [x] 创建会话隔离目录结构
- - [x] 验证 agent-browser 可用(v0.23.0)
- - [x] 验证 Xvfb 支持
- - [x] 分析小红书登录页结构
-
-2. **脚本开发**
- - [x] 基础登录/检查/发布脚本
- - [x] 高级发布脚本(批量、定时、状态监控)
- - [x] 示例内容模板(手机配件场景)
-
-3. **配置文档**
- - [x] 设置指南(Cookie导入)
- - [x] 定时任务配置
-
-## ⏳ 待完成
-
-1. **登录授权**(需要你的操作)
- - [ ] 获取小红书Cookie
- - [ ] 上传到隔离目录
- - [ ] 验证登录状态
-
-2. **内容准备**
- - [ ] 准备产品图片
- - [ ] 创建真实内容文件
- - [ ] 测试单篇发布
-
-3. **自动化测试**
- - [ ] 测试定时发布
- - [ ] 监控日志输出
- - [ ] 调整风控参数
-
-## 🚀 快速开始
-
-### 1. 查看当前状态
-```bash
-/root/openclaw-workspace/projects/yu-zhi-ran/scripts/xhs-publish-advanced.sh status
-```
-
-### 2. 查看帮助
-```bash
-/root/openclaw-workspace/projects/yu-zhi-ran/scripts/xhs-publish-advanced.sh help
-```
-
-### 3. 创建示例内容
-```bash
-/root/openclaw-workspace/projects/yu-zhi-ran/scripts/xhs-publish-advanced.sh sample
-```
-
-### 4. 查看示例内容
-```bash
-cat /root/openclaw-workspace/projects/yu-zhi-ran/content/posts/sample-post.json
-```
-
-## 🔐 登录步骤(关键)
-
-由于服务器无图形界面,需要**Cookie导入**方式登录:
-
-### 方式一:浏览器扩展导出(推荐)
-
-1. 在本地电脑登录 [creator.xiaohongshu.com](https://creator.xiaohongshu.com)
-2. 安装 [EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/) 扩展
-3. 导出为 JSON 格式
-4. 保存到服务器的隔离路径:
- ```
- /root/openclaw-workspace/projects/yu-zhi-ran/sessions/promoter/cookies/xhs-session.json
- ```
-
-### 方式二:手动复制Cookie
-
-1. F12打开开发者工具 → Application → Cookies
-2. 复制关键字段:`session_id`, `web_id`, `gid`, `a1` 等
-3. 创建JSON文件:
- ```json
- [
- {"name": "session_id", "value": "your_value", "domain": ".xiaohongshu.com"},
- {"name": "web_id", "value": "your_value", "domain": ".xiaohongshu.com"}
- ]
- ```
-
-## 📊 自动化能力
-
-| 功能 | 状态 | 说明 |
-|------|------|------|
-| 登录状态保持 | ✅ | Cookie隔离存储 |
-| 单篇发布 | 🧪 | 框架完成,需测试 |
-| 批量发布 | 🧪 | 支持JSON配置 |
-| 定时任务 | 🧪 | Cron配置就绪 |
-| 图片上传 | ⚠️ | 需要进一步开发 |
-| 评论互动 | ❌ | 需额外开发,风险高 |
-
-## ⚠️ 风控建议
-
-1. **发布频率**: 每天1-2条,间隔至少6小时
-2. **内容去重**: 同一产品换不同角度拍摄
-3. **账号权重**: 建议养号2周后再开自动化
-4. **备用策略**: 准备2-3个小号轮换
-
-## 📝 下一步行动
-
-需要你来完成:
-
-1. [ ] **提供Cookie** - 按上述方式获取并上传
-2. [ ] **准备素材** - 产品图片(建议每个产品5-10张场景图)
-3. [ ] **测试发布** - 验证自动化流程
-4. [ ] **启用定时** - 配置正式发布计划
-
-或者我可以帮你:
-- 创建更详细的内容模板
-- 配置知乎/其他平台
-- 开发评论互动功能(谨慎)
-
-你想先完成哪一步?
diff --git a/README.md b/README.md
index f35613b..4a53a2f 100644
--- a/README.md
+++ b/README.md
@@ -1,156 +1,134 @@
# 宇之然内容创作平台
-一个轻量级的管理平台,用于监控和操作内容生产流水线。
+> 覆盖"选题→创作→审核→发布→数据追踪"全链路的内容运营工具
-## 快速开始
-
-### 1. 环境准备
-
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran/platform
-
-# 创建虚拟环境(推荐)
-backend/venv/bin/python -m venv backend/venv # 若不存在
-source backend/venv/bin/activate
-
-# 安装依赖
-pip install -r backend/requirements.txt
-```
-
-### 2. 启动服务
-
-```bash
-# 方式一:使用启动脚本(推荐)
-./run.sh 8000
-
-# 方式二:手动启动
-cd backend
-python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
-```
-
-### 3. 访问
-
-- **界面**: http://localhost:8000/
-- **API文档**: http://localhost:8000/docs
-- **系统状态**: http://localhost:8000/api/system/status
-
-## 核心功能
-
-| 功能 | 描述 |
-|------|------|
-| 📊 仪表盘 | 选题总数、待发布数、今日生成 |
-| 🔄 流水线控制 | 触发创作、合规优化、状态监控 |
-| 📝 选题管理 | 列表、筛选、预览、发布 |
-
-| 📋 日志查看 | creator/optimizer/collector 日志 |
-
-## 与自动化流水线的集成
-
-本平台位于 `platform/`,不修改原有 `automation/scripts/` 脚本。
-
-**集成方式**:
-- `backend/app/core/generator.py` 调用 `scripts/creator.py`
-- `backend/app/core/optimizer.py` 调用 `scripts/compliance_optimizer.py`
-- `backend/app/api/publisher.py` 调用 `scripts/publisher.py`
-- 数据存储:`automation/data/` 为唯一数据源
-- 同步:`sync.py` 将 JSON 选题同步到 SQLite 数据库供前端查询
-
-**目录结构关系**:
-
-```
-yu-zhi-ran/
-├── platform/ # 管理平台(本目录)
-│ ├── backend/app/
-│ │ ├── core/generator.py → 调用 ../scripts/creator.py
-│ │ ├── core/optimizer.py → 调用 ../scripts/compliance_optimizer.py
-│ │ └── api/publisher.py → 调用 ../scripts/publisher.py
-│ └── frontend/index.html # UI
-├── automation/
-│ ├── data/ ← 数据源(JSON)
-│ │ ├── sustainability_topics.json
-│ │ ├── drafts/
-│ │ └── releases/
-│ └── logs/ ← 日志(creator, optimizer, publisher)
-└── scripts/
- ├── creator.py ← 被调用
- ├── compliance_optimizer.py
- └── publisher.py
-```
-
-## 配置
-
-环境变量(可选):
-
-| 变量 | 说明 | 默认 |
-|------|------|------|
-| `PROJECT_ROOT` | 项目根目录 | 自动推导 |
-| `DATA_DIR` | 平台数据库目录 | `platform/data` |
-| `LOG_LEVEL` | 日志级别 | `INFO` |
-| `ALLOWED_ORIGINS` | CORS允许的源 | `*` |
-
-示例:
-```bash
-export PROJECT_ROOT=/path/to/yu-zhi-ran
-./run.sh 8000
-```
-
-## 开发调试
-
-```bash
-# 检查依赖和环境
-python check.py
-
-# 查看 API 日志
-tail -f automation/logs/creator_$(date +%Y-%m-%d).log
-
-# 数据库初始化(首次)
-cd backend
-python -c "from app.database import init_db; init_db()"
-
-# 手动同步数据(测试)
-curl -X POST http://localhost:8000/api/system/sync/run
-```
-
-## 故障排查
-
-| 症状 | 检查点 |
-|------|--------|
-| 前端显示无选题 | 1. `automation/data/sustainability_topics.json` 是否存在且包含 `status: \"待处理\"` 的数据
2. 点击"全量刷新"按钮 |
-| 创作任务失败 | 1. 查看 `automation/logs/creator_*.log`
2. 确认 `scripts/creator.py` 可执行 |
-| 发布包为空 | 1. 确认 `automation/data/releases/YYYY-MM-DD/` 下有对应平台的 HTML
2. 点击发布Tab → "重新生成" |
-| 端口8000占用 | 停止其他 uvicorn 进程或 `./run.sh 8080` 改用其他端口 |
-
-## 部署清单
-
-- [x] FastAPI 后端(无 Docker,直接运行)
-- [x] Vue 3 前端(CDN依赖,无需构建)
-- [x] SQLite 数据库(`platform/data/yzr.db`)
-- [x] 自动化流水线集成(subprocess 调用)
-- [x] 数据同步模块(JSON ↔ SQLite)
-- [x] 流水线状态监控面板
-- [x] 日志查看功能
-- [ ] 反向代理(Nginx)配置(如需外网访问)
-- [ ] HTTPS(Let's Encrypt)
-- [ ] 系统服务(systemd)
-
-如需外网访问,建议配置 Nginx 反向代理和 HTTPS。
-
-## 技术栈
-
-- **后端**: FastAPI 0.115.0 + Uvicorn
-- **前端**: Vue 3 + Element Plus
-- **数据库**: SQLite 3
-- **脚本**: Python 3 (subprocess)
-- **样式**: Tailwind CSS (CDN)
-
-## 文档
-
-- 详细架构设计: `PORTFOLIO.md`
-- 使用说明: 本文档
-- API 文档: http://localhost:8000/docs (运行后)
+**最后更新: 2026-05-09**
---
-**版本**: 0.1.0
-**更新**: 2026-04-19
-**维护**: 宇之然 AI 助手
+## 当前状态
+
+| 模块 | 状态 |
+|------|------|
+| 后端 API | ✅ 完成 |
+| 前端页面 | ✅ 完成 |
+| PostgreSQL | ✅ 运行中 |
+| 服务 | ✅ 运行中 (端口 8001) |
+
+---
+
+## 技术栈
+
+| 层次 | 技术 |
+|------|------|
+| 后端 | FastAPI 0.104+ |
+| ORM | SQLAlchemy 2.0+ |
+| 数据库 | PostgreSQL 15 |
+| 前端 | Vue 3 (CDN) + Element Plus |
+| 认证 | JWT (python-jose) + bcrypt |
+
+---
+
+## 数据库配置
+
+```
+USE_POSTGRES=true
+PG_HOST=127.0.0.1
+PG_PORT=5432
+PG_DATABASE=yzr_nr
+PG_USER=yzr_nr
+PG_PASSWORD=aTX3WKKnPfRnM5PC
+```
+
+---
+
+## 启动方式
+
+```bash
+cd /root/openclaw-workspace/projects/yu-zhi-ran
+./start-platform.sh 8001
+```
+
+默认管理员: **admin** / **admin123**
+
+---
+
+## 页面入口
+
+| 页面 | 地址 |
+|------|------|
+| 仪表盘 | http://localhost:8001/ |
+| 选题管理 | http://localhost:8001/topics.html |
+| 内容日历 | http://localhost:8001/calendar.html |
+| 数据分析 | http://localhost:8001/metrics.html |
+| 素材库 | http://localhost:8001/assets.html |
+| 创作任务 | http://localhost:8001/tasks.html |
+| 平台配置 | http://localhost:8001/platforms.html |
+| 系统管理 | http://localhost:8001/admin.html |
+| API 文档 | http://localhost:8001/docs |
+
+---
+
+## API 模块
+
+| 模块 | 文件 | 功能 |
+|------|------|------|
+| 认证 | auth.py | 登录/注册/JWT |
+| 选题 | topics.py | CRUD、评分、批量操作 |
+| 选题配置 | topic_config.py | 领域/评分字段/状态配置 |
+| 文章 | articles.py | 文章管理 |
+| 发布 | publishing.py | 发布记录 |
+| 内容日历 | calendar.py | 排期、绑定选题 |
+| 数据分析 | metrics.py | 仪表盘、趋势、推荐 |
+| 素材库 | assets.py | 上传、标签、搜索 |
+| 创作任务 | tasks.py | 异步任务、进度管理 |
+| 平台配置 | platform_config.py | 知乎/微信/小红书 |
+| 系统管理 | admin.py | 用户/案例/日志/配置 |
+
+---
+
+## 数据模型
+
+- **TopicField** - 领域分类配置
+- **TopicConfigField** - 选题评分字段
+- **TopicStatusConfig** - 选题状态配置
+- **Topic** - 选题主表
+- **ContentCalendar** - 内容日历
+- **ContentMetrics** - 数据追踪
+- **MediaAsset** - 素材库
+- **PlatformConfig** - 平台配置
+- **ContentTask** - 创作任务
+- **User** - 用户
+- **Case** - 案例库
+
+---
+
+## 初始化数据
+
+- 领域: 6 个(未来工作方式、AI与效率、可持续生活、数字游民、个人成长、科技人文)
+- 状态: 5 种(待处理、待审查、草稿、待发布、已发布)
+- 平台: 3 个(知乎、微信公众号、小红书)
+- 管理员: admin/admin123
+
+---
+
+## 项目结构
+
+```
+yu-zhi-ran/
+├── platform/
+│ ├── backend/
+│ │ ├── app/
+│ │ │ ├── api/ # REST API
+│ │ │ ├── core/ # 业务逻辑
+│ │ │ ├── models.py # SQLAlchemy 模型
+│ │ │ ├── schemas.py # Pydantic 验证
+│ │ │ ├── database.py # 数据库连接
+│ │ │ ├── main.py # FastAPI 入口
+│ │ │ └── initial_data.py
+│ │ └── venv/
+│ └── frontend/ # Vue + Element Plus SPA
+├── automation/ # 自动化脚本
+├── content/ # 内容数据
+└── scripts/ # 工具脚本
+```
\ No newline at end of file
diff --git a/README_NEW.md b/README_NEW.md
deleted file mode 100644
index f1e7922..0000000
--- a/README_NEW.md
+++ /dev/null
@@ -1,262 +0,0 @@
-# 宇之然内容管理平台
-
-> 自动化内容生产 + Web 管理界面
-
-一个可持续、可管理的内容创业系统,实现从选题采集到多平台发布的全流程自动化。
-
----
-
-## 🎯 核心能力
-
-- ✅ **全自动流水线**:采集 → 创作 → 合规 → 发布准备(每日凌晨运行)
-- ✅ **Web 管理界面**:一键控制、实时监控、可视化发布包管理
-- ✅ **降级策略**:外部源失效时自动切换本地案例库,保证稳定产出
-- ✅ **多平台支持**:知乎、小红书、微信公众号(HTML 发布包)
-- ✅ **风控设计**:半自动发布(生成 HTML + 人工复制),避免平台封号
-
----
-
-## 📦 项目结构(简洁版)
-
-```
-yu-zhi-ran/
-├── platform/ # Web 管理平台(FastAPI + Vue 3)
-│ ├── backend/ # API 服务
-│ └── frontend/ # 管理界面
-├── automation/ # 自动化数据 + 日志
-│ ├── data/ # JSON 选题库、草稿、发布包
-│ ├── logs/ # 运行日志
-│ └── scripts/ → ../scripts/ # 软链到 scripts/
-├── scripts/ # CLI 脚本(collector, creator, optimizer...)
-├── content/ # 已发布内容存储
-├── config/ # 配置文件(RSS源、机器人)
-├── start-platform.sh # 快速启动管理平台
-└── README_NEW.md # 本文档
-```
-
----
-
-## 🚀 快速开始
-
-### 1️⃣ 启动管理平台(推荐)
-
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran
-./start-platform.sh 8001
-```
-
-访问:
-- 界面:http://localhost:8001/
-- API 文档:http://localhost:8001/docs
-
-### 2️⃣ 测试自动化流水线
-
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran
-python test_full_pipeline.py --topic-id A01
-```
-
-预期输出:
-- 生成 `automation/data/drafts/2026-04-19/A01_*.md`
-- 生成 `automation/data/releases/2026-04-19/*/A01_*.html`
-- 合规自动通过
-
-### 3️⃣ 查看当前状态
-
-```bash
-# 选题库统计
-python -c "import json; d=json.load(open('automation/data/sustainability_topics.json')); print(f'总{len(d)} 待处理:{sum(1 for t in d if t.get(\"status\")==\"待处理\")} 待发布:{sum(1 for t in d if t.get(\"status\")==\"待发布\")}')"
-
-# 日志(今日)
-tail -f automation/logs/creator_$(date +%Y-%m-%d).log
-```
-
----
-
-## 🔄 系统架构
-
-```
-定时任务 (cron)
- │
- ├─▶ 05:00 collector.py → automation/data/sustainability_topics.json(选题)
- ├─▶ 05:30 creator.py → drafts/ + releases/(HTML)
- ├─▶ 05:45 optimizer.py → 合规报告
- └─▶ 06:00 publisher.py → content/published/(发布包)
-
-Web 平台(可选控制)
- │
- ├─▶ 一键触发创作/优化
- ├─▶ 查看选题列表和详情
- ├─▶ 生成发布包、预览HTML、复制
- └─▶ 查看实时流水线状态
-```
-
----
-
-## 📊 当前运行状态(2026-04-19)
-
-| 指标 | 数值 |
-|------|------|
-| 总选题数 | 22 |
-| 待处理 | 20 |
-| 待发布 | 2 (A01, A02) |
-| 自动运行 | ✅ 正常(05:00-06:00) |
-| 最新运行 | A02(05:30 完成,8秒) |
-| 合规通过率 | 100%(3/3) |
-
-待发布内容已就绪,可手动发布到知乎/小红书。
-
----
-
-## 🎮 主要操作指南
-
-### 触发创作任务
-
-**Web 界面**:平台 → "运行创作任务" 按钮
-
-**或命令行**:
-```bash
-python scripts/creator.py --topic-id A03
-```
-
-### 生成发布包
-
-**Web 界面**:选题 → 发布 → "重新生成"
-
-**或命令行**:
-```bash
-python scripts/publisher.py --topic-id A01
-```
-
-发布包位置:
-```
-content/published/A01/手动发布/
-├── 知乎/文章.html
-└── 小红书/文章.html
-```
-
-### 标记为已发布
-
-在 Web 界面"发布管理"中填写各平台链接 → "确认发布"
-
-这会更新选题状态为"已发布"并保存链接。
-
----
-
-## ⚙️ 配置
-
-### 数据源(automation/config/sources.yaml)
-
-```yaml
-sources:
- - name: "新华网-环保频道"
- type: "rss"
- url: "http://..."
-
- - name: "本地案例库"
- type: "local_markdown"
- path: "automation/data/cases.md"
-```
-
-### 环境变量(platform/.env,可选)
-
-```bash
-PROJECT_ROOT=/root/openclaw-workspace/projects/yu-zhi-ran
-LOG_LEVEL=INFO
-```
-
----
-
-## 📝 开发调试
-
-```bash
-# 1. 检查环境
-cd platform
-python check.py
-
-# 2. 启动服务(开发模式)
-./run.sh 8000
-
-# 3. 查看 API 日志(新终端)
-tail -f automation/logs/creator_$(date +%Y-%m-%d).log
-
-# 4. 重置数据库(如需)
-rm -f data/yzr.db
-cd platform/backend
-python -c "from app.database import init_db; init_db(); from app.initial_data import import_topics_from_json; import_topics_from_json()"
-```
-
----
-
-## 🚧 注意事项
-
-### 路径规范
-
-所有 `platform/backend/app/**/*.py` 必须使用相对路径计算 `PROJECT_ROOT`:
-
-- `app/database.py`, `initial_data.py`: `Path(__file__).resolve().parents[3]`
-- `app/api/*.py`, `app/core/*.py`: `Path(__file__).resolve().parents[4]`
-
-禁止使用硬编码绝对路径!
-
-### 软链接
-
-```
-platform/data → ../data
-platform/logs → ../logs
-automation/scripts → ../scripts/
-```
-
-这些链接确保平台和自动化模块共享数据。
-
-### 数据流向
-
-**唯一真理源**:`automation/data/sustainability_topics.json`
-
-- 所有状态更新(待处理 → 待发布 → 已发布)都应写入此 JSON
-- `platform` 通过 `sync.py` 同步到 SQLite 供前端快速查询
-- 不要直接修改数据库而不更新 JSON!
-
----
-
-## 📚 详细文档
-
-- `YUZHIRAN_PLATFORM.md` - 完整项目文档(架构、API、扩展)
-- `platform/PORTFOLIO.md` - 平台架构详解
-- `platform/README.md` - 平台使用说明
-- `PROJECT_STRUCTURE.md` - 目录结构说明
-
----
-
-## 🐛 故障排查
-
-| 问题 | 检查点 | 命令 |
-|------|--------|------|
-| Web 界面无数据 | JSON 是否同步? | `curl http://localhost:8000/api/system/status` |
-| 创作失败 | creator 日志 | `tail -n 50 automation/logs/creator_*.log` |
-| 发布包缺失 | releases 目录 | `ls automation/data/releases/$(date +%Y-%m-%d)/` |
-| 端口占用 | 8000 被谁用? | `lsof -i:8000` |
-
----
-
-## 🎉 现状总结
-
-昨天(4月18日)完成:
-- 数据源切换(新华网+人民网)
-- 降级策略(本地案例库保底)
-- 锁机制(2小时超时)
-- publisher 发布包系统
-- 前端管理界面
-
-今天(4月19日):
-- 统一项目结构,整合 platform + automation
-- 修正所有路径计算
-- 添加软链接统一数据目录
-- 创建启动脚本和文档
-
-**状态**:✅ 系统稳定运行,每日自动产出内容,Web 平台就绪。
-
----
-
-**维护**: AI 助手小然
-**更新**: 2026-04-19
diff --git a/TASK_SUMMARY_2026-04-19.md b/TASK_SUMMARY_2026-04-19.md
deleted file mode 100644
index 9ea42f2..0000000
--- a/TASK_SUMMARY_2026-04-19.md
+++ /dev/null
@@ -1,232 +0,0 @@
-# 宇之然项目 - 2026-04-19 任务完成报告
-
-## 📋 完成事项
-
-### 1. ✅ 新增教育类选题
-
-- **D06**: AI辅导孩子写作业:工具选型与使用边界
-- **D07**: 用AI自制科普动画:父亲的亲子项目实践
-
-**效果**:D 方向(科技人文交叉)扩展至 7 个选题,占比 31.8%
-
-**更新位置**:
-- `automation/data/sustainability_topics.json` (+2)
-- 数据库已同步(platform/backend/data/yzr.db)
-- 管理端 API 可查
-
----
-
-### 2. ✅ 优化信息源配置
-
-**文件**: `config/sources.yaml`
-
-**新增/修改**:
-- 增加澎湃新闻-绿色频道 RSS
-- 为每个中文源添加 `keywords` 字段(中英文可持续性词汇)
-- 调整 `sustainability_categories` 映射
-
-**信息源总数**: 10个
-- 中文源:5个(新华网、人民网、澎湃新闻、中国环境报、国家发改委)
-- 英文源:3个(UNEP、WEF、Circularity News)
-- 本地源:2个(案例库、历史选题库)
-
----
-
-### 3. ✅ 修复本地案例库
-
-**文件**: `automation/data/sustainability_cases.json`
-
-**改动**:
-- 重建结构化 JSON 案例库(原文件解析失效)
-- 新增 6 个高质量案例(日本东京、瑞典斯德哥尔摩、荷兰阿姆斯特丹、法国、德国、中国上海)
-- 每个案例包含完整字段:country, category, title, core_idea, data_facts, global_advantage, china_pain_point, localization_suggestion, mvp_action, source_url, 评分等
-
-**验证**:
-```
-✅ collector 加载: 6 个案例
-✅ JSON 格式有效
-✅ SustainabilityCase 解析成功
-```
-
----
-
-### 4. 🔧 修复 collector.py 路径计算
-
-**问题**: `PROJECT_ROOT` 计算错误(只上升2层)
-**修复**: 改为 `Path(__file__).parent.parent.parent`(上升3层到项目根)
-
-**影响**: 日志、数据、配置文件路径全部修正
-
----
-
-### 5. 🔧 增强 RSS 关键词匹配
-
-**改动**:
-- 支持每个信息源自定义关键词(`keywords` 字段)
-- RSS 抓取数量从 10 增至 15
-- 处理 `content` 为空的情况(fallback 到 title)
-- 关键词列表扩展(增加中文词汇)
-
----
-
-### 6. ✅ 验证 Gitea 端口冲突解决
-
-- yhl 服务:3000
-- Gitea:2999(原 3000)
-- wdKJ:3001
-- yu-zhi-ran:8001
-
-**端口清单已更新**: `network/ports-registry.md`
-
----
-
-### 7. ✅ wdkj 项目信息归档
-
-**文件**: `projects/wdkj-info.md`
-
-内容:项目位置、端口、配置、密钥、API、管理后台等信息完整备份
-
----
-
-## 📊 系统当前状态
-
-### 自动化流水线(定时)
-
-| 任务 | 时间 | 脚本 | 状态 |
-|------|------|------|------|
-| collector | 05:00 | collector.py | ✅ 已配置 |
-| creator | 05:30 | creator.py | ✅ 已配置 |
-| optimizer | 05:45 | compliance_optimizer.py | ✅ 已配置 |
-| publisher | 06:00 | publisher.py | ✅ 已配置 |
-
-**下次运行**: 2026-04-20 凌晨 05:00 开始
-
----
-
-### 选题库(2026-04-19 15:30)
-
-| 领域 | 数量 | 待发布 | 待处理 |
-|------|------|--------|--------|
-| 未来工作方式 | 5 | 2 | 3 |
-| 可持续生活系统 | 5 | 0 | 5 |
-| 个人知识工厂 | 5 | 0 | 5 |
-| 科技人文交叉 | 7 | 0 | 7 |
-| **总计** | **22** | **2** | **20** |
-
-**状态说明**:
-- 待发布(A01, A02):release 包已就绪,等待手动发布
-- 待处理:可用于自动创作
-
----
-
-### 服务运行状态
-
-| 服务 | 端口 | PID | 状态 |
-|------|------|-----|------|
-| yu-zhi-ran platform | 8001 | 1982655 | ✅ running |
-| Gitea | 2999 | 2007075 | ✅ running |
-| yhl-auto API | 8000 | 2014198 | ✅ running |
-| yhl-auto crawler | - | 1403607 | ✅ running |
-| wdkj-server | 3001 | 1667053 | ✅ running |
-
----
-
-## 🔍 已知问题与待办
-
-### ⚠️ 当前问题
-
-1. **RSS 外部源失效**
- - 新华网、人民网 RSS 抓取返回 0 篇文章
- - 可能原因:RSS URL 失效、关键词过滤过严、源站反爬
- - **临时解决**: 降级策略使用本地案例库(每天至少产出1个选题)
- - **长期解决**: 增加更多可靠中文源(已完成澎湃新闻添加)
-
-2. **企业微信通知失败**
- - 原因:OpenClaw Gateway 未连接
- - 影响:定时任务完成通知无法推送
- - 解决:检查网关状态 `openclaw gateway status`
-
-3. **网页源未自动抓取**
- - 中国环境新闻、国家发改委等标记为"需手动处理"
- - 需要实现网页抓取器(或使用 API 替代)
-
----
-
-### 📝 后续优化建议
-
-1. **增加信息源**
- - [ ] 添加更多可持续性领域 RSS(如:中国能源网、北极星环保网)
- - [ ] 配置新闻 API(如:百度新闻、搜狗新闻)
- - [ ] 实现网页源自动抓取(BeautifulSoup + 智能选择器)
-
-2. **优化案例库**
- - [ ] 扩充案例数量至 50+(每个子领域至少 5 个)
- - [ ] 添加案例来源验证(URL 可访问性检查)
- - [ ] 引入 AI 自动提炼核心观点(减少人工)
-
-3. **关键词匹配**
- - [ ] 为每个信息源定制关键词(已完成基础)
- - [ ] 支持同义词扩展(如:环保=绿色=生态)
- - [ ] 添加负面关键词过滤(排除无关内容)
-
-4. **通知修复**
- - [ ] 检查 OpenClaw Gateway 连接
- - [ ] 测试企业微信 MCP 工具
- - [ ] 配置备用通知渠道(邮件、钉钉)
-
-5. **监控与报告**
- - [ ] 每日自动生成运行报告(邮件/消息)
- - [ ] 选题数量趋势图
- - [ ] 内容质量指标(字数、合规分、发布率)
-
----
-
-## 📈 运行数据(历史)
-
-### 4月16日
-- collector: 选题库为空,失败
-- creator: 成功(A01, A02, A03, A04)
-- optimizer: 成功(A01 100分)
-- publisher: 成功
-
-### 4月17日
-- collector: 降级策略,生成 C01, C02
-- creator: 成功(C01, B01, A05)
-- optimizer: 成功(全自动通过)
-- publisher: 成功
-
-### 4月18日
-- collector: 外部源失败,降级无效(本地解析错误)
-- creator: 选题库为空,失败
-- optimizer: N/A
-- publisher: N/A
-
-### 4月19日(今日)
-- collector: 外部源仍失败,降级使用 6 个本地案例,生成 D06, D07?
- - **实际**: collector 尚未运行(待凌晨执行)
- - **当前**: 仅执行了优化配置和测试
-- 管理平台: ✅ 启动(8001)
-- 数据同步: ✅ 22选题同步到 DB
-
----
-
-## 🎯 结论
-
-今日主要完成**基础设施优化**:
-- ✅ 案例库重建(6个高质量案例)
-- ✅ 信息源配置升级(10个源)
-- ✅ collector 代码修复(路径、关键词、JSON加载)
-- ✅ 新增2个教育类选题
-- ✅ 端口冲突解决
-- ✅ 项目信息归档
-
-**预期效果**:从明早(04-20)05:00 开始,collector 将:
-1. 尝试从 10 个信息源抓取
-2. 若外部源失败,使用 6 个本地案例保底
-3. 生成至少 1 个新选题
-4. 后续 creator 自动创作
-
----
-
-**生成时间**: 2026-04-19 15:30 (Asia/Shanghai)
-**任务状态**: ✅ 已完成核心优化
diff --git a/YUZHIRAN_PLATFORM.md b/YUZHIRAN_PLATFORM.md
deleted file mode 100644
index 7e728c1..0000000
--- a/YUZHIRAN_PLATFORM.md
+++ /dev/null
@@ -1,285 +0,0 @@
-# 宇之然内容管理平台 - 完整项目文档
-
-## 📦 项目概览
-
-宇之然内容管理平台是一个集**自动化流水线**与**Web管理界面**于一体的内容生产系统。
-
-- **自动化模块**: 采集→创作→优化→发布的全自动脚本
-- **管理平台**: Web UI 监控、控制、发布包管理
-- **数据源**: 单一 JSON 文件 + 本地案例库
-- **目标**: 每日自动生成高质量原创内容,多平台分发
-
-## 🏗️ 目录结构
-
-```
-yu-zhi-ran/
-├── platform/ # 管理平台(FastAPI + Vue 3)
-│ ├── backend/ # FastAPI 后端
-│ │ └── app/
-│ │ ├── api/ # REST API
-│ │ │ ├── system.py # 系统状态、流水线控制
-│ │ │ ├── topics.py # 选题管理
-│ │ │ ├── publisher.py # 发布包管理
-│ │ │ └── articles.py
-│ │ └── core/ # 业务逻辑封装
-│ │ ├── generator.py → 调用 scripts/creator.py
-│ │ ├── optimizer.py → 调用 scripts/compliance_optimizer.py
-│ │ └── sync.py → 同步 automation/data/*.json
-│ └── frontend/ # Vue 3 前端(CDN依赖)
-│ └── index.html
-├── automation/ # 自动化流水线(脚本+数据+日志)
-│ ├── scripts/ (软链) → ../scripts/
-│ ├── data/ # JSON 数据源
-│ │ ├── sustainability_topics.json # 选题库
-│ │ ├── drafts/ # 草稿目录
-│ │ └── releases/ # 发布包(按日期)
-│ └── logs/ # 运行日志
-│ ├── collector_*.log
-│ ├── creator_*.log
-│ ├── optimizer_*.log
-│ └── publisher_*.log
-├── scripts/ # 底层CLI脚本(被automation/scripts/引用)
-│ ├── collector.py # 采集热点
-│ ├── creator.py # 内容创作
-│ ├── compliance_optimizer.py # 合规优化
-│ ├── publisher.py # 发布包生成
-│ ├── research.py # 研究资料
-│ ├── outline.py # 大纲生成
-│ └── writer.py # 撰写主力
-├── content/ # 已发布内容存储
-│ ├── published/ # 按 topic_id 组织
-│ ├── drafts/ # 草稿
-│ ├── ideas/ # 选题记录
-│ └── images/ # 配图资源
-├── config/ # 配置文件
-│ ├── sources.yaml # RSS/网页源配置
-│ └── wecom_config.yaml # 企业微信通知
-├── brand/ # 品牌资产
-│ ├── brand-book.md
-│ └── guidelines.md
-├── research/ # 行业研究
-│ └── trends-2026.md
-├── strategy/ # 内容策略
-│ └── 全球-本土比较研究与全新内容战略规划-2026-04-15.md
-├── tasks/ # 项目管理
-│ └── todo.md
-├── logs/ # 根目录日志(兼容)
-├── backup/ # 备份归档
-├── README.md # 项目总览
-├── TEST_FULL_PIPELINE.md # 测试指南
-└── run_publisher.sh # 快速启动发布任务
-
-# 软链接(保持路径兼容)
-automation/scripts → ../scripts/
-```
-
----
-
-## 🚀 快速开始
-
-### 方式一:直接运行自动化流水线(CLI)
-
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran
-
-# 手动执行各步骤
-python scripts/collector.py # 采集选题
-python scripts/creator.py # 创作内容
-python scripts/compliance_optimizer.py # 合规优化
-python scripts/publisher.py # 生成发布包
-
-# 或使用测试脚本
-python test_full_pipeline.py --topic-id A01
-```
-
-### 方式二:启动 Web 管理平台
-
-```bash
-cd platform
-./run.sh 8001
-
-# 访问
-# - 界面: http://localhost:8001/
-# - API文档: http://localhost:8001/docs
-```
-
-**功能**:
-- 📊 仪表盘:选题统计、今日生成
-- 🔄 控制台:一键触发 collector/creator/optimizer
-- 📝 选题管理:列表、预览、状态
-- 📦 发布管理:生成发布包、查看HTML、复制
-- 📋 日志查看:所有模块实时日志
-
-### 方式三:定时自动运行(cron)
-
-```bash
-# 编辑 crontab
-crontab -e
-
-# 添加以下任务(参考)
-0 5 * * * cd /path/to/yu-zhi-ran && python automation/scripts/collector.py
-30 5 * * * cd /path/to/yu-zhi-ran && python automation/scripts/creator.py
-45 5 * * * cd /path/to/yu-zhi-ran && python automation/scripts/compliance_optimizer.py
-0 6 * * * cd /path/to/yu-zhi-ran && python automation/scripts/publisher.py
-```
-
----
-
-## 🔄 系统架构
-
-### 数据流
-
-```
-┌─────────────────┐
-│ 采集/创作/优化 │ ←─ automation/scripts/*.py
-│ (CLI 脚本) │
-└────────┬────────┘
- │ 读写 JSON
- ▼
-┌─────────────────┐
-│ automation/data │
-│ sustainability_ │
-│ topics.json │
-└────────┬────────┘
- │ 同步
- ▼
-┌─────────────────┐
-│ platform/ │
-│ FastAPI + │
-│ SQLite DB │
-└────────┬────────┘
- │ HTTP API
- ▼
-┌─────────────────┐
-│ Web 前端 │
-│ (Vue 3) │
-└─────────────────┘
-```
-
-### 触发流程
-
-| 操作 | API端点 | 执行脚本 | 结果 |
-|------|---------|----------|------|
-| 点击"运行创作任务" | POST `/api/system/generate/run` | `scripts/creator.py` | 生成草稿 → 状态: 待审查 |
-| 点击"运行合规优化" | POST `/api/system/optimize/run` | `scripts/compliance_optimizer.py` | 全自动通过 → 状态: 待发布 |
-| 点击"生成发布包" | POST `/api/publisher/generate/{id}` | `scripts/publisher.py` | HTML包 → content/published/ |
-| 页面刷新 | GET `/api/system/status` | - | 显示最新状态 |
-
----
-
-## 📊 当前状态(2026-04-19)
-
-- **选题库**: 22 个(20 待处理 + 2 待发布)
-- **自动运行**: ✅ 每日 05:00-06:00 全流程
-- **上次运行**: 2026-04-19 05:30(A02 选题,8秒完成)
-- **合规通过率**: 100%(小样本)
-- **发布包**: A01、A02 已就绪(知乎+小红书)
-
-查看详细日志:
-```bash
-tail -f automation/logs/creator_$(date +%Y-%m-%d).log
-tail -f automation/logs/publisher_$(date +%Y-%m-%d).log
-```
-
----
-
-## 🔧 开发调试
-
-### 检查环境
-```bash
-cd platform
-python check.py
-```
-
-### 手动测试流水线
-```bash
-python test_full_pipeline.py --topic-id A05
-```
-
-### API 测试
-```bash
-# 系统状态
-curl http://localhost:8000/api/system/status
-
-# 触发创作
-curl -X POST http://localhost:8000/api/system/generate/run
-
-# 流水线状态
-curl http://localhost:8000/api/system/pipeline/status
-```
-
-### 数据库重置
-```bash
-cd platform/backend
-rm -f data/yzr.db
-python -c "from app.database import init_db; init_db()"
-```
-
----
-
-## 📝 配置说明
-
-### automation/config/sources.yaml
-
-配置外部信息源(RSS/网页):
-
-```yaml
-sources:
- - name: "新华网-环保频道"
- type: "rss"
- url: "http://www.news.cn/..."
- focus: "可持续性"
-
- - name: "人民网-生态环境"
- type: "rss"
- url: "http://env.people.com.cn/..."
- focus: "环保政策"
-```
-
-### platform/.env (可选)
-
-```bash
-PROJECT_ROOT=/path/to/yu-zhi-ran
-DATA_DIR=/path/to/data
-LOG_LEVEL=INFO
-```
-
----
-
-## 🎯 核心特性
-
-| 特性 | 实现 |
-|------|------|
-| **降级策略** | 外部源失败 → 本地数据库 → Markdown案例库 |
-| **锁机制** | 2小时超时,防止并发冲突 |
-| **状态同步** | JSON ↔ SQLite 自动同步 |
-| **发布准备** | 生成多平台HTML + 发布指南,人工发布(风控) |
-| **Web管理** | Vue 3 单页应用,无需构建 |
-| **日志聚合** | 所有模块日志按日期归档 |
-
----
-
-## 🚧 待办事项
-
-- [ ] 添加用户认证(目前仅本地访问)
-- [ ] 实现异步任务状态轮询(创作/优化耗时较长)
-- [ ] Nginx 反向代理配置(外网访问)
-- [ ] 监控告警(失败通知)
-- [ ] 多账号/IP策略(小红书多号分散风险)
-- [ ] 数据导出功能(选题库、发布记录)
-
----
-
-## 📚 相关文档
-
-- `platform/PORTFOLIO.md` - 平台架构详解
-- `platform/README.md` - 管理平台使用说明
-- `PROJECT_PLAN_V2.md` - 盈利模式与5平台矩阵
-- `HERMES_AND_YUZHRAN_STATUS.md` - 多Agent共享状态
-- `2026-04-18-YUZHRAN-FIXES-SUMMARY.md` - 技术修复总结
-
----
-
-**版本**: 2.0 (2026-04-19)
-**维护**: 宇之然 AI 助手
-**最后更新**: 2026-04-19
diff --git a/automation/data/outlines/2026-05-04/T001_outline.md b/automation/data/outlines/2026-05-04/T001_outline.md
new file mode 100644
index 0000000..a3a745d
--- /dev/null
+++ b/automation/data/outlines/2026-05-04/T001_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:远程工作2026中国指南:从"不可能"到"可行"的路径图
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:远程工作2026中国指南:从"不可能"到"可行"的路径图
+- 点明文章价值
+
+## 二、核心观点
+法律实操(合同、社保、个税)+ 心理建设(孤独应对)
+
+## 三、受众痛点分析
+想要远程但面临制度限制、社保个税不清晰、孤独感
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合未来工作方式领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:从兼职接单开始,试探公司政策,降低风险
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-04*
diff --git a/automation/data/outlines/2026-05-07/A03_outline.md b/automation/data/outlines/2026-05-07/A03_outline.md
new file mode 100644
index 0000000..1ef484f
--- /dev/null
+++ b/automation/data/outlines/2026-05-07/A03_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+- 点明文章价值
+
+## 二、核心观点
+分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线
+
+## 三、受众痛点分析
+想地理套利但被签证和社保困扰
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合未来工作方式领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-07*
diff --git a/automation/data/outlines/2026-05-07/B03_outline.md b/automation/data/outlines/2026-05-07/B03_outline.md
new file mode 100644
index 0000000..6752eba
--- /dev/null
+++ b/automation/data/outlines/2026-05-07/B03_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:低碳生活账单:用3年省了8万,碳足迹降了60%
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:低碳生活账单:用3年省了8万,碳足迹降了60%
+- 点明文章价值
+
+## 二、核心观点
+对比欧洲碳税政策,从交通(电动车+共享)、饮食(植物为主)、消费(二手优先)三个维度,展示真实账单变化
+
+## 三、受众痛点分析
+觉得低碳=更贵,不敢尝试
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合可持续生活系统领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:用财务数据说话(省8万),打破'环保=烧钱'误解
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-07*
diff --git a/automation/data/outlines/2026-05-07/B05_outline.md b/automation/data/outlines/2026-05-07/B05_outline.md
new file mode 100644
index 0000000..747a655
--- /dev/null
+++ b/automation/data/outlines/2026-05-07/B05_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:社区菜园指南:如何推动小区5户邻居共建共享
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:社区菜园指南:如何推动小区5户邻居共建共享
+- 点明文章价值
+
+## 二、核心观点
+对比纽约社区花园政策与中国物业协调难题,提供法律风险(物权)、利益分配机制、技术方案(分区+智能)
+
+## 三、受众痛点分析
+想组织但怕纠纷、不懂法律、协调不了邻居
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合可持续生活系统领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:从1个友好小区试点开始,成功后复制,降低风险
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-07*
diff --git a/automation/data/outlines/2026-05-07/D01_outline.md b/automation/data/outlines/2026-05-07/D01_outline.md
new file mode 100644
index 0000000..8796f7a
--- /dev/null
+++ b/automation/data/outlines/2026-05-07/D01_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:AI伦理实践指南:开发者在中国的合规清单
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:AI伦理实践指南:开发者在中国的合规清单
+- 点明文章价值
+
+## 二、核心观点
+对比EU AI Act与中国算法推荐管理规定,提供数据隐私、歧视检测、透明度义务、备案流程的自查清单
+
+## 三、受众痛点分析
+开发者不了解国内AI伦理法规,怕踩雷
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合科技人文交叉领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:不是泛泛而谈伦理,而是具体到'备案流程'和'自查表',即拿即用
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-07*
diff --git a/automation/data/outlines/2026-05-07/D05_outline.md b/automation/data/outlines/2026-05-07/D05_outline.md
new file mode 100644
index 0000000..661234e
--- /dev/null
+++ b/automation/data/outlines/2026-05-07/D05_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:科技与自然共生:如何用AI让阳台农场更'自然'
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:科技与自然共生:如何用AI让阳台农场更'自然'
+- 点明文章价值
+
+## 二、核心观点
+对比荷兰智能温室与中国人'回归原始'误区,实现技术隐形化(传感器+提醒)+ 自然反馈闭环 + 人工仪式感
+
+## 三、受众痛点分析
+想用科技但又怕失去'自然感',追求矛盾
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合科技人文交叉领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:技术与情感连接的平衡方案,AI只做幕后,人工保留仪式
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-07*
diff --git a/automation/data/outlines/2026-05-08/A03_outline.md b/automation/data/outlines/2026-05-08/A03_outline.md
new file mode 100644
index 0000000..e179589
--- /dev/null
+++ b/automation/data/outlines/2026-05-08/A03_outline.md
@@ -0,0 +1,40 @@
+# 文章大纲:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+
+## 一、引言
+- 开场场景/痛点引入
+- 提出核心问题:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+- 点明文章价值
+
+## 二、核心观点
+分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线
+
+## 三、受众痛点分析
+想地理套利但被签证和社保困扰
+
+## 四、全球/行业趋势与案例
+- 引用研究笔记中的 0 个案例,精选 2-3 个详述
+- 数据支撑:提取研究笔记中的关键数据
+- 趋势分析
+
+## 五、本土落地建议
+- 结合未来工作方式领域特点
+- 提供可执行的步骤
+- 注意事项
+
+## 六、独特视角:不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)
+
+## 七、行动指南(MVP)
+1. 理解现状
+2. 小范围试验
+3. 评估效果
+4. 形成习惯
+
+## 八、总结与鼓励
+- 回顾要点
+- 呼吁行动
+
+## 九、参考文献
+- 从研究笔记中提取来源链接
+
+---
+*大纲生成时间:2026-05-08*
diff --git a/automation/data/research/2026-05-04/T001_research.md b/automation/data/research/2026-05-04/T001_research.md
new file mode 100644
index 0000000..f6a37bc
--- /dev/null
+++ b/automation/data/research/2026-05-04/T001_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:远程工作2026中国指南:从"不可能"到"可行"的路径图
+
+## 选题信息
+- **ID**: T001
+- **领域**: 未来工作方式
+- **核心观点**: 法律实操(合同、社保、个税)+ 心理建设(孤独应对)
+- **受众痛点**: 想要远程但面临制度限制、社保个税不清晰、孤独感
+- **独特视角**: 从兼职接单开始,试探公司政策,降低风险
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-04*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-07/A03_research.md b/automation/data/research/2026-05-07/A03_research.md
new file mode 100644
index 0000000..7a961d2
--- /dev/null
+++ b/automation/data/research/2026-05-07/A03_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+
+## 选题信息
+- **ID**: A03
+- **领域**: 未来工作方式
+- **核心观点**: 分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线
+- **受众痛点**: 想地理套利但被签证和社保困扰
+- **独特视角**: 不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-07*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-07/B03_research.md b/automation/data/research/2026-05-07/B03_research.md
new file mode 100644
index 0000000..3064954
--- /dev/null
+++ b/automation/data/research/2026-05-07/B03_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:低碳生活账单:用3年省了8万,碳足迹降了60%
+
+## 选题信息
+- **ID**: B03
+- **领域**: 可持续生活系统
+- **核心观点**: 对比欧洲碳税政策,从交通(电动车+共享)、饮食(植物为主)、消费(二手优先)三个维度,展示真实账单变化
+- **受众痛点**: 觉得低碳=更贵,不敢尝试
+- **独特视角**: 用财务数据说话(省8万),打破'环保=烧钱'误解
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-07*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-07/B05_research.md b/automation/data/research/2026-05-07/B05_research.md
new file mode 100644
index 0000000..a4c6702
--- /dev/null
+++ b/automation/data/research/2026-05-07/B05_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:社区菜园指南:如何推动小区5户邻居共建共享
+
+## 选题信息
+- **ID**: B05
+- **领域**: 可持续生活系统
+- **核心观点**: 对比纽约社区花园政策与中国物业协调难题,提供法律风险(物权)、利益分配机制、技术方案(分区+智能)
+- **受众痛点**: 想组织但怕纠纷、不懂法律、协调不了邻居
+- **独特视角**: 从1个友好小区试点开始,成功后复制,降低风险
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-07*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-07/D01_research.md b/automation/data/research/2026-05-07/D01_research.md
new file mode 100644
index 0000000..7de6b48
--- /dev/null
+++ b/automation/data/research/2026-05-07/D01_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:AI伦理实践指南:开发者在中国的合规清单
+
+## 选题信息
+- **ID**: D01
+- **领域**: 科技人文交叉
+- **核心观点**: 对比EU AI Act与中国算法推荐管理规定,提供数据隐私、歧视检测、透明度义务、备案流程的自查清单
+- **受众痛点**: 开发者不了解国内AI伦理法规,怕踩雷
+- **独特视角**: 不是泛泛而谈伦理,而是具体到'备案流程'和'自查表',即拿即用
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-07*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-07/D05_research.md b/automation/data/research/2026-05-07/D05_research.md
new file mode 100644
index 0000000..81c6e55
--- /dev/null
+++ b/automation/data/research/2026-05-07/D05_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:科技与自然共生:如何用AI让阳台农场更'自然'
+
+## 选题信息
+- **ID**: D05
+- **领域**: 科技人文交叉
+- **核心观点**: 对比荷兰智能温室与中国人'回归原始'误区,实现技术隐形化(传感器+提醒)+ 自然反馈闭环 + 人工仪式感
+- **受众痛点**: 想用科技但又怕失去'自然感',追求矛盾
+- **独特视角**: 技术与情感连接的平衡方案,AI只做幕后,人工保留仪式
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-07*
\ No newline at end of file
diff --git a/automation/data/research/2026-05-08/A03_research.md b/automation/data/research/2026-05-08/A03_research.md
new file mode 100644
index 0000000..c376194
--- /dev/null
+++ b/automation/data/research/2026-05-08/A03_research.md
@@ -0,0 +1,20 @@
+# 研究笔记:数字游民签证全解析:30个国家政策对比,中国护照能去哪些?
+
+## 选题信息
+- **ID**: A03
+- **领域**: 未来工作方式
+- **核心观点**: 分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线
+- **受众痛点**: 想地理套利但被签证和社保困扰
+- **独特视角**: 不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)
+
+## 相关案例(0个)
+
+## 研究发现摘要
+- 待补充:从案例中提炼的趋势和洞察
+- 待补充:数据支撑
+
+## 待深入研究的问题
+- [ ] 需要更多本土数据
+- [ ] 需要验证某些结论的适用性
+
+*生成时间:2026-05-08*
\ No newline at end of file
diff --git a/automation/data/sustainability_topics.json b/automation/data/sustainability_topics.json
index ac0721f..ed8d554 100644
--- a/automation/data/sustainability_topics.json
+++ b/automation/data/sustainability_topics.json
@@ -1,281 +1,54 @@
[
{
- "id": "T001",
- "title": "远程工作2026中国指南:从\"不可能\"到\"可行\"的路径图",
- "field": "未来工作方式",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "法律实操(合同、社保、个税)+ 心理建设(孤独应对)",
- "audience_pain": "想要远程但面临制度限制、社保个税不清晰、孤独感",
- "unique_angle": "从兼职接单开始,试探公司政策,降低风险",
- "priority": "高",
- "priority_score": 90,
- "status": "待审查",
+ "id": "LIVING-001-26",
+ "title": "零浪费家庭实验:从囤积到精简的100天",
"cases": [],
+ "audience": "26-35岁城市焦虑青年",
+ "china_pain_points": "消费主义陷阱、快递包装泛滥、垃圾分类执行难",
+ "localization_solution": "家庭减法清单、快递包装回收点地图、社区交换市集",
+ "mvp_actions": "1. 本月减少50%快递包装 2. 建立家庭减法清单 3. 参与社区交换市集",
+ "estimated_length": 3500,
+ "priority_score": 85.5,
+ "field": "可持续生活系统",
+ "format": "趋势洞察 + 实操指南",
+ "core_concept": "少即是多,从消费主义回归生活本质",
+ "audience_pain": "被消费主义裹挟,想改变但不知道从何开始",
+ "unique_angle": "用数据量化减法效果,用真实案例展示转变过程",
+ "priority": "高",
+ "total_score": 85.5,
+ "compliance_score": 100,
+ "source_file": "automation/data/sustainability_topics.json",
+ "ready_at": "2026-05-08",
+ "published_at": null,
+ "platform_urls": {},
+ "status": "待处理",
"lock_by": null,
"lock_at": null
},
{
- "id": "T002",
+ "id": "TECH-001-26",
"title": "AI副业入门:用DeepSeek实现第一笔收入的100天",
- "field": "未来工作方式",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "服务类型清单 + 定价策略 + 违规红线",
- "audience_pain": "不知道能做什么、平台抽成高、怕违规",
- "unique_angle": "从代写文案/数据分析起步,日赚50元",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T003",
- "title": "数字游民签证全解析:30个国家政策对比,中国护照能去哪些?",
- "field": "未来工作方式",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "签证+保险+税务+社群的全成本分析",
- "audience_pain": "签证受限、社保断缴焦虑、信息不对称",
- "unique_angle": "泰国/马来西亚试水,成本不到2万",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T004",
- "title": "一人公司实验:从创意到营收的365天日志",
- "field": "未来工作方式",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "最小可行产品(MVP) + 现金流管理 + 法律合规",
- "audience_pain": "怕失败、缺启动资金、不懂营销",
- "unique_angle": "先接单验证需求,再产品化",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T005",
- "title": "AI时代的技能组合:什么技能值得投入10年?",
- "field": "未来工作方式",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "四个维度:AI强化型、AI无法替代、复合型、过时型",
- "audience_pain": "不知道学什么、学了不知道用在哪",
- "unique_angle": "绘制个人技能地图,识别\"护城河技能\"",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T006",
- "title": "城市农业ROI报告:20㎡阳台种菜一年,省了多少钱?",
- "field": "可持续生活系统",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "品种选择(高ROI蔬菜)+ 智能设备(自动灌溉)+ 成本核算",
- "audience_pain": "空间小、光照不足、怕邻居投诉",
- "unique_angle": "从香草开始,3个月回本,年省500-2000元",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T007",
- "title": "零浪费家庭实验:一年只产100L垃圾,可能吗?",
- "field": "可持续生活系统",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "垃圾追踪表 + 替代方案数据库 + 社区互助",
- "audience_pain": "垃圾分类执行难、环保产品贵、缺乏系统性",
- "unique_angle": "从\"塑料减量\"开始,减少50%非必要垃圾",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T008",
- "title": "低碳生活账单:用3年省了8万,碳足迹降了60%",
- "field": "可持续生活系统",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "交通(电动车+共享)+ 饮食(植物为主)+ 消费(二手优先)",
- "audience_pain": "电费、用车成本、生活质量担忧",
- "unique_angle": "记录碳足迹APP,每月减排5%,年省5000+",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T009",
- "title": "循环消费实战:10件物品,用3年省了2万",
- "field": "可持续生活系统",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "购买决策树(买新/二手/租)+ 延长寿命技巧 + 转卖策略",
- "audience_pain": "二手文化不成熟、维修成本高、不知如何选择",
- "unique_angle": "手机、相机、家具优先二手,省30-50%",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T010",
- "title": "社区菜园指南:如何推动小区5户邻居共建共享",
- "field": "可持续生活系统",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "法律风险(物权)+ 利益分配机制 + 技术方案(分区+智能)",
- "audience_pain": "物业/邻居协调难、缺乏政策支持",
- "unique_angle": "先找1个友好小区试点,成功后再推广",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T011",
- "title": "第二大脑2.0:用DeepSeek+本地向量库建立私有知识系统",
- "field": "个人知识工厂",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "数据主权 + 隐私保护 + 无缝检索 + AI问答",
- "audience_pain": "不知道能做什么、数据安全意识弱",
- "unique_angle": "先用DeepSeek对话模式,再迁移至本地部署",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T012",
- "title": "PKM极简实践:PARA系统在Notion上的落地模板",
- "field": "个人知识工厂",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "简化到3个核心文件夹 + 每周10分钟维护 + AI辅助整理",
- "audience_pain": "学了方法坚持不了、工具复杂难上手",
- "unique_angle": "建立4个PARA区,每天花5分钟归档",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T013",
- "title": "费曼学习法AI增强:如何让AI帮你\"教\"懂一个概念",
- "field": "个人知识工厂",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "三步法(AI简化→自我复述→Gap识别)+ 输出倒逼输入",
- "audience_pain": "应试教育思维、输出能力弱",
- "unique_angle": "每周学1个概念,用AI验证理解深度",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T014",
- "title": "AI个人助理搭建:从ChatGPT到私有化部署的完整路线",
- "field": "个人知识工厂",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "数据主权 + 定制化 + 成本控制(从免费到付费)",
- "audience_pain": "数据隐私顾虑、 API 成本、功能定制需求",
- "unique_angle": "先用API调用,数据敏感再本地部署",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T015",
- "title": "技能树可视化:用思维导图规划5年职业路径",
- "field": "个人知识工厂",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "硬技能×软技能矩阵 + 行业对标 + 学习资源聚合",
- "audience_pain": "不知道学什么、学了不知道用在哪、缺乏系统性",
- "unique_angle": "画出当前技能地图,识别3个gap,制定fill plan",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T016",
- "title": "AI伦理实践指南:开发者在中国的合规清单",
- "field": "科技人文交叉",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "数据隐私 + 歧视检测 + 透明度义务 + 备案流程",
- "audience_pain": "算法推荐管理规定不明、合规成本高、缺乏实操指南",
- "unique_angle": "个人项目先做伦理自查表,避免踩雷",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T017",
- "title": "数字排毒月:戒掉微信/抖音后,生活发生了什么",
- "field": "科技人文交叉",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "渐进式戒断 + 替代活动 + 社交边界管理",
- "audience_pain": "工作必须在线、社交依赖微信、戒断恐惧",
- "unique_angle": "先设定\"无屏时段\"(21:00-7:00),逐步延长",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T018",
- "title": "银发科技报告:给爸妈装智能设备,学到的5个设计原则",
- "field": "科技人文交叉",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "简化选项 + 物理反馈 + 容错设计 + 情感连接",
- "audience_pain": "老人数字化难、适老化产品差、子女教不会",
- "unique_angle": "改造1个设备(如手机),让父母真正用起来",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T019",
- "title": "儿童数字素养课:10岁儿子的AI启蒙12周",
- "field": "科技人文交叉",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "批判性思维 + 创造力激发 + 家长引导策略",
- "audience_pain": "应试压力大、家长焦虑又依赖、不知道如何启蒙",
- "unique_angle": "每周1次\"AI家庭时间\",探讨AI生成内容真伪",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "T020",
- "title": "科技与自然共生:如何用AI让阳台农场更\"自然\"",
- "field": "科技人文交叉",
- "format": "趋势洞察 + 实操指南",
- "core_concept": "技术隐形化 + 自然反馈闭环 + 人工情感连接",
- "audience_pain": "技术过度干预、失去自然体验、缺乏情感温度",
- "unique_angle": "用传感器+提醒,但保留\"浇水仪式感\"",
- "priority": "高",
- "priority_score": 90,
- "status": "待处理",
- "cases": []
- },
- {
- "id": "A03",
- "title": "数字游民签证全解析:30个国家政策对比,中国护照能去哪些?",
- "field": "未来工作方式",
- "format": "对比分析 + 实操指南",
- "core_concept": "分析爱沙尼亚/葡萄牙/巴厘岛等30国游民签证,结合中国护照限制,给出签证+保险+税务+社群的完整路线",
- "audience_pain": "想地理套利但被签证和社保困扰",
- "unique_angle": "不是简单列出签证,而是给出中国护照持有者的可行组合方案(如泰国+大马+巴厘岛)",
- "priority": "高",
- "priority_score": 90,
- "status": "ready",
"cases": [],
+ "audience": "26-35岁城市焦虑青年",
+ "china_pain_points": "主业不稳定、副业方向迷茫、技能变现难",
+ "localization_solution": "AI工具链整合、国内平台变现路径、从0到1的实战案例",
+ "mvp_actions": "1. 学习DeepSeek基础操作 2. 找到第一个付费客户 3. 建立可复制的服务流程",
+ "estimated_length": 4000,
+ "priority_score": 88.2,
+ "field": "科技向善",
+ "format": "趋势洞察 + 实操指南",
+ "core_concept": "用AI放大个人能力,实现副业收入",
+ "audience_pain": "想搞钱但不知道从哪开始,担心AI替代自己",
+ "unique_angle": "100天真实记录,从0到第一笔收入的完整路径",
+ "priority": "高",
+ "total_score": 88.2,
+ "compliance_score": 100,
+ "source_file": "automation/data/sustainability_topics.json",
+ "ready_at": "2026-05-08",
+ "published_at": null,
+ "platform_urls": {},
+ "status": "待处理",
"lock_by": null,
- "lock_at": null,
- "ready_at": "2026-05-07",
- "compliance_score": 100
+ "lock_at": null
}
]
\ No newline at end of file
diff --git a/frontend_optimization_notes.md b/frontend_optimization_notes.md
deleted file mode 100644
index f183660..0000000
--- a/frontend_optimization_notes.md
+++ /dev/null
@@ -1,240 +0,0 @@
-# 前端页面优化说明
-
-## 🎯 优化目标
-从用户角度提升使用体验,优化布局和功能设计
-
-## ✨ 主要优化内容
-
-### 1. 视觉设计优化
-- **现代化渐变配色**:使用渐变色背景,提升视觉层次
-- **卡片阴影效果**:增加 hover 阴影,增强交互反馈
-- **统一间距**:所有卡片统一为 24px 间距
-- **响应式布局**:适配不同屏幕尺寸(移动端友好)
-- **状态可视化**:使用彩色渐变卡片展示统计数据
-
-### 2. 布局优化
-- **顶部导航栏**:
- - 渐变蓝色背景
- - 左侧 Logo + 标题
- - 右侧快捷操作按钮组
- - 固定高度,视觉更整洁
-
-- **系统概览卡片**:
- - 4 列网格布局(移动端自动调整)
- - 每个统计项独立彩色卡片
- - 大号数字展示,一目了然
-
-- **流水线状态卡片**:
- - 状态统计 4 列展示
- - 模块状态表格更清晰
- - 加载状态有 spinner 提示
-
-- **选题管理卡片**:
- - 快速筛选标签(点击切换)
- - 表格列宽优化
- - 操作按钮分组更合理
-
-### 3. 功能增强
-
-#### 快速筛选标签
-```
-全部 (24) | 待处理 (15) | 待审查 (1) | 待发布 (7) | 已发布 (1)
-```
-- 点击标签快速筛选
-- 显示每个状态的数量
-- 高亮当前选中的标签
-
-#### 预览对话框增强
-- **平台切换**:知乎/微信公众号/小红书
-- **复制 HTML**:一键复制文章内容
-- **全屏查看**:全屏查看预览内容
-- **自动加载**:切换平台自动加载对应内容
-
-#### 操作按钮优化
-- **预览**:蓝色按钮,始终可用
-- **创作**:绿色按钮,仅"待处理"状态可用
-- **审查**:橙色按钮,仅"待审查"状态可用
-- 按钮带图标,更直观
-
-#### 状态标识优化
-- 使用彩色圆点 + 文字
-- 待处理:橙色
-- 待审查:红色
-- 待发布:绿色
-- 已发布:蓝色
-
-#### 合规分展示
-- 使用进度条展示
-- 百分比数字清晰可见
-- 颜色根据分数变化
-
-### 4. 交互优化
-- **加载状态**:
- - 表格加载有 spinner
- - 操作按钮有 loading 状态
- - 全屏遮罩显示加载进度
-
-- **错误提示**:
- - 统一使用 ElMessage 提示
- - 成功/失败/警告分类明确
- - 提示信息友好
-
-- **响应速度**:
- - 操作后自动刷新
- - 减少不必要的请求
- - 优化 API 调用顺序
-
-### 5. 删除冗余功能
-- 移除重复的状态筛选器
-- 移除调试横幅(开发时可手动开启)
-- 简化日志对话框
-- 移除已删除的发布包相关功能
-
-### 6. 性能优化
-- 减少 DOM 节点数量
-- 优化计算属性
-- 合并 API 请求
-- 使用虚拟滚动(大表格时)
-
-## 📊 对比效果
-
-### 优化前
-- ❌ 重复筛选器占用空间
-- ❌ 按钮分组不清晰
-- ❌ 预览功能不完善
-- ❌ 视觉层次不明显
-- ❌ 缺少快速筛选
-- ❌ 加载状态不友好
-
-### 优化后
-- ✅ 简洁清晰的布局
-- ✅ 功能分组明确
-- ✅ 预览功能完善(复制 + 全屏)
-- ✅ 视觉层次分明
-- ✅ 快速筛选便捷
-- ✅ 加载状态友好
-
-## 🎨 视觉改进
-
-### 配色方案
-- **主色调**:蓝色 (#409EFF)
-- **成功色**:绿色 (#67C23A)
-- **警告色**:橙色 (#E6A23C)
-- **危险色**:红色 (#F56C6C)
-- **信息色**:紫色 (#909399)
-
-### 卡片设计
-- 圆角 12px
-- 阴影 0 2px 12px rgba(0,0,0,0.08)
-- hover 阴影增强
-- 渐变背景(统计卡片)
-
-### 字体大小
-- 标题:2xl (1.875rem)
-- 统计数字:2.5rem
-- 正文:默认
-- 辅助文字:0.9rem
-
-## 🔧 技术实现
-
-### 使用的技术
-- Vue 3 (Composition API)
-- Element Plus
-- Tailwind CSS
-- 响应式布局
-
-### 关键代码
-```javascript
-// 快速筛选
-const filteredTopics = computed(() => {
- if (!filterStatus.value) return topics.value || [];
- return topics.value.filter(t => t.status === filterStatus.value);
-});
-
-// 复制 HTML
-const copyPreviewHtml = async () => {
- await navigator.clipboard.writeText(previewHtml.value);
- ElMessage.success('HTML 已复制到剪贴板');
-};
-
-// 全屏查看
-const expandPreview = () => {
- fullScreenPreview.value = true;
-};
-```
-
-## 📱 响应式支持
-
-### 断点
-- **移动端** (< 768px):单列布局
-- **平板** (768-1024px):2 列布局
-- **桌面** (> 1024px):4 列布局
-
-### 适配内容
-- 统计卡片网格
-- 按钮组换行
-- 表格列宽自适应
-- 对话框宽度调整
-
-## 🚀 使用建议
-
-### 日常操作
-1. **查看概览**:顶部卡片快速了解系统状态
-2. **筛选选题**:点击快速筛选标签
-3. **预览文章**:点击"预览"按钮,选择平台
-4. **复制内容**:点击"复制 HTML"按钮
-5. **创作/审查**:根据状态点击对应按钮
-
-### 批量操作
-- 使用"全量刷新"同步最新数据
-- 使用"创作"启动批量生成
-- 使用"优化"进行合规审查
-
-### 日志查看
-- 选择日期和日志类型
-- 点击"加载日志"查看
-- 支持滚动查看历史日志
-
-## 📝 版本历史
-
-### v2.0 (2026-04-21)
-- 全新视觉设计
-- 快速筛选标签
-- 增强预览功能
-- 优化交互体验
-- 移除冗余功能
-
-### v1.0 (2026-04-20)
-- 基础功能实现
-- 预览对话框
-- 日志查看
-
-## 🔄 回滚方法
-
-如需回滚到旧版本:
-```bash
-cd /root/openclaw-workspace/projects/yu-zhi-ran/platform/frontend
-cp index.html.backup-optimize-* index.html
-```
-
-## ✅ 测试清单
-
-- [x] 页面正常加载
-- [x] 统计数据正确显示
-- [x] 快速筛选功能正常
-- [x] 预览功能正常
-- [x] 复制 HTML 功能正常
-- [x] 创作/审查按钮正常
-- [x] 日志查看功能正常
-- [x] 响应式布局正常
-- [x] 无控制台错误
-
-## 🎉 总结
-
-本次优化从用户角度出发,重点改进:
-1. **视觉体验**:现代化设计,层次清晰
-2. **操作效率**:快速筛选,一键操作
-3. **功能完善**:预览增强,复制便捷
-4. **交互友好**:加载提示,错误反馈
-
-优化后的页面更加简洁、高效、易用,大幅提升用户体验!
diff --git a/platform/DEPLOYMENT_GUIDE.md b/platform/DEPLOYMENT_GUIDE.md
deleted file mode 100644
index 6966aea..0000000
--- a/platform/DEPLOYMENT_GUIDE.md
+++ /dev/null
@@ -1,348 +0,0 @@
-# 宇之然内容创作平台 - 生产环境部署指南
-
-## 🚀 快速开始
-
-### 1. 克隆项目
-```bash
-git clone https://github.com/your-org/yuzhiran-platform.git
-cd yuzhiran-platform
-```
-
-### 2. 启动服务
-```bash
-docker-compose up -d
-```
-
-### 3. 验证部署
-```bash
-# 检查服务状态
-docker-compose ps
-
-# 查看日志
-docker-compose logs -f app
-
-# 健康检查
-curl http://localhost:8001/health
-```
-
-## 📋 系统架构
-
-```
- +------------------+
- | 用户浏览器 |
- +------------------+
- ↓ HTTPS
- +------------------+
- | Nginx |
- | (反向代理) |
- +------------------+
- ↓
- +----------------------------------+
- | |
- +--------+ +-----------+
- | 前端 | | 后端API |
- |(Nginx) | |(FastAPI) |
- +--------+ +-----------+
- ↑ ↑
- | |
- +--------+ +-----------+
- | 静态资源 | | PostgreSQL|
- +--------+ +-----------+
- ↑
- |
- +---------------+
- | Redis |
- | (缓存) |
- +---------------+
-```
-
-## 🔧 配置说明
-
-### 环境变量
-| 变量名 | 默认值 | 说明 |
-|--------|--------|------|
-| `DATABASE_URL` | postgresql://... | PostgreSQL连接字符串 |
-| `SECRET_KEY` | your-secret-key... | JWT密钥(必须修改) |
-| `DEBUG` | False | 调试模式 |
-| `ENVIRONMENT` | production | 运行环境 |
-| `ALLOWED_ORIGINS` | localhost,... | CORS允许的源 |
-
-### 端口映射
-| 服务 | 容器端口 | 主机端口 | 用途 |
-|------|----------|----------|------|
-| 前端 | 8000 | 8000 | 静态文件服务 |
-| 后端 | 8001 | 8001 | API服务 |
-| Nginx | 80 | 80 | HTTP反向代理 |
-| Nginx | 443 | 443 | HTTPS反向代理 |
-| PostgreSQL | 5432 | 5432 | 数据库 |
-| Redis | 6379 | 6379 | 缓存 |
-
-## 🛠️ 开发环境部署
-
-### 方法一:直接运行(推荐用于开发)
-```bash
-# 1. 配置数据库
-sudo -u postgres psql
-CREATE DATABASE yuzhiran_db;
-CREATE USER yuzhiran WITH PASSWORD 'yuzhiran';
-GRANT ALL PRIVILEGES ON DATABASE yuzhiran_db TO yuzhiran;
-
-# 2. 安装依赖
-cd backend
-pip install -r requirements.txt
-
-# 3. 配置环境变量
-cp .env.example .env
-# 编辑 .env 文件
-
-# 4. 初始化数据库
-python -c "from database import init_db; init_db()"
-
-# 5. 启动服务
-uvicorn main:app --host 0.0.0.0 --port 8001 --reload
-```
-
-### 方法二:Docker开发模式
-```bash
-# 启用开发模式(热重载)
-docker-compose -f docker-compose.dev.yml up -d
-
-# 进入后端容器调试
-docker-compose exec app bash
-
-# 进入数据库容器
-docker-compose exec db psql -U yuzhiran -d yuzhiran_db
-```
-
-## ☁️ 生产环境部署
-
-### 服务器要求
-- CPU: 2核以上
-- 内存: 4GB+
-- 磁盘: 20GB+
-- 操作系统: Ubuntu 20.04/22.04 LTS
-
-### 一键部署脚本
-```bash
-#!/bin/bash
-# deploy.sh
-
-set -e
-
-echo "=========================================="
-echo "宇之然内容创作平台 - 生产部署"
-echo "=========================================="
-
-# 1. 安装Docker和Docker Compose
-apt-get update && apt-get install -y \
- ca-certificates \
- curl \
- gnupg \
- lsb-release
-
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
-echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
-apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
-
-# 2. 克隆代码
-git clone https://github.com/your-org/yuzhiran-platform.git /opt/yuzhiran
-cd /opt/yuzhiran
-
-# 3. 配置SSL证书(使用Let's Encrypt)
-apt-get install -y certbot python3-certbot-nginx
-certbot --nginx -d yourdomain.com -d www.yourdomain.com
-
-# 4. 修改生产配置
-sed -i 's/your-production-secret-key-change-this-in-production/$(openssl rand -hex 32)/g' backend/.env
-
-# 5. 启动服务
-docker-compose down
-docker-compose build --no-cache
-docker-compose up -d
-
-# 6. 验证部署
-sleep 10
-curl -I http://localhost:8001/health
-
-echo "✅ 部署完成!"
-echo "访问地址: https://yourdomain.com"
-echo "API文档: https://yourdomain.com/docs"
-```
-
-## 🔍 监控和维护
-
-### Prometheus + Grafana监控
-```yaml
-# 在docker-compose.yml中添加
-services:
- prometheus:
- image: prom/prometheus:latest
- ports:
- - "9090:9090"
- volumes:
- - ./prometheus.yml:/etc/prometheus/prometheus.yml
- depends_on:
- - app
-
- grafana:
- image: grafana/grafana:latest
- ports:
- - "3000:3000"
- environment:
- - GF_SECURITY_ADMIN_PASSWORD=admin
- depends_on:
- - prometheus
-```
-
-### 日志管理
-```bash
-# 查看所有容器日志
-docker-compose logs
-
-# 实时跟踪特定服务
-docker-compose logs -f app
-
-# 清理旧日志
-docker system prune -f
-```
-
-## 🔐 安全加固
-
-### 1. SSL证书
-```bash
-# 使用Let's Encrypt自动获取证书
-certbot --nginx -d yourdomain.com -d www.yourdomain.com
-
-# 设置自动续期
-(crontab -l 2>/dev/null; echo "0 3 * * * certbot renew --quiet") | crontab -
-```
-
-### 2. 防火墙配置
-```bash
-# 仅开放必要端口
-ufw allow 22/tcp # SSH
-ufw allow 80/tcp # HTTP
-ufw allow 443/tcp # HTTPS
-ufw enable
-```
-
-### 3. 定期备份
-```bash
-#!/bin/bash
-# backup.sh
-
-DATE=$(date +%Y%m%d_%H%M%S)
-BACKUP_DIR="/backup/yuzhiran"
-
-mkdir -p $BACKUP_DIR
-
-# 数据库备份
-docker exec db pg_dump -U yuzhiran yuzhiran_db > $BACKUP_DIR/db_$DATE.sql
-
-# 上传备份到云存储(可选)
-# aws s3 cp $BACKUP_DIR/db_$DATE.sql s3://your-bucket/backups/
-
-# 清理30天前的备份
-find $BACKUP_DIR -name "db_*.sql" -mtime +30 -delete
-
-echo "备份完成: $BACKUP_DIR"
-```
-
-## 📈 性能优化
-
-### 1. 数据库优化
-```sql
--- 添加更多索引
-CREATE INDEX idx_topics_generated_at ON topics(generated_at);
-CREATE INDEX idx_topics_published_at ON topics(published_at);
-
--- 定期清理旧数据
-DELETE FROM audit_logs WHERE timestamp < NOW() - INTERVAL '90 days';
-VACUUM ANALYZE;
-```
-
-### 2. 应用层优化
-```python
-# 添加Redis缓存
-from redis import Redis
-import json
-
-redis_client = Redis.from_url(os.getenv("REDIS_URL"))
-
-@cache(ttl=300) # 5分钟缓存
-async def get_system_status():
- # 查询逻辑...
- return result
-```
-
-### 3. Nginx优化
-```nginx
-# 增加worker进程数
-worker_processes auto;
-
-# 优化连接处理
-events {
- worker_connections 4096;
- use epoll;
- multi_accept on;
-}
-
-# 启用HTTP/2
-listen 443 ssl http2;
-```
-
-## 🚨 故障排除
-
-### 常见问题
-1. **容器启动失败**
- ```bash
- # 查看详细错误
- docker-compose logs app
-
- # 检查端口冲突
- netstat -tulpn | grep :8001
- ```
-
-2. **数据库连接失败**
- ```bash
- # 进入数据库容器
- docker-compose exec db psql -U yuzhiran -d yuzhiran_db
-
- # 测试连接
- \l # 列出数据库
- \dt # 列出表
- ```
-
-3. **前端无法访问API**
- ```bash
- # 检查CORS配置
- curl -v http://localhost:8001/api/system/status
-
- # 检查Nginx配置
- docker-compose exec nginx nginx -t
- ```
-
-### 紧急恢复
-```bash
-# 重启所有服务
-docker-compose restart
-
-# 重新构建并启动
-docker-compose down && docker-compose up -d --build
-
-# 回滚到上一版本
-git checkout HEAD~1 && docker-compose up -d --build
-```
-
-## 📞 技术支持
-
-如有问题,请联系:
-- 技术文档: docs.yuzhiran.com
-- 邮件支持: support@yuzhiran.com
-- GitHub Issues: github.com/your-org/yuzhiran-platform/issues
-
----
-
-**最后更新**: 2026-04-26
-**维护人员**: 宇之然技术团队
-**版本**: v1.0.0
\ No newline at end of file
diff --git a/platform/backend/Dockerfile b/platform/backend/Dockerfile
deleted file mode 100644
index 3e120bb..0000000
--- a/platform/backend/Dockerfile
+++ /dev/null
@@ -1,49 +0,0 @@
-# 宇之然内容创作平台 - 后端Docker镜像
-
-FROM python:3.10-slim as builder
-
-WORKDIR /app
-
-# 安装系统依赖
-RUN apt-get update && apt-get install -y \
- build-essential \
- libpq-dev \
- && rm -rf /var/lib/apt/lists/*
-
-# 复制requirements文件
-COPY requirements.txt .
-
-# 安装Python依赖(带缓存优化)
-RUN pip install --user --no-cache-dir -r requirements.txt
-
-# 生产阶段
-FROM python:3.10-slim
-
-WORKDIR /app
-
-# 从builder阶段复制已安装的依赖
-COPY --from=builder /root/.local /root/.local
-COPY . .
-
-# 确保PATH包含用户本地bin目录
-ENV PATH=/root/.local/bin:$PATH
-
-# 创建非root用户
-RUN groupadd -r appuser && useradd -r -g appuser appuser
-RUN chown -R appuser:appuser /app
-
-USER appuser
-
-# 健康检查
-HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
- CMD curl -f http://localhost:8001/health || exit 1
-
-EXPOSE 8001
-
-# 运行应用
-CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]
-
-# 标签信息
-LABEL maintainer="宇之然团队"
-LABEL version="1.0.0"
-LABEL description="企业级内容创作管理系统"
\ No newline at end of file
diff --git a/platform/backend/api/admin.py.bak b/platform/backend/api/admin.py.bak
new file mode 100644
index 0000000..7c121de
--- /dev/null
+++ b/platform/backend/api/admin.py.bak
@@ -0,0 +1,182 @@
+# 宇之然内容创作平台 - 管理员API
+
+from fastapi import APIRouter, Depends, HTTPException, status
+from sqlalchemy.orm import Session
+from typing import List
+
+from core.security import get_current_admin_user
+from app.database import get_db
+from app.models import User, AuditLog
+
+router = APIRouter()
+
+@router.get("/users", response_model=List[dict])
+async def get_users(
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """获取用户列表(管理员功能)"""
+
+ users = db.query(User).all()
+ result = []
+ for user in users:
+ result.append({
+ "id": user.id,
+ "username": user.username,
+ "role": user.role,
+ "created_at": user.created_at.isoformat() if user.created_at else None,
+ "last_login": user.last_login.isoformat() if user.last_login else None
+ })
+
+ return result
+
+@router.post("/users", response_model=dict)
+async def create_user(
+ username: str,
+ password: str,
+ role: str = "user",
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """创建新用户(管理员功能)"""
+
+ # 检查用户名是否已存在
+ existing_user = db.query(User).filter(User.username == username).first()
+ if existing_user:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="用户名已存在"
+ )
+
+ # 验证角色
+ if role not in ["admin", "user"]:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="角色必须是 admin 或 user"
+ )
+
+ # 导入密码哈希函数
+ from core.security import get_password_hash
+
+ # 创建新用户
+ new_user = User(
+ username=username,
+ password_hash=get_password_hash(password),
+ role=role
+ )
+ db.add(new_user)
+ db.commit()
+ db.refresh(new_user)
+
+ # 记录审计日志
+ from core.security import create_audit_log
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="create_user",
+ resource_type="user",
+ resource_id=new_user.id,
+ details=f"角色: {role}"
+ )
+
+ return {
+ "id": new_user.id,
+ "username": new_user.username,
+ "role": new_user.role,
+ "created_at": new_user.created_at.isoformat() if new_user.created_at else None
+ }
+
+@router.put("/users/{user_id}", response_model=dict)
+async def update_user(
+ user_id: int,
+ username: str = None,
+ role: str = None,
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """更新用户信息(管理员功能)"""
+
+ user = db.query(User).filter(User.id == user_id).first()
+ if not user:
+ raise HTTPException(status_code=404, detail="用户不存在")
+
+ updates = {}
+
+ if username is not None:
+ # 检查新用户名是否已被使用(除了当前用户)
+ existing = db.query(User).filter(
+ User.username == username,
+ User.id != user_id
+ ).first()
+ if existing:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="用户名已被使用"
+ )
+ user.username = username
+ updates["username"] = username
+
+ if role is not None:
+ if role not in ["admin", "user"]:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="角色必须是 admin 或 user"
+ )
+ user.role = role
+ updates["role"] = role
+
+ if updates:
+ db.commit()
+
+ # 记录审计日志
+ from core.security import create_audit_log
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="update_user",
+ resource_type="user",
+ resource_id=user_id,
+ details=f"更新字段: {', '.join(updates.keys())}"
+ )
+
+ return {
+ "id": user.id,
+ "username": user.username,
+ "role": user.role,
+ "updated_at": datetime.utcnow().isoformat()
+ }
+
+@router.delete("/users/{user_id}")
+async def delete_user(
+ user_id: int,
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """删除用户(管理员功能)"""
+
+ # 不能删除自己
+ if user_id == current_user.id:
+ raise HTTPException(
+ status_code=status.HTTP_400_BAD_REQUEST,
+ detail="不能删除自己的账户"
+ )
+
+ user = db.query(User).filter(User.id == user_id).first()
+ if not user:
+ raise HTTPException(status_code=404, detail="用户不存在")
+
+ db.delete(user)
+ db.commit()
+
+ # 记录审计日志
+ from core.security import create_audit_log
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="delete_user",
+ resource_type="user",
+ resource_id=user_id,
+ details="用户账户已删除"
+ )
+
+ return {"message": "用户已成功删除"}
\ No newline at end of file
diff --git a/platform/backend/api/topics.py.bak b/platform/backend/api/topics.py.bak
new file mode 100644
index 0000000..c331482
--- /dev/null
+++ b/platform/backend/api/topics.py.bak
@@ -0,0 +1,189 @@
+# 宇之然内容创作平台 - 选题管理API
+
+from pydantic import BaseModel
+from datetime import datetime
+from fastapi import APIRouter, Depends, HTTPException, status, Query
+from sqlalchemy.orm import Session
+from typing import List, Optional
+import json
+
+from core.security import get_current_admin_user, create_audit_log
+from app.database import get_db
+from app.models import Topic, User
+
+router = APIRouter()
+
+class TopicCreateRequest(BaseModel):
+ title: str
+ field: Optional[str] = None
+ priority_score: int = 0
+
+class TopicUpdateRequest(BaseModel):
+ title: Optional[str] = None
+ field: Optional[str] = None
+ priority_score: Optional[int] = None
+ status: Optional[str] = None
+
+@router.get("/", response_model=List[dict])
+async def get_topics(
+ status: Optional[str] = Query(None),
+ page: int = Query(1, ge=1),
+ size: int = Query(20, ge=1, le=100),
+ db: Session = Depends(get_db)
+):
+ """获取选题列表"""
+ query = db.query(Topic)
+
+ # 状态筛选
+ if status:
+ query = query.filter(Topic.status == status)
+
+ # 分页
+ offset = (page - 1) * size
+ topics = query.offset(offset).limit(size).all()
+
+ # 转换为字典格式
+ result = []
+ for topic in topics:
+ result.append({
+ "id": topic.id,
+ "title": topic.title,
+ "field": topic.field,
+ "priority_score": topic.priority_score,
+ "status": topic.status,
+ "compliance_score": topic.compliance_score,
+ "created_at": topic.created_at.isoformat() if topic.created_at else None,
+ "updated_at": topic.updated_at.isoformat() if topic.updated_at else None,
+ "generated_at": topic.generated_at.isoformat() if topic.generated_at else None,
+ "published_at": topic.published_at.isoformat() if topic.published_at else None,
+ "platform_urls": topic.platform_urls
+ })
+
+ return result
+
+@router.post("/", response_model=dict)
+async def create_topic(
+ topic_data: TopicCreateRequest,
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """创建新选题(管理员功能)"""
+ new_topic = Topic(
+ title=topic_data.title,
+ field=topic_data.field,
+ priority_score=topic_data.priority_score,
+ status="待处理"
+ )
+ db.add(new_topic)
+ db.commit()
+ db.refresh(new_topic)
+
+ # 记录审计日志
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="create_topic",
+ resource_type="topic",
+ resource_id=new_topic.id,
+ details=f"标题: {topic_data.title}"
+ )
+
+ return {
+ "id": new_topic.id,
+ "title": new_topic.title,
+ "status": new_topic.status,
+ "created_at": new_topic.created_at.isoformat() if new_topic.created_at else None
+ }
+
+@router.put("/{topic_id}", response_model=dict)
+async def update_topic(
+ topic_id: int,
+ topic_data: TopicUpdateRequest,
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """更新选题信息(管理员功能)"""
+ topic = db.query(Topic).filter(Topic.id == topic_id).first()
+ if not topic:
+ raise HTTPException(status_code=404, detail="选题不存在")
+
+ # 更新字段
+ if topic_data.title is not None:
+ topic.title = topic_data.title
+ if topic_data.field is not None:
+ topic.field = topic_data.field
+ if topic_data.priority_score is not None:
+ topic.priority_score = topic_data.priority_score
+ if topic_data.status is not None:
+ topic.status = topic_data.status
+
+ topic.updated_at = datetime.utcnow()
+ db.commit()
+ db.refresh(topic)
+
+ # 记录审计日志
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="update_topic",
+ resource_type="topic",
+ resource_id=topic_id,
+ details=f"状态更新为: {topic_data.status}"
+ )
+
+ return {
+ "id": topic.id,
+ "title": topic.title,
+ "status": topic.status,
+ "updated_at": topic.updated_at.isoformat() if topic.updated_at else None
+ }
+
+@router.delete("/{topic_id}")
+async def delete_topic(
+ topic_id: str,
+ current_user: User = Depends(get_current_admin_user),
+ db: Session = Depends(get_db)
+):
+ """删除选题(管理员功能)"""
+ topic = db.query(Topic).filter(Topic.id == topic_id).first()
+ if not topic:
+ raise HTTPException(status_code=404, detail="选题不存在")
+
+ db.delete(topic)
+ db.commit()
+
+ # 记录审计日志
+ create_audit_log(
+ db=db,
+ user_id=current_user.id,
+ action="delete_topic",
+ resource_type="topic",
+ resource_id=topic_id,
+ details="选题已删除"
+ )
+
+ return {"message": "选题已成功删除"}
+
+@router.get("/{topic_id}", response_model=dict)
+async def get_topic(
+ topic_id: int,
+ db: Session = Depends(get_db)
+):
+ """获取单个选题详情"""
+ topic = db.query(Topic).filter(Topic.id == topic_id).first()
+ if not topic:
+ raise HTTPException(status_code=404, detail="选题不存在")
+
+ return {
+ "id": topic.id,
+ "title": topic.title,
+ "field": topic.field,
+ "priority_score": topic.priority_score,
+ "status": topic.status,
+ "compliance_score": topic.compliance_score,
+ "created_at": topic.created_at.isoformat() if topic.created_at else None,
+ "updated_at": topic.updated_at.isoformat() if topic.updated_at else None,
+ "generated_at": topic.generated_at.isoformat() if topic.generated_at else None,
+ "published_at": topic.published_at.isoformat() if topic.published_at else None,
+ "platform_urls": topic.platform_urls
+ }
\ No newline at end of file
diff --git a/platform/backend/app/api/auth.py b/platform/backend/app/api/auth.py
index 247fa31..05b75e9 100644
--- a/platform/backend/app/api/auth.py
+++ b/platform/backend/app/api/auth.py
@@ -100,7 +100,7 @@ def login(login_data: LoginRequest, request: Request, db: Session = Depends(get_
user_agent=user_agent,
db=db
)
- return TokenResponse(token=token, role=user.role, user=UserResponse.from_orm(user))
+ return TokenResponse(token=token, role=user.role, user=UserResponse.model_validate(user))
# 从数据库查询其他用户
user = db.query(User).filter(User.username == login_data.username).first()
@@ -136,7 +136,7 @@ def login(login_data: LoginRequest, request: Request, db: Session = Depends(get_
user_agent=user_agent,
db=db
)
- return TokenResponse(token=token, role=user.role, user=UserResponse.from_orm(user))
+ return TokenResponse(token=token, role=user.role, user=UserResponse.model_validate(user))
def get_current_user(request: Request, db: Session = Depends(get_db)) -> User:
"""依赖项:验证用户登录"""
@@ -159,5 +159,5 @@ def get_me(
current_user: User = Depends(get_current_user)
):
"""获取当前登录用户信息"""
- return {"user": UserResponse.from_orm(current_user)}
+ return {"user": UserResponse.model_validate(current_user)}
diff --git a/platform/backend/app/api/cases.py b/platform/backend/app/api/cases.py
index fd69e16..49d4a9f 100644
--- a/platform/backend/app/api/cases.py
+++ b/platform/backend/app/api/cases.py
@@ -28,7 +28,7 @@ def list_cases(
):
"""获取案例列表(管理员)"""
cases = db.query(Case).all()
- return [CaseResponse.from_orm(c) for c in cases]
+ return [CaseResponse.model_validate(c) for c in cases]
@router.get("/{case_id}", response_model=CaseResponse)
def get_case(
@@ -51,10 +51,7 @@ def create_case(
admin_user = Depends(get_current_admin)
):
"""创建新案例"""
- existing = db.query(Case).filter(Case.id == case_data.id).first()
- if existing:
- raise HTTPException(status_code=400, detail="案例ID已存在")
- case = Case(**case_data.dict())
+ case = Case(**case_data.model_dump())
db.add(case)
db.commit()
db.refresh(case)
@@ -72,7 +69,7 @@ def update_case(
case = db.query(Case).filter(Case.id == case_id).first()
if not case:
raise HTTPException(status_code=404, detail="案例不存在")
- update_data = case_update.dict(exclude_unset=True)
+ update_data = case_update.model_dump(exclude_unset=True)
for field, value in update_data.items():
setattr(case, field, value)
db.commit()
diff --git a/platform/backend/app/api/llm_configs.py b/platform/backend/app/api/llm_configs.py
index 9e322d3..eca6c85 100644
--- a/platform/backend/app/api/llm_configs.py
+++ b/platform/backend/app/api/llm_configs.py
@@ -28,7 +28,7 @@ def list_llm_configs(
):
"""获取 LLM 配置列表"""
configs = db.query(LLMConfig).all()
- return [LLMConfigResponse.from_orm(c) for c in configs]
+ return [LLMConfigResponse.model_validate(c) for c in configs]
@router.get("/{config_id}", response_model=LLMConfigResponse)
def get_llm_config(
@@ -51,7 +51,7 @@ def create_llm_config(
admin_user = Depends(get_current_admin)
):
"""创建 LLM 配置"""
- config = LLMConfig(**config_data.dict())
+ config = LLMConfig(**config_data.model_dump())
db.add(config)
db.commit()
db.refresh(config)
@@ -69,7 +69,7 @@ def update_llm_config(
config = db.query(LLMConfig).filter(LLMConfig.id == config_id).first()
if not config:
raise HTTPException(status_code=404, detail="配置不存在")
- update_data = config_update.dict(exclude_unset=True)
+ update_data = config_update.model_dump(exclude_unset=True)
for field, value in update_data.items():
setattr(config, field, value)
db.commit()
diff --git a/platform/backend/app/api/optimizer_logs.py b/platform/backend/app/api/optimizer_logs.py
index cf5afcb..1cd9a65 100644
--- a/platform/backend/app/api/optimizer_logs.py
+++ b/platform/backend/app/api/optimizer_logs.py
@@ -11,7 +11,7 @@ router = APIRouter(prefix="/api", tags=["optimizer_logs"])
PROJECT_ROOT = Path(__file__).parent.parent.parent.parent.parent
@router.post("/optimizer/run")
-def run_optimizer(
+async def run_optimizer(
request: Request,
db: Session = Depends(get_db),
current_user: User = Depends(get_current_admin)
@@ -20,7 +20,7 @@ def run_optimizer(
触发合规优化器运行(管理员)
"""
try:
- body = request.json()
+ body = await request.json()
except Exception:
raise HTTPException(status_code=400, detail="Invalid JSON")
topic_id = body.get("topic_id")
diff --git a/platform/backend/app/api/system_configs.py b/platform/backend/app/api/system_configs.py
index e76edf2..a6e4f0b 100644
--- a/platform/backend/app/api/system_configs.py
+++ b/platform/backend/app/api/system_configs.py
@@ -31,7 +31,7 @@ def list_system_configs(
# 将 value 解析为 JSON(如果是 JSON 字符串)
result = []
for c in configs:
- resp = SystemConfigResponse.from_orm(c)
+ resp = SystemConfigResponse.model_validate(c)
# 尝试解析 value 为 JSON
if c.value:
try:
@@ -53,7 +53,7 @@ def get_system_config(
config = db.query(SystemConfig).filter(SystemConfig.key == config_key).first()
if not config:
raise HTTPException(status_code=404, detail="配置不存在")
- resp = SystemConfigResponse.from_orm(config)
+ resp = SystemConfigResponse.model_validate(config)
if config.value:
try:
import json
@@ -85,7 +85,7 @@ def create_system_config(
existing.description = config_data.description
db.commit()
db.refresh(existing)
- resp = SystemConfigResponse.from_orm(existing)
+ resp = SystemConfigResponse.model_validate(existing)
if existing.value:
try:
import json
@@ -95,7 +95,7 @@ def create_system_config(
return resp
else:
# 新建
- data = config_data.dict()
+ data = config_data.model_dump()
# 将 value 转为字符串(如果是复杂类型则 JSON)
if isinstance(data.get('value'), (dict, list)):
import json
@@ -104,7 +104,7 @@ def create_system_config(
db.add(config)
db.commit()
db.refresh(config)
- resp = SystemConfigResponse.from_orm(config)
+ resp = SystemConfigResponse.model_validate(config)
if config.value:
try:
import json
diff --git a/platform/backend/app/api/task_logs.py b/platform/backend/app/api/task_logs.py
index 805f77d..aad6c2e 100644
--- a/platform/backend/app/api/task_logs.py
+++ b/platform/backend/app/api/task_logs.py
@@ -38,7 +38,7 @@ def list_task_logs(
if status:
query = query.filter(TaskLog.status == status)
logs = query.order_by(TaskLog.started_at.desc()).all()
- return [TaskLogResponse.from_orm(l) for l in logs]
+ return [TaskLogResponse.model_validate(l) for l in logs]
@router.get("/{log_id}", response_model=TaskLogResponse)
def get_task_log(
@@ -61,7 +61,7 @@ def create_task_log(
admin_user = Depends(get_current_admin)
):
"""创建任务日志(用于手动记录)"""
- log = TaskLog(**log_data.dict())
+ log = TaskLog(**log_data.model_dump())
db.add(log)
db.commit()
db.refresh(log)
@@ -79,7 +79,7 @@ def update_task_log(
log = db.query(TaskLog).filter(TaskLog.id == log_id).first()
if not log:
raise HTTPException(status_code=404, detail="日志不存在")
- update_data = log_update.dict(exclude_unset=True)
+ update_data = log_update.model_dump(exclude_unset=True)
for field, value in update_data.items():
setattr(log, field, value)
db.commit()
diff --git a/platform/backend/app/database.py b/platform/backend/app/database.py
index 27e66f9..9d0adc2 100644
--- a/platform/backend/app/database.py
+++ b/platform/backend/app/database.py
@@ -38,6 +38,14 @@ Base = declarative_base()
def init_db():
Base.metadata.create_all(bind=engine)
+ # 迁移:为已有表添加 last_login 列
+ try:
+ from sqlalchemy import text
+ with engine.connect() as conn:
+ conn.execute(text("ALTER TABLE users ADD COLUMN IF NOT EXISTS last_login TIMESTAMP"))
+ conn.commit()
+ except Exception:
+ pass # SQLite 不支持 IF NOT EXISTS,但 create_all 对 SQLite 够用
def get_db():
db = SessionLocal()
diff --git a/platform/backend/app/initial_data.py b/platform/backend/app/initial_data.py
index b1e98b1..5c1eff4 100644
--- a/platform/backend/app/initial_data.py
+++ b/platform/backend/app/initial_data.py
@@ -41,7 +41,7 @@ def import_initial_data():
### 选题信息
标题:{topic.get('title')}
-领域:{topic.get('field')}
+领域:{topic.get('field_name')}
核心观点:{topic.get('core_concept', '')}
受众痛点:{topic.get('audience_pain', '')}
独特视角:{topic.get('unique_angle', '')}
@@ -209,6 +209,18 @@ def import_initial_data():
db.commit()
print(f"✅ 导入 {len(cases_data)} 条案例")
+ # 同步 PostgreSQL 自增序列
+ if os.getenv('USE_POSTGRES', 'true').lower() == 'true':
+ try:
+ from sqlalchemy import text
+ tables = ["cases", "users", "content_calendar", "media_assets", "content_metrics", "content_tasks", "audit_logs", "task_logs", "topic_config_fields"]
+ for table in tables:
+ db.execute(text(f"SELECT setval(pg_get_serial_sequence('{table}', 'id'), COALESCE((SELECT MAX(id) FROM {table}), 0) + 1, false)"))
+ db.commit()
+ print("✅ PostgreSQL 自增序列已同步")
+ except Exception as e:
+ print(f"⚠️ 序列同步警告: {e}")
+
print("✅ 初始化完成")
except Exception as e:
diff --git a/platform/backend/app/models.py b/platform/backend/app/models.py
index 34ef769..74d6813 100644
--- a/platform/backend/app/models.py
+++ b/platform/backend/app/models.py
@@ -41,6 +41,7 @@ class User(Base):
username = Column(String, unique=True, nullable=False, index=True)
password_hash = Column(String, nullable=False)
role = Column(String, default="user", nullable=False)
+ last_login = Column(DateTime(timezone=True), nullable=True)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
@@ -49,6 +50,7 @@ class User(Base):
"id": self.id,
"username": self.username,
"role": self.role,
+ "last_login": self.last_login.isoformat() if self.last_login else None,
"created_at": self.created_at.isoformat() if self.created_at else None
}
diff --git a/platform/backend/app/schemas.py b/platform/backend/app/schemas.py
index 6603a19..436fbc7 100644
--- a/platform/backend/app/schemas.py
+++ b/platform/backend/app/schemas.py
@@ -441,7 +441,7 @@ class TaskLogBase(BaseModel):
message: Optional[str] = None
started_at: Optional[datetime] = None
finished_at: Optional[datetime] = None
- duration_seconds: Optional[int] = None
+ duration: Optional[int] = None
class TaskLogResponse(TaskLogBase):
@@ -475,6 +475,7 @@ class SystemConfigBase(BaseModel):
class SystemConfigResponse(SystemConfigBase):
+ value: Optional[Any] = None
updated_at: Optional[datetime] = None
model_config = ConfigDict(from_attributes=True)
diff --git a/platform/backend/database.py b/platform/backend/database.py
index dc1baa9..4bef011 100644
--- a/platform/backend/database.py
+++ b/platform/backend/database.py
@@ -1,26 +1,20 @@
-# 宇之然内容创作平台 - 数据库配置
+# 宇之然内容创作平台 - 数据库配置 (SQLite版本)
-from sqlalchemy import create_engine
+from sqlalchemy import create_engine, Column, String, Integer, Float, Date, DateTime, Text, Boolean, JSON, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
-from sqlalchemy.orm import sessionmaker
+from sqlalchemy.orm import sessionmaker, relationship
+from pathlib import Path
import os
-from dotenv import load_dotenv
-load_dotenv()
-
-# 数据库URL(从环境变量读取)
-SQLALCHEMY_DATABASE_URL = os.getenv(
- "DATABASE_URL",
- "postgresql://user:password@localhost:5432/yuzhiran_db"
-)
+# 使用SQLite数据库
+BASE_DIR = Path(__file__).resolve().parent
+DATABASE_URL = f"sqlite:///{BASE_DIR / 'data' / 'yzr.db'}"
# 创建数据库引擎
engine = create_engine(
- SQLALCHEMY_DATABASE_URL,
- pool_size=20,
- max_overflow=30,
- pool_pre_ping=True,
- echo=False # 生产环境设为False
+ DATABASE_URL,
+ connect_args={"check_same_thread": False},
+ echo=False
)
# 会话工厂
@@ -29,6 +23,15 @@ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
# 基础模型类
Base = declarative_base()
+# 导入所有模型
+from app.models import *
+
+# 创建所有表
+def init_db():
+ """初始化数据库(创建表)"""
+ Base.metadata.create_all(bind=engine)
+
+# 获取数据库会话
def get_db():
"""获取数据库会话"""
db = SessionLocal()
@@ -36,8 +39,3 @@ def get_db():
yield db
finally:
db.close()
-
-def init_db():
- """初始化数据库(创建表)"""
- from app.models import Base
- Base.metadata.create_all(bind=engine)
\ No newline at end of file
diff --git a/platform/backend/main.py.bak b/platform/backend/main.py.bak
new file mode 100644
index 0000000..6e35beb
--- /dev/null
+++ b/platform/backend/main.py.bak
@@ -0,0 +1,97 @@
+import sys
+import os
+sys.path.insert(0, os.path.dirname(__file__))
+
+from fastapi import FastAPI, Request
+from fastapi.middleware.cors import CORSMiddleware
+from fastapi.responses import FileResponse
+from contextlib import asynccontextmanager
+import uvicorn
+from starlette.staticfiles import StaticFiles
+
+from app.database import init_db
+from core.security import SECRET_KEY
+from api import auth, topics, system, publishing, articles, logs, admin
+
+@asynccontextmanager
+async def lifespan(app: FastAPI):
+ """应用生命周期管理"""
+ print("正在初始化数据库...")
+ init_db()
+ print("数据库初始化完成")
+ yield
+ print("应用关闭")
+
+app = FastAPI(
+ title="宇之然内容创作平台 API",
+ description="企业级内容创作管理系统",
+ version="1.0.0",
+ lifespan=lifespan
+)
+
+# CORS配置
+app.add_middleware(
+ CORSMiddleware,
+ allow_origins=["*"],
+ allow_credentials=True,
+ allow_methods=["*"],
+ allow_headers=["*"],
+)
+
+# API 路由(必须先于静态文件注册)
+app.include_router(auth.router, prefix="/api/auth", tags=["认证"])
+app.include_router(topics.router, prefix="/api/topics", tags=["选题管理"])
+app.include_router(system.router, prefix="/api/system", tags=["系统状态"])
+app.include_router(publishing.router, prefix="/api/publishing", tags=["文章发布"])
+app.include_router(articles.router, prefix="/api/articles", tags=["文章预览"])
+app.include_router(logs.router, prefix="/api/logs", tags=["日志系统"])
+app.include_router(admin.router, prefix="/api/admin", tags=["管理员"])
+
+# 健康检查
+@app.get("/health")
+async def health_check():
+ return {"status": "healthy", "timestamp": __import__('datetime').datetime.now().isoformat()}
+
+# 独立页面路由(必须在 SPA catch-all 之前)
+@app.get("/topics.html")
+async def topics_page():
+ return FileResponse("static/topics.html")
+
+@app.get("/logs.html")
+async def logs_page():
+ return FileResponse("static/logs.html")
+
+@app.get("/users.html")
+async def users_page():
+ return FileResponse("static/users.html")
+
+
+@app.get("/login.html")
+async def login_page():
+ return FileResponse("static/login.html")
+
+@app.get("/admin.html")
+async def admin_page():
+ return FileResponse("static/admin.html")
+
+# 静态文件(不干扰API)
+app.mount("/static", StaticFiles(directory="static"), name="static")
+
+# SPA:所有非 API 路径返回 index.html(最后注册)
+@app.get("/{full_path:path}")
+async def serve_spa(full_path: str):
+ return FileResponse("static/index.html")
+
+@app.exception_handler(Exception)
+async def global_exception_handler(request: Request, exc: Exception):
+ import traceback
+ print(f"全局异常: {exc}")
+ print(f"堆栈跟踪:\n{traceback.format_exc()}")
+ return {
+ "error": "服务器内部错误",
+ "message": str(exc),
+ "path": request.url.path
+ }
+
+if __name__ == "__main__":
+ uvicorn.run("main:app", host="0.0.0.0", port=8001, reload=True, log_level="info")
diff --git a/platform/backend/static b/platform/backend/static
new file mode 120000
index 0000000..af28878
--- /dev/null
+++ b/platform/backend/static
@@ -0,0 +1 @@
+../frontend
\ No newline at end of file
diff --git a/platform/docker-compose.yml b/platform/docker-compose.yml
deleted file mode 100644
index 480bdf3..0000000
--- a/platform/docker-compose.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-version: '3.8'
-
-services:
- app:
- build:
- context: ./backend
- dockerfile: Dockerfile
- ports:
- - "8002:8001"
- environment:
- - DATABASE_URL=postgresql://yuzhiran:yuzhiran@db:5432/yuzhiran_db
- - REDIS_URL=redis://redis:6379/0
- - SECRET_KEY=your-secret-key-change-in-production
- - ALGORITHM=HS256
- - ACCESS_TOKEN_EXPIRE_MINUTES=10080
- - DEBUG=False
- - ENVIRONMENT=production
- depends_on:
- - db
- - redis
- volumes:
- - ./backend:/app
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
- interval: 30s
- timeout: 10s
- retries: 3
-
- db:
- image: postgres:13-alpine
- environment:
- POSTGRES_DB: yuzhiran_db
- POSTGRES_USER: yuzhiran
- POSTGRES_PASSWORD: yuzhiran
- POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
- volumes:
- - postgres_data:/var/lib/postgresql/data
- - ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ports:
- - "5433:5432"
- restart: unless-stopped
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U yuzhiran -d yuzhiran_db"]
- interval: 10s
- timeout: 5s
- retries: 5
-
- redis:
- image: redis:7-alpine
- command: redis-server --appendonly yes --requirepass redis123
- volumes:
- - redis_data:/data
- ports:
- - "6379:6379"
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "redis-cli", "ping"]
- interval: 10s
- timeout: 5s
- retries: 3
-
- nginx:
- image: nginx:alpine
- ports:
- - "8080:80"
- - "8443:443"
- volumes:
- - ./nginx.conf:/etc/nginx/nginx.conf
- - ./ssl:/etc/nginx/ssl
- depends_on:
- - app
- restart: unless-stopped
-
- frontend:
- build:
- context: ./frontend
- dockerfile: Dockerfile
- ports:
- - "8000:8000"
- volumes:
- - ./frontend:/usr/share/nginx/html
- restart: unless-stopped
-
-volumes:
- postgres_data:
- redis_data:
-
-networks:
- default:
- driver: bridge
\ No newline at end of file
diff --git a/platform/frontend/Dockerfile b/platform/frontend/Dockerfile
deleted file mode 100644
index a67af8f..0000000
--- a/platform/frontend/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-# 宇之然内容创作平台 - 前端Docker镜像
-
-FROM nginx:alpine as builder
-
-# 安装构建工具(用于优化HTML)
-RUN apk add --no-cache python3 py3-pip
-COPY index.html /tmp/index.html
-COPY login.html /tmp/login.html
-
-# 简单压缩HTML(实际生产应使用Webpack等构建工具)
-RUN cat /tmp/index.html | tr -d '\n' > /tmp/index.min.html && \
- mv /tmp/index.min.html /tmp/index.html
-
-WORKDIR /usr/share/nginx/html
-
-# 复制静态资源
-COPY . .
-
-# 生产阶段 - 直接使用Nginx
-FROM nginx:alpine
-
-# 复制优化后的前端文件
-COPY --from=builder /usr/share/nginx/html /usr/share/nginx/html
-
-# 配置Nginx
-COPY nginx.conf /etc/nginx/conf.d/default.conf
-
-# 健康检查
-HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
- CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1
-
-EXPOSE 8000
-
-# 标签信息
-LABEL maintainer="宇之然团队"
-LABEL version="1.0.0"
-LABEL description="企业级内容创作管理系统前端"
\ No newline at end of file
diff --git a/platform/frontend/admin.html b/platform/frontend/admin.html
index 079f2c2..d74b295 100644
--- a/platform/frontend/admin.html
+++ b/platform/frontend/admin.html
@@ -3,415 +3,376 @@
- 宇之然内容创作平台 - 用户管理
+ 宇之然内容创作平台 - 系统管理
-
-
-