pyb4430 / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
MIT License
125 stars 31 forks source link

Full Stack FastAPI and PostgreSQL - Base Project Generator

Build Status

Generate a backend and frontend stack using Python, including interactive API documentation.

This is a fork of tiangolo/full-stack-fastapi-postgresql, which hasn't seen an update in a while

Interactive API documentation

API docs

Alternative API documentation

API docs

Dashboard Login

API docs

Dashboard - Create User

API docs

Features

How to use it

Go to the directory where you want to create your project and run:

pip install cookiecutter
cookiecutter https://github.com/pyb4430/full-stack-fastapi-postgresql

Generate passwords

You will be asked to provide passwords and secret keys for several components. Open another terminal and run:

openssl rand -hex 32
# Outputs something like: 99d3b1f01aa639e4a76f4fc281fc834747a543720ba4c8a8648ba755aef9be7f

Copy the contents and use that as password / secret key. And run that again to generate another secure key.

Input variables

The generator (cookiecutter) will ask you for some data, you might want to have at hand before generating the project.

The input variables, with their default values (some auto generated) are:

How to deploy

This stack can be adjusted and used with several deployment options that are compatible with Docker Compose, but it is designed to be used in a cluster controlled with pure Docker in Swarm Mode with a Traefik main load balancer proxy handling automatic HTTPS certificates, using the ideas from DockerSwarm.rocks.

Please refer to DockerSwarm.rocks to see how to deploy such a cluster in 20 minutes.

More details

After using this generator, your new project (the directory created) will contain an extensive README.md with instructions for development, deployment, etc. You can pre-read the project README.md template here too.

Sibling project generators

Release Notes

0.6.0

Below changes are from tiangolo/full-stack-fastapi-postgresql

0.5.0

0.4.0

0.3.0

0.2.2

0.2.1

0.2.0

PR #2:

0.1.2

0.1.1

Several bug fixes since initial publication, including:

License

This project is licensed under the terms of the MIT license.