]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
πŸ“ Update `project-generation.md` (#11326)
authorAlejandra <90076947+alejsdev@users.noreply.github.com>
Thu, 21 Mar 2024 21:12:21 +0000 (16:12 -0500)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 21:12:21 +0000 (16:12 -0500)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SebastiΓ‘n RamΓ­rez <tiangolo@gmail.com>
docs/en/docs/project-generation.md

index 8ba34fa11200d2bb6b494829d309912c537a8fc8..d142862ee8317e6a28f0b6da4c75d4414996be8b 100644 (file)
@@ -1,84 +1,27 @@
-# Project Generation - Template
-
-You can use a project generator to get started, as it includes a lot of the initial set up, security, database and some API endpoints already done for you.
-
-A project generator will always have a very opinionated setup that you should update and adapt for your own needs, but it might be a good starting point for your project.
-
-## Full Stack FastAPI PostgreSQL
-
-GitHub: <a href="https://github.com/tiangolo/full-stack-fastapi-postgresql" class="external-link" target="_blank">https://github.com/tiangolo/full-stack-fastapi-postgresql</a>
-
-### Full Stack FastAPI PostgreSQL - Features
-
-* Full **Docker** integration (Docker based).
-* Docker Swarm Mode deployment.
-* **Docker Compose** integration and optimization for local development.
-* **Production ready** Python web server using Uvicorn and Gunicorn.
-* Python <a href="https://github.com/tiangolo/fastapi" class="external-link" target="_blank">**FastAPI**</a> backend:
-    * **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic).
-    * **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
-    * **Easy**: Designed to be easy to use and learn. Less time reading docs.
-    * **Short**: Minimize code duplication. Multiple features from each parameter declaration.
-    * **Robust**: Get production-ready code. With automatic interactive documentation.
-    * **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
-    * <a href="https://fastapi.tiangolo.com/features/" class="external-link" target="_blank">**Many other features**</a> including automatic validation, serialization, interactive documentation, authentication with OAuth2 JWT tokens, etc.
-* **Secure password** hashing by default.
-* **JWT token** authentication.
-* **SQLAlchemy** models (independent of Flask extensions, so they can be used with Celery workers directly).
-* Basic starting models for users (modify and remove as you need).
-* **Alembic** migrations.
-* **CORS** (Cross Origin Resource Sharing).
-* **Celery** worker that can import and use models and code from the rest of the backend selectively.
-* REST backend tests based on **Pytest**, integrated with Docker, so you can test the full API interaction, independent on the database. As it runs in Docker, it can build a new data store from scratch each time (so you can use ElasticSearch, MongoDB, CouchDB, or whatever you want, and just test that the API works).
-* Easy Python integration with **Jupyter Kernels** for remote or in-Docker development with extensions like Atom Hydrogen or Visual Studio Code Jupyter.
-* **Vue** frontend:
-    * Generated with Vue CLI.
-    * **JWT Authentication** handling.
-    * Login view.
-    * After login, main dashboard view.
-    * Main dashboard with user creation and edition.
-    * Self user edition.
-    * **Vuex**.
-    * **Vue-router**.
-    * **Vuetify** for beautiful material design components.
-    * **TypeScript**.
-    * Docker server based on **Nginx** (configured to play nicely with Vue-router).
-    * Docker multi-stage building, so you don't need to save or commit compiled code.
-    * Frontend tests ran at build time (can be disabled too).
-    * Made as modular as possible, so it works out of the box, but you can re-generate with Vue CLI or create it as you need, and re-use what you want.
-* **PGAdmin** for PostgreSQL database, you can modify it to use PHPMyAdmin and MySQL easily.
-* **Flower** for Celery jobs monitoring.
-* Load balancing between frontend and backend with **Traefik**, so you can have both under the same domain, separated by path, but served by different containers.
-* Traefik integration, including Let's Encrypt **HTTPS** certificates automatic generation.
-* GitLab **CI** (continuous integration), including frontend and backend testing.
-
-## Full Stack FastAPI Couchbase
-
-GitHub: <a href="https://github.com/tiangolo/full-stack-fastapi-couchbase" class="external-link" target="_blank">https://github.com/tiangolo/full-stack-fastapi-couchbase</a>
-
-⚠️ **WARNING** βš οΈ
-
-If you are starting a new project from scratch, check the alternatives here.
-
-For example, the project generator <a href="https://github.com/tiangolo/full-stack-fastapi-postgresql" class="external-link" target="_blank">Full Stack FastAPI PostgreSQL</a> might be a better alternative, as it is actively maintained and used. And it includes all the new features and improvements.
-
-You are still free to use the Couchbase-based generator if you want to, it should probably still work fine, and if you already have a project generated with it that's fine as well (and you probably already updated it to suit your needs).
-
-You can read more about it in the docs for the repo.
-
-## Full Stack FastAPI MongoDB
-
-...might come later, depending on my time availability and other factors. πŸ˜… πŸŽ‰
-
-## Machine Learning models with spaCy and FastAPI
-
-GitHub: <a href="https://github.com/microsoft/cookiecutter-spacy-fastapi" class="external-link" target="_blank">https://github.com/microsoft/cookiecutter-spacy-fastapi</a>
-
-### Machine Learning models with spaCy and FastAPI - Features
-
-* **spaCy** NER model integration.
-* **Azure Cognitive Search** request format built in.
-* **Production ready** Python web server using Uvicorn and Gunicorn.
-* **Azure DevOps** Kubernetes (AKS) CI/CD deployment built in.
-* **Multilingual** Easily choose one of spaCy's built in languages during project setup.
-* **Easily extensible** to other model frameworks (Pytorch, Tensorflow), not just spaCy.
+# Full Stack FastAPI Template
+
+Templates, while typically come with a specific setup, are designed to be flexible and customizable. This allows you to modify and adapt them to your project's requirements, making them an excellent starting point. πŸ
+
+You can use this template to get started, as it includes a lot of the initial set up, security, database and some API endpoints already done for you.
+
+GitHub Repository: <a href="https://github.com/tiangolo/full-stack-fastapi-template" class="external-link" target="_blank">Full Stack FastAPI Template</a>
+
+## Full Stack FastAPI Template - Technology Stack and Features
+
+- βš‘ [**FastAPI**](https://fastapi.tiangolo.com) for the Python backend API.
+    - πŸ§° [SQLModel](https://sqlmodel.tiangolo.com) for the Python SQL database interactions (ORM).
+    - πŸ” [Pydantic](https://docs.pydantic.dev), used by FastAPI, for the data validation and settings management.
+    - πŸ’Ύ [PostgreSQL](https://www.postgresql.org) as the SQL database.
+- πŸš€ [React](https://react.dev) for the frontend.
+    - πŸ’ƒ Using TypeScript, hooks, Vite, and other parts of a modern frontend stack.
+    - πŸŽ¨ [Chakra UI](https://chakra-ui.com) for the frontend components.
+    - πŸ€– An automatically generated frontend client.
+    - πŸ¦‡ Dark mode support.
+- πŸ‹ [Docker Compose](https://www.docker.com) for development and production.
+- πŸ”’ Secure password hashing by default.
+- πŸ”‘ JWT token authentication.
+- πŸ“« Email based password recovery.
+- βœ… Tests with [Pytest](https://pytest.org).
+- πŸ“ž [Traefik](https://traefik.io) as a reverse proxy / load balancer.
+- πŸš’ Deployment instructions using Docker Compose, including how to set up a frontend Traefik proxy to handle automatic HTTPS certificates.
+- πŸ­ CI (continuous integration) and CD (continuous deployment) based on GitHub Actions.