More Premium Hugo Themes Premium React Themes

Fastapi Starter

A FastAPI based low code starter/boilerplate: SQLAlchemy 2.0 (async), Postgres, React-Admin, pytest and cypress

Fastapi Starter

A FastAPI based low code starter/boilerplate: SQLAlchemy 2.0 (async), Postgres, React-Admin, pytest and cypress

Author Avatar Theme by gaganpreet
Github Stars Github Stars: 491
Last Commit Last Commit: Mar 16, 2025 -
First Commit Created: Jan 15, 2024 -
default image

Overview:

FastAPI-Starter is a FastAPI based starter project that makes use of existing plugins and frameworks. It includes several key features such as user registration, authentication, a modern admin interface, automated testing, and more. The project follows best practices and incorporates technologies like React-Admin, Docker, and OpenAPI Generator.

Features:

  • Uses best practices: Follows the factory pattern and utilizes environment variables for configuration.
  • User registration, models, authentication: Provides functionality for user registration and authentication using FastAPI Users.
  • Modern admin interface: Includes a modern admin interface using React-Admin.
  • Github Action for building docker images and running automated tests: Integrates with Github Actions to automatically build docker images and run automated tests.
  • Dependabot config: Includes a Dependabot configuration to keep project dependencies up to date.
  • Create Typescript bindings for front-end: Automatically generates Typescript bindings for the front-end using OpenAPI-Generator, eliminating the need to manually write or update code when the backend changes.
  • Async-first codebase with SQLAlchemy 2.0: Implements an async-first codebase using SQLAlchemy 2.0 for database operations.
  • pytest with example tests included: Includes example tests using pytest.
  • Integration tests with Cypress: Includes integration tests using Cypress.
  • Docker images for frontend and backend: Provides Docker images for both the frontend and backend.
  • Pre-commit hooks with code standards: Includes pre-commit hooks with Black, autoflake, isort, flake8, prettier, and eslint for ensuring consistent code standards.

Installation:

To use FastAPI-Starter, you will need Python 3 and pip installed locally. Follow the steps below to install and set up the project:

  1. Install cookiecutter (at least version 1.7) if you haven’t already:
pip install cookiecutter
  1. Run the following command and answer the prompts:
cookiecutter https://github.com/[repository]

Replace [repository] with the repository URL of FastAPI-Starter.

  1. During the cookiecutter process, you will be asked for input variables such as the project name, project slug, backend port, and frontend port. Have this information ready before running the command.

  2. Once the cookiecutter process is complete, you will have a generated project based on the FastAPI-Starter template.

For keeping up to date with upstream changes, it is recommended to use Cruft, which is fully compatible with Cookiecutter. This will allow you to update to the current version of the template and import the changes to your generated project.

Summary:

FastAPI-Starter is a powerful FastAPI based starter project that includes several key features for building modern web applications. It follows best practices, incorporates existing plugins and frameworks, and provides an easy-to-use structure for development. With features like user authentication, a modern admin interface, automated testing, and Docker deployment, FastAPI-Starter is a comprehensive solution for starting new projects quickly and efficiently.