Thank you for your interest in contributing to the Full Stack FastAPI Template! 🙇
## Discussions First
For **big changes** (new features, architectural changes, significant refactoring), please start by opening a [GitHub Discussion](https://github.com/fastapi/full-stack-fastapi-template/discussions) first. This allows the community and maintainers to provide feedback on the approach before you invest significant time in implementation.
For small, straightforward changes, you can go directly to a Pull Request without starting a discussion first. This includes:
- Typos and grammatical fixes - Small reproducible bug fixes - Fixing lint warnings or type errors - Minor code improvements (e.g., removing unused code)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
部署
copier
copier.yml
简单介绍一下这个python库:
It will copy all the files, ask you configuration questions, and update the .env files with your answers.
然后只要这么用就可以生成一个新项目了:
secret_key: type:str help:| 'The secret key for the project, used for security, stored in .env, you can generate one with: python -c "import secrets; print(secrets.token_urlsafe(32))"' default:changethis
postgres_password: type:str help:| 'The password for the PostgreSQL database, stored in .env, you can generate one with: python -c "import secrets; print(secrets.token_urlsafe(32))"' default:changethis
# Place executables in the environment at the front of the path # Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment ENV PATH="/app/.venv/bin:$PATH"
# Domain # This would be set to the production domain with an env var on deployment # used by Traefik to transmit traffic and aqcuire TLS certificates DOMAIN=localhost # To test the local Traefik config # DOMAIN=localhost.tiangolo.com
# Used by the backend to generate links in emails to the frontend FRONTEND_HOST=http://localhost:5173 # In staging and production, set this env var to the frontend host, e.g. # FRONTEND_HOST=https://dashboard.example.com
# Environment: local, staging, production ENVIRONMENT=local
[alembic] # path to migration scripts script_location = app/alembic
# template used to generate migration files # file_template = %%(rev)s_%%(slug)s
# timezone to use when rendering the date # within the migration file as well as the filename. # string value is passed to dateutil.tz.gettz() # leave blank for localtime # timezone =
# max length of characters to apply to the # "slug" field #truncate_slug_length = 40
# set to 'true' to run the environment during # the 'revision' command, regardless of autogenerate # revision_environment = false
# set to 'true' to allow .pyc and .pyo files without # a source .py file to be detected as revisions in the # versions/ directory # sourceless = false
# version location specification; this defaults # to alembic/versions. When using multiple version # directories, initial revisions must be specified with --version-path # version_locations = %(here)s/bar %(here)s/bat alembic/versions
# the output encoding used when revision files # are written from script.py.mako # output_encoding = utf-8
# Add a CMake option that enables building your plugin with tests. # You don't want your released plugin binaries to contain tests, # so make that default to 'NO'. # Enable tests by passing -DWITH_TESTS=ON to CMake. option(WITH_TESTS "Builds with tests" NO)
if(WITH_TESTS) # Look for QtTest find_package(Qt6 REQUIRED COMPONENTS Test)
# Tell CMake functions like add_qtc_plugin about the QtTest component. set(IMPLICIT_DEPENDS Qt::Test)
# Enable ctest for auto tests. enable_testing() endif()