https://github.com/commitwiz/fastapi-jwt-authentication-example
About This is JWT authentication example with FastAPI . It uses an async PostgreSQL connection with SqlAlchemy ORM. There is an alembic config also.
https://github.com/commitwiz/fastapi-jwt-authentication-example
fastapi fastapi-alembic fastapi-jwt fastapi-jwt-auth fastapi-sqlalchemy python
Last synced: 3 months ago
JSON representation
About This is JWT authentication example with FastAPI . It uses an async PostgreSQL connection with SqlAlchemy ORM. There is an alembic config also.
- Host: GitHub
- URL: https://github.com/commitwiz/fastapi-jwt-authentication-example
- Owner: commitwiz
- Created: 2025-10-02T12:48:20.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-10-02T12:53:48.000Z (3 months ago)
- Last Synced: 2025-10-02T19:27:00.690Z (3 months ago)
- Topics: fastapi, fastapi-alembic, fastapi-jwt, fastapi-jwt-auth, fastapi-sqlalchemy, python
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI JWT Authentication example
This project includes authentication APIs (login, register, verify, forgot-password, reset-password, update-password) and article list and create APIs. It uses an async PostgreSQL connection with SqlAlchemy ORM. There is an alembic config also.
## Installation
- If you want to run docker you need to [install docker](https://docs.docker.com/engine/install/)
- Configure your postgresql
- Create .env from .env.example
```bash
cp .env.example .env
```
- Add Postgresql config to .env
- Run docker
```bash
docker-compose up -d --build
```
or
```bash
docker compose up -d --build
```
### if you want to run this app without docker
- Add Postgresql config to alembic/env.py and src/core/config.py
- Use the package manager [pip](https://pip.pypa.io/en/stable/) to install requirements.txt.
```bash
pip install -r requirements.txt
```
- Run app with start.sh. It will do migrate migrations then run app
```bash
chmod 755 start.sh
sh start.sh
```