fastapi-boilerplate

An extendable async API using FastAPI, Pydantic V2, SQLAlchemy 2.0, PostgreSQL and Redis.

20 articles 1.8k View on GitHub ↗
20 articles
How to Implement Custom User Authentication Flows in FastAPI Boilerplate

Implement custom user authentication flows in FastAPI Boilerplate. Extend the JWT system with custom claims or MFA without breaking endpoints. Learn how to modify security.py for your needs.

how-to-guide
Feb 26, 2026
How to Extend FastCRUD Functionalities in FastAPI Boilerplate

Enhance FastAPI boilerplate with custom business logic by subclassing FastCRUD. Seamlessly inject type-safe operations while extending core functionalities.

how-to-guide
Feb 26, 2026
How to Run the FastAPI Boilerplate Application Using Docker Compose

Easily run the FastAPI boilerplate application with Docker Compose. Use the setup script to configure and launch PostgreSQL, Redis, and FastAPI services in one command.

how-to-guide
Feb 26, 2026
How to Implement Token Refresh Logic in FastAPI: A Complete JWT Guide

Implement token refresh logic in FastAPI using short-lived access tokens and long-lived refresh tokens. Secure your JWT authentication with this complete guide.

how-to-guide
Feb 26, 2026
How to Use OAuth2PasswordRequestForm for User Login in FastAPI

Learn to use OAuth2PasswordRequestForm in FastAPI for secure user login. Implement OAuth2 password grants with JWT tokens and HttpOnly cookies for robust authentication.

deep-dive
Feb 26, 2026
How to Set Up File and Console Logging in FastAPI

Learn to set up file and console logging in FastAPI using Python's logging module and structlog. Configure your FastAPI app's logging easily with this guide.

how-to-guide
Feb 26, 2026
How to Manage JWT Settings in FastAPI: Secret Keys and Token Expiration

Easily manage JWT settings in FastAPI secrets and token expiration using environment variables in fastapi-boilerplate. Configure your app securely and efficiently.

tutorial
Feb 26, 2026
How to Configure Redis for Cache, Queue, and Rate Limiting in FastAPI

Learn to configure Redis for cache queue and rate limiting in FastAPI using benavlabs fastapi boilerplate. Simplify your app performance with Pydantic settings and lifespan events.

how-to-guide
Feb 26, 2026
How to Add Mixins Like UUIDMixin, TimestampMixin, and SoftDeleteMixin to FastAPI Models

Easily add UUIDMixin, TimestampMixin, and SoftDeleteMixin to your FastAPI models by importing and inheriting from benavlabs/fastapi-boilerplate core models. Streamline your development.

how-to-guide
Feb 26, 2026
How to Implement Cookie-Based Refresh Tokens in FastAPI: A Complete Guide

Learn to implement cookie-based refresh tokens in FastAPI using HttpOnly, Secure cookies. This guide enables stateless JWT renewal and helps mitigate XSS attacks.

how-to-guide
Feb 26, 2026
How to Enable and Configure CORS Middleware in FastAPI Boilerplate

Learn to easily enable and configure CORS middleware in your FastAPI boilerplate project. Customize access settings via environment variables or code for robust API security.

how-to-guide
Feb 26, 2026
How to Configure NGINX and Gunicorn for Production Deployment with FastAPI

Learn to deploy FastAPI to production with NGINX & Gunicorn. Implement TLS termination and multiple Uvicorn workers using the benavlabs fastapi-boilerplate containerized setup for optimal performance.

how-to-guide
Feb 26, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →