How jod35/fastapi-beyond-crud works
Project type and purpose
• This is a backend-only, monolithic REST API service built with FastAPI. It goes beyond basic CRUD by including authentication, background tasks (via Celery), email notifications, and domain modules (books, reviews, tags). It persists data in PostgreSQL (via SQLAlchemy/Alembic) and uses Redis as a broker/cache.
File structure
• Top-level artifacts:
• Dockerfile, compose.yml → containerization & orchestration
• alembic.ini + migrations/ → database schema migrations
• runworker.sh + src/celery_tasks.py → Celery worker setup
• requirements.txt → Python dependencies
• src/ → source code
• Inside src/:
• src/auth, src/books, src/reviews, src/tags → feature modules, each with routes, schemas (Pydantic models), and service logic
• src/db/ → database initialization (main.py), ORM models, Redis client
• src/config.py → centralized config (env vars)
• src/middleware.py → API-level middleware
• src/mail.py → email‐sending utility
• src/tests/ → pytest integration & unit tests
README for additional insights
• The README confirms the need for PostgreSQL and Redis, details Docker Compose usage, Celery worker startup, and highlights a course focus on advanced FastAPI concepts.