whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link
celery cookiecutter docker fastapi magic-link-authentication neo4j nuxt3 postgresql python sqlalchemy totp

Full Stack FastAPI, PostgreSQL, Neo4j & Nuxt 3 Base Project Generator

Build Status

Accelerate your next web development project with this FastAPI/NuxtJS base project generator.

This project is for developers looking to build and maintain full-feature progressive web applications using Python on the backend / Typescript on the frontend, and want the complex-but-routine aspects of auth 'n auth, and component and deployment configuration, taken care of, including interactive API documentation.

This project is a fork of Sebastián Ramírez's Full Stack FastAPI and PostgreSQL Base Project Generator. FastAPI is updated to version 0.109 (April 2024), SQLAlchemy to version 2.0.29 (March 2024), and the frontend to Nuxt 3.11 (April 2024).

Key features

This FastAPI, PostgreSQL, Neo4j & Nuxt 3 repo will generate a complete web application stack as a foundation for your project development.

Screenshots

App landing page

Landing page

Dashboard Login

Magic-link login

Dashboard User Management

Moderator user management

Interactive API documentation

Interactive API docs

Enabling two-factor security (TOTP)

Enabling TOTP

How to use it

Fork differences

The original objective of this fork was to maintain parity with the Full Stack FastAPI and PostgreSQL Base Project Generator but update it to bring it up to current stack versions, fixes, and with a complete auth 'n auth system.

With the most recent updates to the base stack, Sebastián has made some fairly dramatic changes and these two stacks are no longer compatible. This table presents a summary of the major differences:

This base stack Tiangolo base stack
SQLAlchemy & Pydantic SqlModel
Postgresql 15 & PGAdmin Postgresql 12 & Adminer
Celery & RabbitMQ task queue -
NuxtJS frontend React frontend

I use this stack to produce some fairly complex web-based applications and I need to get to the full APIs for SQLAlchemy and Pydantic, and SqlModel doesn't offer me that. I also need to run distributed asyncronous tasks, so Celery is important. Finally, I prefer Nuxt.

This stack also has a much more sophisticated and feature-complete auth 'n auth system which is a requirement for any web app.

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.

This current release (May 2024) is for FastAPI version 0.109 introduces support for Pydantic 2.7. Since this is intended as a base stack on which you will build complex applications, there is no intention of backwards compatability between releases, and the objective is to ensure that each release has the latest long-term-support versions of the core libraries so that you can rely on your application core for as long as possible.

To align with Inboard, Poetry has been deprecated in favour of Hatch.

You will also find an initial implementation of internationalisation using @nuxt/i18n. The Vite PWA plugin is also included, along with a Node CLI for generating all necessary app icons. You will see links and notes to this in the nuxt.config.ts file.

Help needed

The tests are broken and it would be great if someone could take that on. Other potential roadmap items:

Release Notes

See notes and releases.

0.9.0

Updates to backend:

Updates to frontend:

The Pydantic change is dramatic, so please revise their migration guide. Similarly, nuxt/i18n has some major quality of life improvements.

0.8.2

Fixing #39, thanks to @a-vorobyoff:

0.8.1

0.8.0

0.7.4

Historic changes from original

License

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