ba6e7669e8
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>
46 lines
1.1 KiB
Makefile
46 lines
1.1 KiB
Makefile
.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 {} +
|