gaganpreet/fastapi-starter
소개
FastAPI 기반 로우코드 스타터 템플릿입니다. SQLAlchemy 2.0(비동기), Postgres, React-Admin, pytest, Cypress를 포함합니다.
웹 및 앱 개발What you can do
- Uses best practices: Factory pattern and environment variables for configuration
- User registration, models, authentication using FastAPI Users
- Modern admin interface using React-Admin
- Github Action for building docker images and running automated tests
측정된 스타 증가
- in 24h
- +1
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalFastAPI-Starter
A FastAPI based starter that relies heavily on existing plugins/frameworks. Integrates with OpenAPI Generator for a Typescript client, FastAPI Users for authentication, async-first with SQLAlchemy 2.0.
Features
- Uses best practices: Factory pattern and environment variables for configuration
- User registration, models, authentication using FastAPI Users
- Modern admin interface using React-Admin
- Github Action for building docker images and running automated tests
- Dependabot config to keep project dependencies up to date
- Create Typescript bindings for front-end automatically from OpenAPI spec using OpenAPI-Generator, no need to write/update code when backend changes
- Async-first codebase with SQLAlchemy 2.0 and Alembic for database migrations
- pytest with example tests included
- Integration tests with Cypress
- Docker images for frontend and backend
- Includes extra Dockerfile (backend serves frontend) for straightforward production deployment
- Pre-commit hooks with Black, autoflake, isort, flake8, prettier, eslint for consistent code standards
How to use
You need Python 3 and pip installed locally. Run the cookiecutter command (at least 1.7) and you'll be asked a few prompts.
pip3 install cookiecutter
cookiecutter https://github.com/gaganpreet/fastapi-starter
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 [default value], are:
project_name: The name of the projectproject_slug: The development-friendly name of the project. By default, based on the project name.backend_port: The backend port on the localhost.front_end_port: The frontend port on the localhost.
If you want to keep up to date with upstream changes (i.e. changes in this template), then it's better to use Cruft, which is fully compatible with Cookiecutter.
pip3 install cruft
cruft create https://github.com/gaganpreet/fastapi-starter
Using cruft will generate a metadata file named .cruft.json (don't delete it). Later on you can update to the current version of this cookiecutter and import the changes to your generated project by running this command:
cruft update
Objectives
- Sane defaults with few prompts
- Secure
- KISS principle
Preview
View live demo here.


Features not included
The following features were left out in favour of simplicity:
- Celery/Flower/Redis - Not needed for simple projects, Celery can be easily replaced with background tasks.
- Traefik configuration - I prefer NGINX Proxy automation
Things to do
- Migrate to Ruff
- Email templates
Contributors ✨
Thanks goes to these wonderful people (emoji key):
nadavof 📖 |
Dustin Davis 📖 |
Hugo Tinoco 📖 💻 |
Michael Bunsen 💻 |
Alexey Sveshnikov 💻 |
Javier Aranda Santos 💻 |
|
|
This project follows the all-contributors specification. Contributions of any kind welcome!
관련 프로젝트 살펴보기
불러오는 중…