Fastapi React

screenshot of Fastapi React
react

Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker

Overview:

FastAPI + React is a cookiecutter template that allows developers to easily bootstrap a project using a modern stack. The template includes features such as FastAPI (Python 3.8), JWT authentication using OAuth2 "password flow" and PyJWT, React with Typescript, react-router v5 for routing, PostgreSQL for the database, SqlAlchemy for ORM, Celery for background tasks, Redis as a message broker, and more. It also includes utilities for authentication, deployment with Docker Compose and Nginx as a reverse proxy, testing with Pytest, and an admin dashboard using MaterialUI and react-admin.

Features:

  • FastAPI (Python 3.8)
  • JWT authentication using OAuth2 "password flow" and PyJWT
  • React (with Typescript)
  • react-router v5 for routing
  • Utility functions and higher-order components for handling authentication
  • PostgreSQL for the database
  • SqlAlchemy for ORM
  • Celery for background tasks and Redis as a message broker
  • Includes Flower for task monitoring
  • Alembic for database migrations
  • Pytest for backend tests
  • Includes test database, transaction rollbacks after each test, and reusable Pytest fixtures
  • Prettier/ESLint (Airbnb style guide)
  • Docker Compose for development
  • Nginx as a reverse proxy to allow backend/frontend on the same port
  • MaterialUI using recommended CSS-in-JS styling
  • react-admin for the admin dashboard
  • Using the same token-based authentication as FastAPI backend (JWT)

Summary:

FastAPI + React is a cookiecutter template that provides a streamlined and comprehensive project structure for building web applications using FastAPI and React. It includes various features such as authentication, database management, testing, and deployment using modern tools and technologies. By using this template, developers can save time on setting up the project's infrastructure and focus more on building the core functionality of their application.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

fullstack
Fullstack

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.