Overview
About 524 wordsAbout 2 min
Enterprise-grade backend architecture solution built with FastAPI
Three-layer Architecture
MVC is a common design pattern in Python web projects. fba uses a three-layer architecture that is closer to backend engineering practice, splitting API, business, and data-access boundaries for easier collaboration and maintenance.
Warning
Please note
fba does not use a traditional multi-app or microservice directory layout. Directories follow FastAPI backend engineering practice — see Project Structure.
If this structure does not fit your team, you can adjust it while keeping the layer boundaries.
| Module | Java | fastapi-best-architecture |
|---|---|---|
| View | controller | api |
| Data transfer | dto | schema |
| Business logic | service + impl | service |
| Data access | dao / mapper | crud |
| Model | entity | model |
Features
Built-in Capabilities
Project Structure
backend# Backend
alembic# Database migrations
…
app# Application
admin# System admin
api# API
…
crud# CRUD
…
model# Models
__init__.py# Import all model classes here
…
schema# Data transfer
…
service# Services
…
tests# Unit tests
…
task# Tasks
…
…
common# Shared resources
…
core# Core config
…
database# Database connections
…
locale# i18n language packs
…
log# Logs
…
middleware# Middleware
…
plugin# Plugins
code_generator# Code generation
…
…
scripts# Scripts
…
sql# Init SQL files
…
static# Static files
…
tests# Global test helpers
…
utils# Utilities
…
deploy# Deployment config
…
…
Contributors
License
This project is licensed under the MIT License.
Special Thanks
- downdawn for actively driving the creation of this project
- 无名 for the carefully designed LOGO (an abstract combination of the letters fba, forming a lightning-like mark projected from the ground)
- vuepress-theme-plume for powering the official docs
- Open-source pioneers such as FastAPI, SQLAlchemy, and Pydantic
- All sponsors (across every channel) for their strong support
- All contributors, participants, and users of this project

