{"id":25527126,"url":"https://github.com/steqa/fastapi-jwt-template","last_synced_at":"2025-07-12T09:35:09.256Z","repository":{"id":278142900,"uuid":"934243617","full_name":"steqa/fastapi-jwt-template","owner":"steqa","description":"This is a template for a FastAPI application with JWT authentication. It uses PostgreSQL for the database and Redis for blacklisting refresh tokens. The project is containerized using Docker.","archived":false,"fork":false,"pushed_at":"2025-02-18T07:33:19.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T08:32:17.049Z","etag":null,"topics":["alembic","fastapi","postgresql","python","redis","template"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steqa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-17T14:07:16.000Z","updated_at":"2025-02-18T07:32:06.000Z","dependencies_parsed_at":"2025-02-18T08:33:12.871Z","dependency_job_id":"6e01c359-df6e-4f82-abf4-b54dc8e2132d","html_url":"https://github.com/steqa/fastapi-jwt-template","commit_stats":null,"previous_names":["steqa/fastapi-jwt-template"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steqa%2Ffastapi-jwt-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steqa%2Ffastapi-jwt-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steqa%2Ffastapi-jwt-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steqa%2Ffastapi-jwt-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steqa","download_url":"https://codeload.github.com/steqa/fastapi-jwt-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239742416,"owners_count":19689310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alembic","fastapi","postgresql","python","redis","template"],"created_at":"2025-02-19T22:17:14.629Z","updated_at":"2025-04-11T06:09:49.268Z","avatar_url":"https://github.com/steqa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[en](README.md) [ru](locale/README.ru.md)\n\n# Fast JWTemplate :rocket:\n\n![GitHub Release](https://img.shields.io/github/v/release/steqa/fast-jwtemplate) ![License](https://img.shields.io/badge/license-MIT-green)\n\n![Python](https://img.shields.io/badge/Python-3.13-blue?style=flat\u0026logo=python\u0026logoColor=white) ![FastAPI](https://img.shields.io/badge/FastAPI-009688?style=flat\u0026logo=fastapi\u0026logoColor=white) ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-336791?style=flat\u0026logo=postgresql\u0026logoColor=white) ![Redis](https://img.shields.io/badge/Redis-D02C2A?style=flat\u0026logo=redis\u0026logoColor=white) ![Alembic](https://img.shields.io/badge/Alembic-b57414?style=flat\u0026logo=python\u0026logoColor=white)\n\n## Content\n1. [Description](#description)\n2. [Features](#features)\n3. [Prerequisites](#prerequisites)\n4. [Setup](#setup)\n5. [Usage](#usage)\n6. [License](#license)\n## Description\n\nThis is a template for a FastAPI application with JWT authentication. It uses PostgreSQL for the database and Redis for blacklisting refresh tokens. The project is containerized using Docker.\n\n## Features\n\n- Secure JWT-based user authentication with bcrypt hashing for passwords\n- API endpoints for login, logout, and token refresh, with expiration handling\n- Blacklisting refresh tokens in Redis for enhanced security\n- Creating a user with password validation\n\n## Endpoints\n\n1. **Login User**\n\t- _**POST**_ `/api/v1/auth/jwt/login`\n\t- _**Description**_: Authenticates a user and returns an access token and refresh token.\n2. **Refresh Token**\n\t- _**POST**_ `/api/v1/auth/jwt/refresh`\n\t- _**Description**_: Refreshes the user's JWT access token using the provided refresh token.\n3. **Logout User**\n\t- _**POST**_ `/api/v1/auth/jwt/logout`\n\t- _**Description**_: Logs out the user by blocking the refresh token.\n4. **Create User**\n\t- _**POST**_ `/api/v1/users`\n\t- _**Description**_: Creates a new user in the system.\n5. **Get Current User**\n\t- _**GET**_ `/api/v1/users/me`\n\t- _**Description**_: Retrieves the details of the currently authenticated user.\n\n## Prerequisites\n\nMake sure Docker is installed and running on your system. You can download it from [here](https://www.docker.com/get-started).\n\n## Setup\n\n1. **Clone the repository**\n\n\t```bash\n\tgit clone https://github.com/steqa/fast-jwtemplate.git project-folder\n\t```\n\n2. **Update the `.env` file**\n\n\tRename `.env.example` to `.env` and update with your configuration\n\n3. **Build and start the Docker containers**\n\n\t```bash\n\tcd project-folder\n\t```\n\t```bash\n\tdocker compose -f docker/docker-compose.yml --env-file .env up --build\n\t```\n\n## Usage\n- The API will be available at http://localhost:8000\n- You can interact with the API using Swagger UI at http://localhost:8000/docs\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteqa%2Ffastapi-jwt-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteqa%2Ffastapi-jwt-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteqa%2Ffastapi-jwt-template/lists"}