# fastapi-practices/fastapi-best-architecture

Enterprise-level backend architecture solution with fastapi、sqlalchemy,、celery、pydantic、grafana、docker...

Repository: https://github.com/fastapi-practices/fastapi-best-architecture
Canonical: https://ross.abutalabs.com/products/fastapi-best-architecture
Homepage: https://docs.fba.wu-clan.cc
Language: Python
License: MIT
License Family: permissive
Topics: fastapi, fba, celery, sqlalchemy, fastapi-template, grafana
Last push: 2026-08-23T04:16:50+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 98, longevity 88
- inputs: {"age_days": 1244, "days_push": 10, "days_rel": 17, "gap_med": 8.5, "n_releases_24m": 45}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2523, forks 379 (observed 2026-08-28T04:06:58.390494+00:00)

## What it is
An enterprise-level backend architecture template built on FastAPI, SQLAlchemy 2.0, Pydantic v2, Celery, and Docker, organized in a three-tier (api/schema/service/crud/model) structure. It provides a production-ready starting point with monitoring via Grafana and support for MySQL and PostgreSQL.

## Use cases
- start a new fastapi backend project with a clean layered architecture
- template for enterprise rest api backend in python
- fastapi project with sqlalchemy 2 and pydantic v2 setup
- background task processing with celery in fastapi
- dockerized fastapi backend with grafana monitoring
- rbac and jwt auth boilerplate for fastapi
- replace django/spring-style layered structure with fastapi

## When to choose
- you want a batteries-included, opinionated FastAPI backend skeleton
- you need a three-tier layered structure (api, service, crud, model) out of the box
- you want integrated Celery, Docker, and monitoring from day one

## When to avoid
- you prefer a minimal, unopinionated FastAPI setup you assemble yourself
- you need a microservices-based directory structure rather than a monolith
- your stack is not Python/FastAPI

## Facets
- artifact type: learning-resource
- maturity: active
- function: web-framework, orm, auth, authorization, middleware, caching, monitoring, deployment, database
- domain: web-development, backend, developer-tools, apis, self-hosted
- platform: python, self-hosted
- tags: fastapi, sqlalchemy, celery, pydantic, template, enterprise-architecture, three-tier-architecture, grafana, boilerplate, boilerplate, docker, web-server

## Member repositories
- fastapi-practices/fastapi-best-architecture (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:58.390494+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:31:48.687785+00:00, confidence not recorded.
  - readme: https://github.com/fastapi-practices/fastapi-best-architecture (fetched 2026-08-28T04:06:58.390494+00:00, sha c4db78cc7874)
- Data as of 2026-08-30T08:39:29.467469+00:00.
