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
+45
View File
@@ -0,0 +1,45 @@
.PHONY: help dev up down build migrate test lint format clean
help:
@echo "RSS Platform 开发命令:"
@echo " make dev - 启动开发环境 (docker-compose up -d)"
@echo " make up - 启动服务"
@echo " make down - 停止服务"
@echo " make build - 重新构建镜像"
@echo " make migrate - 执行数据库迁移"
@echo " make test - 运行后端测试"
@echo " make lint - 代码检查"
@echo " make format - 代码格式化"
@echo " make clean - 清理容器与数据卷"
dev: up migrate
@echo "开发环境已启动"
@echo "后端: http://localhost:8000"
@echo "前端: http://localhost:5173"
up:
docker-compose up -d
down:
docker-compose down
build:
docker-compose build
migrate:
docker-compose exec backend alembic upgrade head
test:
docker-compose exec backend pytest tests/ -v
lint:
docker-compose exec backend ruff check app tests
format:
docker-compose exec backend ruff format app tests
clean:
docker-compose down -v
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type d -name node_modules -exec rm -rf {} +
find . -type d -name .pytest_cache -exec rm -rf {} +