How elioenaijs/crud-fastapi works
Project type and purpose
• This is a backend-only REST API written in Python (FastAPI, served via Uvicorn) with a MySQL database managed through Docker Compose.
• It implements a classic layered (MVC-inspired) architecture to manage “tasks” (create, read, update, delete).
File structure
• Top-level entrypoint: main.py (bootstraps FastAPI/Uvicorn).
• controllers/ houses request‐handling logic (TaskController).
• services/ contains business logic (TaskService).
• db/ holds low-level database configuration and connection (db/db.py).
• models/ defines ORM models (Task model).
• schemas/ defines Pydantic schemas for validation and serialization.
• docker-compose.yml orchestrates a MySQL container.
• requirements.txt pins Python dependencies.
README for additional insights
• Uses a virtual environment, installs dependencies, boots MySQL via Docker, then runs uvicorn app.main:app.
• Exposes Swagger docs at /docs.
• Core stack: FastAPI, Uvicorn, Pydantic, MySQL (Docker).