Projects
View on GitHub
Lolomgrofl/fastapi-genesis
Lolomgrofl/fastapi-genesis has 355 GitHub stars and 22 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-19 02:20 UTC. Last push 2026-11-16.
What you can do
- Docker and docker-compose for local development
- FastAPI application with uvicorn server
- AsyncPG for asynchronous access to PostgreSQL
- Pydantic for data validation
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
FastAPI project Template generator to make your life easier 𧬠π
Developer ToolsREADME.md
OriginalFastAPI Genesis 𧬠- Project Template Generator π
Simple FastAPI project template with Docker, Alembic, PostgreSQL, Poetry and pre-commit to kickstart your new projects.
How to use it π€
Go to the directory where you want to create your project and run:
pip install cookiecutter
cookiecutter https://github.com/Lolomgrofl/fastapi-genesis.git
What's included in the template π
- Here is an explanation of the directory structure of the template:
βββ .github <- GitHub deployment workflow
β
βββ alembic <- Alembic migrations
β
βββ app <- Source code of the application (the main package)
β βββ daos <- Data Access Objects (DAOs) to interact with the database
β βββ models <- SQLAlchemy models (the database schema)
β βββ routers <- FastAPI routers (endpoints)
β βββ schemas <- Pydantic schemas for request and response models
β βββ services <- Business logic layer (services)
β βββ db.py <- Database initialization and session management code
β βββ main.py <- FastAPI application instance and startup code
β βββ settings.py <- Settings management code (using pydantic settings)
β
βββ scripts <- Scripts to perform various tasks like alembic migrations, etc.
β
βββ static <- Static files like images, documents, etc.
β
βββ tests <- Unit tests, one subdirectory per application module
β
βββ .env <- Environment variables. Should not be committed to VCS
β
βββ .gitignore <- Files and directories to be ignored by git
β
βββ .pre-commit-config.yaml <- Configuration of pre-commit hooks (see https://pre-commit.com/)
β
βββ alembic.ini <- Alembic configuration file
β
βββ docker-compose.yml <- Docker compose configuration file
β
βββ Dockerfile <- Dockerfile for building the image of the application
β
βββ Makefile <- Makefile with useful commands for development and project setup
β
βββ pyproject.toml <- Python dependencies for Poetry (see https://python-poetry.org/)
β
βββ README.md <- File with useful information about the project and how to use it
Features π§©
- Docker and docker-compose for local development
- FastAPI application with uvicorn server
- AsyncPG for asynchronous access to PostgreSQL
- Pydantic for data validation
- Poetry for managing Python dependencies
- Alembic for database migrations
- Pre-commit hooks for code formatting and linting
- JWT token authentication
- SQLAlchemy models
- CORS (Cross Origin Resource Sharing)
- GitOps ( GitHub Workflows)
User flow as an example of how to use the template π‘
- It consists of the following steps:
- Register a new user
- Login with the new user
- Change password
- Get all users
- Delete user by id
- Delete all users
- This following example will show you the pattern and good practices to follow in order to continue developing your application.
Cookiecutter parameters explained πͺ
repo_name: Name of the project repository (e.g.my_project)app_container_name: Name of the Docker container for the FastAPI application server insidedocker-compose.yamlfileapp_service_port: Port on the host machine to which the FastAPI application will be exposed insidedocker-compose.yamlfile andDockerfiledb_container_name: Name of the Docker container for the PostgreSQL database server insidedocker-compose.yamlfiledb_service_port: Port on the host machine to which the PostgreSQL database server will be exposed insidedocker-compose.yamlfilepgadmin_container_name: Name of the Docker container for the pgAdmin web interface insidedocker-compose.yamlfilepgadmin_service_port: Port on the host machine to which the pgAdmin web interface will be exposed insidedocker-compose.yamlfilenetwork_name: Name of the Docker network that will be created insidedocker-compose.yamlfile
GLHF π
License
This project is licensed under the terms of the MIT license.