- Notifications
You must be signed in to change notification settings - Fork9
A dockerized FastAPI Boilerplate with JWT, Loguru logging, Role based authorization, SQLAlchemy ORM with AsyncSession. Repository design pattern, Domain driven design, Service Layer implemented.
License
theshohidul/FastAPI-Boilerplate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A dockerized FastAPI Boilerplate with JWT, Loguru logging middleware, Role based authorization, SQLAlchemy ORM with AsyncSession.
Some endpoints are added as demo purpose, like: auth, register and login.
In this projectpoetry is used as package dependency manager. Below python packages are used in this project.
- python = "^3.11"
- uvicorn = {extras = ["standard"], version = "^0.20.0"}
- fastapi = {extras = ["all"], version = "^0.89.1"}
- json-log-formatter = "^0.5.1"
- alembic = "^1.9.2"
- databases = {extras = ["aiomysql"], version = "^0.7.0"}
- loguru = "^0.6.0"
- cryptography = "^38.0.1"
- bcrypt = "^4.0.0"
- sqlalchemy = "^1.4.46"
- pyjwt = "^2.6.0"
- mysqlclient = "^2.1.1"
Clone the project
git clone https://github.com/theshohidul/FastAPI-Boilerplate.git
Go to the project directory
cd FastAPI-Boilerplate
To run this project locally, go to/docker
folder and edit.env
file if required.Then open a terminal inside the/docker
folder and run the below command in the terminal.
docker compose up
After docker containers are up, you can access the application in:http://localhost:8080
Then exec inside the docker app container and activate the venv, and go to /app/core/db/migrations - run below command:
alembic upgrade head
This will create all required tables.
Contributions are always welcome!
I'm a full stack developer...
About
A dockerized FastAPI Boilerplate with JWT, Loguru logging, Role based authorization, SQLAlchemy ORM with AsyncSession. Repository design pattern, Domain driven design, Service Layer implemented.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.