Initial commit: RSS platform phase 1 skeleton with code review fixes

Features:
- FastAPI + SQLAlchemy 2.0 async + PostgreSQL/pgvector + Redis backend
- Vue 3 + TypeScript + Element Plus frontend
- JWT auth with access/refresh tokens and revocation
- Admin/member RBAC
- RSS feed CRUD and article listing
- Settings management with Fernet encryption for sensitive values
- Redis distributed lock service
- Alembic initial migration
- Docker Compose development environment

Fixes from code review:
- Fix DB session leak in dependency injection
- Restrict registration to admin only
- Add default admin password warning
- Implement JWT refresh tokens and jti blacklist
- Strengthen password policy
- Use func.count for pagination totals
- Replace NullPool with AsyncAdaptedQueuePool
- Remove init_db from lifespan to enforce alembic migrations
- Add request_id middleware and logging filter
- Fix vite.config.ts env loading
- Add frontend token refresh interceptor
- Add Vue error handler

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
congsh
2026-06-15 17:01:57 +08:00
commit ba6e7669e8
82 changed files with 6859 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
# RSS 信息处理平台
模块化、工业化、AI 驱动的 RSS 信息处理平台,统一承接 RSS 抓取、数据清洗、AI 分类/摘要/打分、去重、日报产出、聊天问答等能力。
## 快速开始
### 1. 环境准备
复制示例配置:
```bash
cp .env.example .env
```
根据需要修改 `.env` 中的配置,尤其是 `SECRET_KEY`
### 2. 启动开发环境
```bash
make dev
```
服务将启动:
- 后端:`http://localhost:8000`
- 前端:`http://localhost:5173`
- PostgreSQL`localhost:5432`
- Redis`localhost:6379`
- MinIO`http://localhost:9000`
### 3. 首次使用
默认会创建一个管理员账号(见 `.env``DEFAULT_ADMIN_USERNAME` / `DEFAULT_ADMIN_PASSWORD`),使用它登录前端。
**安全提示**:生产环境务必修改 `SECRET_KEY` 和默认管理员密码;如未修改,`/health` 接口会返回安全警告。
### 4. 停止环境
```bash
make down
```
## 开发命令
```bash
make migrate # 执行数据库迁移
make test # 运行测试
make lint # 代码检查
make format # 代码格式化
```
## 项目结构
```
rss-platform/
├── backend/ # FastAPI 后端
├── frontend/ # Vue 3 + TypeScript 前端
├── plugins/ # 可插拔插件(去重算法等)
├── docker/ # Docker 相关文件
├── scripts/ # 工具脚本
└── docs/ # 文档
```
## 配套文档
- 架构设计:`docs/design.md`
- 开发步骤:`docs/dev-plan.md`
- 代码审核与修复记录:`docs/code-review.md`