Skip to content

Commit 4cbb91f

Browse files
authored
sync (#80)
1 parent 727ff9c commit 4cbb91f

55 files changed

Lines changed: 7914 additions & 2829 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ venv/
1010
.claude/
1111
.serena/
1212
.agents/
13-
.logs/
13+
logs/
14+
.superpowers/
15+
superpowers/

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ repos:
1111
- id: check-toml
1212

1313
- repo: https://github.com/tombi-toml/tombi-pre-commit
14-
rev: v0.9.2
14+
rev: v0.9.25
1515
hooks:
1616
- id: tombi-lint
1717
args: ["--offline"]
1818
- id: tombi-format
1919
args: ["--offline"]
2020

2121
- repo: https://github.com/charliermarsh/ruff-pre-commit
22-
rev: v0.15.5
22+
rev: v0.15.12
2323
hooks:
2424
- id: ruff-check
2525
args:
@@ -29,7 +29,7 @@ repos:
2929
- id: ruff-format
3030

3131
- repo: https://github.com/astral-sh/uv-pre-commit
32-
rev: 0.10.9
32+
rev: 0.11.8
3333
hooks:
3434
- id: uv-lock
3535
- id: uv-export

.schemas/plugin.schema.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"plugin": {
1212
"type": "object",
1313
"description": "Plugin metadata",
14-
"required": ["summary", "version", "description", "author"],
14+
"required": ["summary", "version", "description", "author", "tags", "database"],
1515
"additionalProperties": false,
1616
"x-tombi-table-keys-order": "schema",
1717
"properties": {
@@ -44,7 +44,8 @@
4444
},
4545
"tags": {
4646
"type": "array",
47-
"description": "Plugin tags for categorization (will be required in next major version)",
47+
"minItems": 1,
48+
"description": "Plugin tags for categorization",
4849
"items": {
4950
"type": "string",
5051
"enum": ["ai", "mcp", "agent", "auth", "storage", "notification", "task", "payment", "other"]
@@ -53,12 +54,22 @@
5354
},
5455
"database": {
5556
"type": "array",
56-
"description": "Supported databases (will be required in next major version)",
57+
"minItems": 1,
58+
"description": "Supported databases",
5759
"items": {
5860
"type": "string",
5961
"enum": ["mysql", "postgresql"]
6062
},
6163
"x-tombi-array-values-order": "ascending"
64+
},
65+
"depends_on": {
66+
"type": "array",
67+
"description": "List of plugin names this plugin depends on (used for startup order)",
68+
"items": {
69+
"type": "string",
70+
"minLength": 1
71+
},
72+
"x-tombi-array-values-order": "ascending"
6273
}
6374
}
6475
},

CHANGELOG.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,107 @@
1+
<a id="v1.13.4"></a>
2+
# [v1.13.4](https://github.com/fastapi-practices/fastapi-best-architecture/releases/tag/v1.13.4) - 2026-04-28
3+
4+
## What's Changed
5+
* Update changelog for v1.13.3 by [@wu-clan](https://github.com/wu-clan) in [#1149](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1149)
6+
* Update the architecture description in README by [@wu-clan](https://github.com/wu-clan) in [#1150](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1150)
7+
* Fix app pytest client fixture scope by [@IAseven](https://github.com/IAseven) in [#1152](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1152)
8+
* Remove cleanup operations after plugin install by [@wu-clan](https://github.com/wu-clan) in [#1154](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1154)
9+
* Fix mysql enum data type mismatch by [@wu-clan](https://github.com/wu-clan) in [#1155](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1155)
10+
* Bump dependencies and pre-commits by [@wu-clan](https://github.com/wu-clan) in [#1156](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1156)
11+
* Add plugin depends on and lifecycle ordering by [@AH-Toby](https://github.com/AH-Toby) in [#1153](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1153)
12+
* Update plugin README content format by [@wu-clan](https://github.com/wu-clan) in [#1158](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1158)
13+
* Update Grafana dashboard and datasource config by [@wu-clan](https://github.com/wu-clan) in [#1159](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1159)
14+
* Add database and queue observability by [@wu-clan](https://github.com/wu-clan) in [#1160](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1160)
15+
* Fix Grafana tempo and observability config by [@wu-clan](https://github.com/wu-clan) in [#1161](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1161)
16+
* Add the snowflake ID enabled config by [@wu-clan](https://github.com/wu-clan) in [#1162](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1162)
17+
* Fix the add plugin CLI command config by [@wu-clan](https://github.com/wu-clan) in [#1163](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1163)
18+
* Optimize the core code ordering of plugins by [@wu-clan](https://github.com/wu-clan) in [#1164](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1164)
19+
* Add uninstall plugin operation checks by [@wu-clan](https://github.com/wu-clan) in [#1165](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1165)
20+
* Fix multi level cache storage logic by [@wu-clan](https://github.com/wu-clan) in [#1166](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1166)
21+
* Fix typing warnings for return methods by [@wu-clan](https://github.com/wu-clan) in [#1167](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1167)
22+
* Bump dependencies and pre-commits by [@wu-clan](https://github.com/wu-clan) in [#1168](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1168)
23+
* Update the version number to 1.13.4 by [@wu-clan](https://github.com/wu-clan) in [#1169](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1169)
24+
25+
## New Contributors
26+
* [@AH-Toby](https://github.com/AH-Toby) made their first contribution in [#1153](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1153)
27+
28+
**Full Changelog**: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.3...v1.13.4
29+
30+
## Contributors
31+
32+
<a href="https://github.com/AH-Toby"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2FAH-Toby.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@AH-Toby"></a>
33+
<a href="https://github.com/IAseven"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2FIAseven.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@IAseven"></a>
34+
<a href="https://github.com/wu-clan"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2Fwu-clan.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@wu-clan"></a>
35+
36+
[Changes][v1.13.4]
37+
38+
39+
<a id="v1.13.3"></a>
40+
# [v1.13.3](https://github.com/fastapi-practices/fastapi-best-architecture/releases/tag/v1.13.3) - 2026-04-08
41+
42+
## What's Changed
43+
* Update changelog for v1.13.2 by [@wu-clan](https://github.com/wu-clan) in [#1124](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1124)
44+
* Fix the logic related to the status field by [@wu-clan](https://github.com/wu-clan) in [#1125](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1125)
45+
* Fix code generation menu sql scripts by [@wu-clan](https://github.com/wu-clan) in [#1127](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1127)
46+
* Update plugins and monitoring permissions by [@wu-clan](https://github.com/wu-clan) in [#1126](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1126)
47+
* Add custom cursor pagination support by [@wu-clan](https://github.com/wu-clan) in [#1128](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1128)
48+
* Update the plugin requirements check by [@wu-clan](https://github.com/wu-clan) in [#1129](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1129)
49+
* Update plugin config and dependency cache by [@wu-clan](https://github.com/wu-clan) in [#1130](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1130)
50+
* Fix plugin dependencies for redis instance by [@wu-clan](https://github.com/wu-clan) in [#1133](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1133)
51+
* Fix current superuser permission validation by [@wu-clan](https://github.com/wu-clan) in [#1138](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1138)
52+
* Fix the return of registered task results by [@wu-clan](https://github.com/wu-clan) in [#1139](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1139)
53+
* Refactor plugin dependency cache and check by [@wu-clan](https://github.com/wu-clan) in [#1140](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1140)
54+
* Add the installation frontend plugin CLI by [@wu-clan](https://github.com/wu-clan) in [#1141](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1141)
55+
* Update custom reload filter call rules by [@wu-clan](https://github.com/wu-clan) in [#1144](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1144)
56+
* Fix custom email model return type by [@wu-clan](https://github.com/wu-clan) in [#1145](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1145)
57+
* Add superpowers to gitignore file by [@wu-clan](https://github.com/wu-clan) in [#1146](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1146)
58+
* Add plugin system hook function mechanism by [@yuWorm](https://github.com/yuWorm) in [#1142](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1142)
59+
* Bump dependencies and pre-commits by [@wu-clan](https://github.com/wu-clan) in [#1147](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1147)
60+
* Update the version number to 1.13.3 by [@wu-clan](https://github.com/wu-clan) in [#1148](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1148)
61+
62+
## New Contributors
63+
* [@yuWorm](https://github.com/yuWorm) made their first contribution in [#1142](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1142)
64+
65+
**Full Changelog**: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.2...v1.13.3
66+
67+
## Contributors
68+
69+
<a href="https://github.com/wu-clan"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2Fwu-clan.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@wu-clan"></a>
70+
<a href="https://github.com/yuWorm"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2FyuWorm.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@yuWorm"></a>
71+
72+
[Changes][v1.13.3]
73+
74+
75+
<a id="v1.13.2"></a>
76+
# [v1.13.2](https://github.com/fastapi-practices/fastapi-best-architecture/releases/tag/v1.13.2) - 2026-03-23
77+
78+
## What's Changed
79+
* Update changelog for v1.13.1 by [@wu-clan](https://github.com/wu-clan) in [#1103](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1103)
80+
* Fix log type check and default formatter by [@wu-clan](https://github.com/wu-clan) in [#1104](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1104)
81+
* Replace the uvicorn runner with granian by [@wu-clan](https://github.com/wu-clan) in [#1105](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1105)
82+
* Update user id context setting location by [@wu-clan](https://github.com/wu-clan) in [#1110](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1110)
83+
* Update refresh token geo-checksum response by [@wu-clan](https://github.com/wu-clan) in [#1111](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1111)
84+
* Update plugin dynamic import check by [@wu-clan](https://github.com/wu-clan) in [#1112](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1112)
85+
* Fix rbac permission checking logic by [@wu-clan](https://github.com/wu-clan) in [#1113](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1113)
86+
* Fix user menu permission code update by [@wu-clan](https://github.com/wu-clan) in [#1114](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1114)
87+
* Fix typos in code and comments by [@wu-clan](https://github.com/wu-clan) in [#1115](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1115)
88+
* Fix online api user id acquisition by [@wu-clan](https://github.com/wu-clan) in [#1116](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1116)
89+
* Fix plugin status change cache missing by [@wu-clan](https://github.com/wu-clan) in [#1118](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1118)
90+
* Fix zip plugin installation and unzip by [@wu-clan](https://github.com/wu-clan) in [#1120](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1120)
91+
* Update plugin config and sql validate by [@wu-clan](https://github.com/wu-clan) in [#1122](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1122)
92+
* Add sql scripts for OAuth2 plugin by [@wu-clan](https://github.com/wu-clan) in [#1121](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1121)
93+
* Update the version number to 1.13.2 by [@wu-clan](https://github.com/wu-clan) in [#1123](https://github.com/fastapi-practices/fastapi-best-architecture/pull/1123)
94+
95+
96+
**Full Changelog**: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.1...v1.13.2
97+
98+
## Contributors
99+
100+
<a href="https://github.com/wu-clan"><img src="https://wsrv.nl/?url=https%3A%2F%2Fgithub.com%2Fwu-clan.png&w=128&h=128&fit=cover&mask=circle" width="64" height="64" alt="@wu-clan"></a>
101+
102+
[Changes][v1.13.2]
103+
104+
1105
<a id="v1.13.1"></a>
2106
# [v1.13.1](https://github.com/fastapi-practices/fastapi-best-architecture/releases/tag/v1.13.1) - 2026-03-08
3107

@@ -1407,6 +1511,9 @@
14071511
[Changes][v1.0.0]
14081512

14091513

1514+
[v1.13.4]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.3...v1.13.4
1515+
[v1.13.3]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.2...v1.13.3
1516+
[v1.13.2]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.1...v1.13.2
14101517
[v1.13.1]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.13.0...v1.13.1
14111518
[v1.13.0]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.12.3...v1.13.0
14121519
[v1.12.3]: https://github.com/fastapi-practices/fastapi-best-architecture/compare/v1.12.2...v1.12.3

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2323
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
2424
uv sync --locked --no-default-groups --group server --no-install-project
2525

26+
# Preinstall plugin dependencies
27+
RUN --mount=type=cache,target=/root/.cache/uv \
28+
python -c "from backend.plugin.requirements import install_requirements; install_requirements(None)"
29+
2630
# === Runtime server image ===
2731
FROM python:3.10-slim-bookworm
2832

README.md

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,71 @@
1-
# FastAPI Best Architecture Slim
1+
<div align="center">
22

3-
A simplified version focused on basic architecture for API development
3+
<img alt="The logo includes the abstract combination of the three letters FBA, forming a lightning bolt that seems to spread out from the ground" width="320" src="https://wu-clan.github.io/picx-images-hosting/logo/fba.png">
4+
5+
# FastAPI Best Architecture
6+
7+
Enterprise-level backend architecture solution
48

59
English | [简体中文](./README.zh-CN.md)
610

7-
## Full Version
11+
[![GitHub](https://img.shields.io/github/license/fastapi-practices/fastapi_best_architecture)](https://github.com/fastapi-practices/fastapi_best_architecture/blob/master/LICENSE)
12+
[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
13+
![MySQL](https://img.shields.io/badge/MySQL-8.0%2B-%2300758f)
14+
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16.0%2B-%23336791)
15+
![SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-2.0-%23778877)
16+
[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
17+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
18+
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
19+
![Docker](https://img.shields.io/badge/Docker-%232496ED?logo=docker&logoColor=white)
20+
[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.com/invite/yNN3wTbVAC)
21+
![Discord](https://img.shields.io/discord/1185035164577972344)
22+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fastapi-practices/fastapi_best_architecture)
23+
24+
</div>
25+
26+
## Three-tier architecture
27+
28+
The MVC architecture is common in Python Web as a general design pattern, but the three-tier architecture is more
29+
fascinating
30+
31+
However, please note that we do not have a traditional multi-app (microservices) directory structure (django,
32+
springBoot...). ), but a self-righteous directory structure that you can give it any twist if you don't like this model!
33+
34+
| workflow | java | fastapi_best_architecture |
35+
|----------------|----------------|---------------------------|
36+
| view | controller | api |
37+
| data transmit | dto | schema |
38+
| business logic | service + impl | service |
39+
| data access | dao / mapper | crud |
40+
| model | model / entity | model |
41+
42+
## Help
43+
44+
For more details, please check
45+
the [official documentation](https://fastapi-practices.github.io/fastapi_best_architecture_docs/)
46+
47+
## Contributors
48+
49+
<a href="https://github.com/fastapi-practices/fastapi_best_architecture/graphs/contributors">
50+
<img src="https://contrib.rocks/image?repo=fastapi-practices/fastapi_best_architecture"/>
51+
</a>
52+
53+
## Special thanks
54+
55+
- [FastAPI](https://fastapi.tiangolo.com/)
56+
- [Pydantic](https://docs.pydantic.dev/latest/)
57+
- [SQLAlchemy](https://docs.sqlalchemy.org/en/20/)
58+
- [Casbin](https://casbin.org/zh/)
59+
- [Ruff](https://beta.ruff.rs/docs/)
60+
- ...
61+
62+
## Interactivity
63+
64+
[Discord](https://wu-clan.github.io/homepage/)
65+
66+
## License
867

9-
For the complete version with all features (Celery, SocketIO, etc.), visit:
68+
This project is licensed by the terms of
69+
the [MIT](https://github.com/fastapi-practices/fastapi_best_architecture/blob/master/LICENSE) license
1070

11-
- **[Full Project](https://github.com/fastapi-practices/fastapi_best_architecture)**
12-
- [Official Documentation](https://fastapi-practices.github.io/fastapi_best_architecture_docs/)
71+
[![Stargazers over time](https://starchart.cc/fastapi-practices/fastapi_best_architecture.svg?variant=adaptive)](https://starchart.cc/fastapi-practices/fastapi_best_architecture)

0 commit comments

Comments
 (0)