How kuyucode/modular-fastapi-boilerplate works
Project type and purpose
• This is a modular FastAPI boilerplate. It is not a running application but a “starter kit” that lets you bootstrap a new FastAPI service with a predefined set of tools (SQLAlchemy, Alembic, Pytest) by simply checking out the corresponding Git branch.
• Each Git branch in the repository represents one independent module template (e.g. basic FastAPI only, FastAPI + SQLAlchemy, FastAPI + Alembic, FastAPI + Pytest, or FastAPI + Alembic + Pytest).
File structure
• Top level only contains README.rst; all code and subfolders live in each branch’s structure. Typical modules will include:
• an app/ or src/ folder with FastAPI entry point
• configuration (.env, config files)
• ORM models and database files when SQLAlchemy is included
• Alembic migration folder when migrations are enabled
• tests folder and pytest config when pytest is enabled
• Build/deployment scripts are minimal—this relies on the uv tool (or pip) for virtual-env setup and dependency syncing.
README for additional insights
• The workflow: clone → select module branch → uv venv → uv sync (or pip install -e .) → run the FastAPI app.
• Modules are layered: basic → +SQLAlchemy → +Alembic → +Pytest → +Alembic+Pytest.
Diagramming recommendations
• Clone & checkout → Developer Machine
• Developer invokes uv → venv & sync
• venv → FastAPI/SQLAlchemy/Alembic/Pytest runtime
• Application → Database
• Test runner → Application code & Database