File tree Expand file tree Collapse file tree 9 files changed +134
-45
lines changed Expand file tree Collapse file tree 9 files changed +134
-45
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,31 @@ import {defineNavbarConfig} from "vuepress-theme-plume";
2
2
3
3
export const myNavbar = defineNavbarConfig ( [
4
4
{
5
- text : 'UI 演示 ' ,
6
- items : [
5
+ text : 'UI 效果 ' ,
6
+ items :[
7
7
{
8
- text : 'Arco Design Vue 实验性实施' ,
9
- link : 'https://github.com/fastapi-practices/fastapi_best_architecture_ui'
8
+ text : 'Git 仓库' ,
9
+ icon : 'mdi:git' ,
10
+ items : [
11
+ {
12
+ text : 'Arco Design Vue 实验性实施' ,
13
+ link : 'https://github.com/fastapi-practices/fastapi_best_architecture_ui'
14
+ } ,
15
+ {
16
+ text : 'Vben Admin Antd 下一代实施' ,
17
+ link : 'https://github.com/fastapi-practices/fba_ui'
18
+ }
19
+ ]
10
20
} ,
11
21
{
12
- text : 'Vben Admin Antd 下一代实施' ,
13
- link : 'https://github.com/fastapi-practices/fba_ui'
22
+ text : '线上演示' ,
23
+ icon : 'mdi:web' ,
24
+ items : [
25
+ {
26
+ text : 'Arco Design Vue 实验性实施' ,
27
+ link : 'https://fba.wu-clan.site/'
28
+ }
29
+ ]
14
30
}
15
31
]
16
32
} ,
@@ -40,12 +56,12 @@ export const myNavbar = defineNavbarConfig([
40
56
]
41
57
} ,
42
58
{
43
- text : '插件 ' ,
59
+ text : '插件市场 ' ,
44
60
icon : 'clarity:plugin-solid' ,
45
61
link : '/plugin/before'
46
62
} ,
47
63
{
48
- text : '授权 ' ,
64
+ text : '购买授权 ' ,
49
65
icon : 'fluent:person-key-20-filled' ,
50
66
link : '/guide/summary/why.md#承诺'
51
67
} ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const mySidebar: SidebarMulti = {
19
19
collapsed : false ,
20
20
prefix : 'reference/' ,
21
21
items : [
22
- { text : '路由' , link : 'route ' } ,
22
+ { text : '路由' , link : 'router ' } ,
23
23
{ text : 'JWT' , link : 'jwt' } ,
24
24
{ text : 'CRUD' , link : 'CRUD' } ,
25
25
{ text : '接口响应' , link : 'response' } ,
@@ -71,6 +71,7 @@ export const mySidebar: SidebarMulti = {
71
71
items : [
72
72
{ text : '前言' , link : 'before' } ,
73
73
{ text : '插件开发' , link : 'dev' } ,
74
+ { text : '插件发布' , link : 'publish' } ,
74
75
{ text : '插件市场' , link : 'market' } ,
75
76
]
76
77
}
Original file line number Diff line number Diff line change @@ -12,35 +12,33 @@ FBA 中的路由遵循 Restful API 规范
12
12
13
13
::: file-tree
14
14
15
- - backend/ 后端
16
- - app/ 应用
17
- - xxx 某自定义应用
15
+ - backend 后端
16
+ - app 应用
17
+ - xxx 自定义应用(包含子包)
18
18
- api 接口
19
- - v1 包含子包
19
+ - v1
20
20
- xxx 子包
21
- - __ init\_\_ .py 在此文件内导入 xxx.py 中的路由器
21
+ - __ init\_\_ .py 在此文件内注册子包内 xxx.py 文件中的路由
22
22
- xxx.py
23
23
- ...
24
- - ...
25
- - v2/
26
- - ...
27
24
- __ init\_\_ .py
28
- - router.py 在此文件内注册所有子包 __ init\_\_ .py 中的路由
29
- - xxx 某自定义应用
25
+ - router.py 在此文件内注册所有子包 __ init\_\_ .py 文件中的路由
26
+ - xxx 自定义应用(不包含子包)
30
27
- api 接口
31
- - v1 不包含子包
28
+ - v1
32
29
- _ \_ init\_\_ .py 不做任何操作
33
30
- xxx.py
34
- - ...
31
+ - ...
35
32
- __ init\_\_ .py
36
- - router.py 在此文件内注册所有 xxx.py 中的路由
33
+ - router.py 在此文件内注册所有 xxx.py 文件中的路由
37
34
- __ init\_\_ .py
38
- - router.py 在此文件内注册所有 app router.py 中的路由
35
+ - router.py 在此文件内注册所有 app 目录下 router.py 文件中的路由
39
36
40
37
:::
41
38
42
39
::: warning
43
- 我们统一命名了所有接口路由参数为 router,这很有助于我们编写接口,但是,不可忽略的是,在注册路由时,一定要注意我们的导入方式,在
44
- FBA 中,我们可以查看所有路由的导入,它们看起来像 ` from backend.app.admin.api.v1.sys.api import router as api_router `
40
+ 我们统一命名了所有接口路由参数为 router,这很有助于我们编写接口,但是,不可忽略的是,在注册路由时,一定要注意我们的导入方式
41
+
42
+ 在 FBA 中,我们可以查看所有路由的导入,它们看起来像 ` from backend.app.admin.api.v1.sys.api import router as api_router `
45
43
,我们这里务必导入文件内的路由参数 ` router ` ,为了避免参数名称冲突,我们可以使用 ` as ` 为路由参数起一个别名
46
44
:::
Original file line number Diff line number Diff line change @@ -46,19 +46,21 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
46
46
- [x] 角色管理:角色菜单权限分配,角色路由权限分配
47
47
- [x] 字典管理:维护系统内部常用固定数据或参数
48
48
- [x] 令牌管理:系统用户在线状态检测,支持踢人下线
49
+ - [x] 登录认证:基于后端的图形验证码后台认证登录
50
+ - [x] 多点登录:通过用户信息一键修改多点登录支持
49
51
- [x] 代码生成:后端代码自动生成,支持预览,写入及下载
52
+ - [x] 定时任务:自动化任务,异步任务,支持函数调用
53
+ - [x] 插件系统:通过热插拔插件模式告别高耦合集成
50
54
- [x] 操作日志:系统正常和异常操作的日志记录与查询
51
- - [x] 登录认证:图形验证码后台认证登录
52
55
- [x] 登录日志:用户正常和异常登录的日志记录与查询
53
56
- [x] 服务监控:服务器硬件设备信息与状态
54
- - [x] 定时任务:自动化任务,异步任务,支持函数调用
55
- - [x] 接口文档:自动生成在线交互式 API 接口文档
57
+ - [x] 接口文档:自动生成在线交互式 API 文档
56
58
57
59
## 项目结构
58
60
59
61
::: file-tree
60
62
61
- - backend/ 后端
63
+ - backend 后端
62
64
- alembic/ 数据库迁移
63
65
- app/ 应用
64
66
- admin 系统后台
@@ -76,6 +78,7 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
76
78
- database/ 数据库连接
77
79
- log/ 日志
78
80
- middleware/ 中间件
81
+ - plugin/ 插件
79
82
- scripts/ 脚本
80
83
- sql/ SQL文件
81
84
- static/ 静态文件
Original file line number Diff line number Diff line change @@ -230,8 +230,11 @@ title: 快速开始
230
230
::: steps
231
231
232
232
1. 定义数据库模型(model)
233
+
233
234
2. 定义数据验证模型(schema)
235
+
234
236
3. 定义视图(api)和路由(router)
237
+
235
238
4. 编写业务(service)
236
239
237
240
5. 编写数据库操作(crud)
Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ title: 前言
30
30
31
31
## 技术支持
32
32
33
- 插件作者需提供至少一种联系方式且必须加入 Discord 社区,我们会在社区内为每个插件提供独立互动频道
34
-
35
- 第三方插件用户需自行联系第三方插件作者,我们不提供任何第三方插件技术支持
33
+ 我们会在社区内为每个插件提供独立互动频道,第三方插件用户需自行联系第三方插件作者,我们不提供任何第三方插件技术支持
36
34
37
35
## 免责声明
38
36
Original file line number Diff line number Diff line change 2
2
title : 插件开发
3
3
---
4
4
5
- 即将到来...
5
+ ::: warning
6
+ 当前插件开发要求于 2025-02-14 进行定义,一旦修改,我们会立即同步此文档
7
+ :::
8
+
9
+ ## 后端
10
+
11
+ 我们创建了一个插件模板仓库 [ fba_plugin_template] ( https://github.com/fastapi-practices/fba_plugin_template )
12
+ 用于插件开发,开发步骤参考如下:
13
+
14
+ :::: steps
15
+
16
+ 1 . clone 最新 fba 项目到本地并配置好开发环境
17
+ 2 . 根据插件模板的目录结构进行插件开发
18
+ 3 . 完成插件开发
19
+ 4 . 使用插件模板仓库创建个人仓库,并将插件代码更新至个人仓库
20
+
21
+ ::: note
22
+ 我们鼓励大家将插件源码进行开源,但并不强制,如果您的插件需要付费,则无需上传源码,但必须保留个人仓库,并添加相关付费说明
23
+ :::
24
+
25
+ 5 . [ 申请发布插件] ( publish.md )
26
+
27
+ ::::
28
+
29
+ ### 插件目录结构说明
30
+
31
+ ::: file-tree
32
+
33
+ - backend fba 目录
34
+ - plugin fba 目录
35
+ - xxx 插件名
36
+ - api/ 接口,务必查看下方【插件接口附加说明】
37
+ - crud/ CRUD
38
+ - model/ 模型
39
+ - schema/ 数据传输
40
+ - service/ 服务
41
+ - \_\_ init__ .py 作为 python 包保留(必填项)
42
+ - conf.py 配置,如果插件不需要独立配置,则无需此文件
43
+ - plugin.toml 插件配置(必填项)
44
+ - README.md 插件使用说明,如果插件可直接使用,则无需此文件
45
+ - requirements.txt 依赖包文件,如果插件不需要安装额外依赖,则无需此文件
46
+
47
+ :::
48
+
49
+ ::: warning 插件接口附加说明
50
+
51
+ - 如果插件作为独立 app 发布(在 ` backend/app ` 目录下的应用,视为独立
52
+ app),则插件路由应完全遵循 [ 路由结构] ( ../guide/reference/router.md#路由结构 ) 进行定义
53
+ - 如果插件作为现有 app 扩展功能发布,则插件路由应当根据现有 app 中的路由结构进行 1:1 结构复制,可参考 fba
54
+ 源码中的内置插件 [ notice] ( https://github.com/fastapi-practices/fastapi_best_architecture/tree/master/backend/plugin/notice/api )
55
+
56
+ :::
57
+
58
+ ## 前端
59
+
60
+ 一旦 [ Vben Admin Antd 下一代实施] ( https://github.com/fastapi-practices/fba_ui ) 生产可用,我们将开启此计划...
Original file line number Diff line number Diff line change @@ -8,20 +8,15 @@ title: 插件市场
8
8
:::
9
9
10
10
::: info
11
- 你可以在 [ 插件互动频道] ( https://discord.gg/5SDAZgDya9 ) 与插件作者及社区人员进行互动和交流
12
- :::
13
-
14
- > [ !IMPORTANT]
15
- > 插件需要人工审核,请 [ 点击此处] ( https://discord.com/channels/1185035164577972344/1332032404663046204 )
16
- > 与我们联系,一旦插件审核通过,我们会立即更新至此页面
11
+ 您可以在 [ 插件互动频道] ( https://discord.gg/5SDAZgDya9 ) 与插件作者及社区人员进行互动和交流
17
12
18
- ## 插件标签
13
+ - <Badge type =" info " text =" free " /> - 免费插件
14
+ - <Badge type =" danger " text =" pay " /> - 付费插件
15
+ - <Badge type =" tip " text =" fba " /> - 仅后端代码插件
16
+ - <Badge text =" fba-arco " color =" #4582ff " /> - 包含前端 [ fastapi_best_architecture_ui] ( https://github.com/fastapi-practices/fastapi_best_architecture_ui ) 代码插件
17
+ - <Badge text =" fba-vben " color =" #c178ec " /> - 包含前端 [ fba_ui] ( https://github.com/fastapi-practices/fba_ui ) 代码插件
19
18
20
- - <Badge type =" info " text =" free " /> - 免费
21
- - <Badge type =" danger " text =" pay " /> - 付费
22
- - <Badge type =" tip " text =" fba " /> - 仅后端
23
- - <Badge text =" fba-arco " color =" #4582ff " /> - 包含前端 [ fastapi_best_architecture_ui] ( https://github.com/fastapi-practices/fastapi_best_architecture_ui )
24
- - <Badge text =" fba-vben " color =" #c178ec " /> - 包含前端 [ fba_ui] ( https://github.com/fastapi-practices/fba_ui )
19
+ :::
25
20
26
21
## 官方
27
22
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : 发布
3
+ ---
4
+
5
+ > [ !IMPORTANT]
6
+ > 插件作者需符合以下几点要求
7
+ >
8
+ > - 必须加入 Discord 社区
9
+ > - 必须提供插件仓库 github 地址
10
+ > - 必须在插件仓库 README 文件内提供至少一种(任意)联系方式
11
+
12
+ ::: warning
13
+ 插件需要人工审核,请 [ 点击此处] ( https://discord.com/channels/1185035164577972344/1332032404663046204 )
14
+ 与我们联系,付费插件同样需要人工审核,审核通过后,我们承诺会立即销毁本地插件源码
15
+ :::
16
+
17
+ ::: tip
18
+ 一旦插件审核通过,我们会立即将插件更新至 [ 插件市场] ( market.md ) 并在 Discord 社区内创建插件相应的独立互动频道,
19
+ 并赋予插件作者相应频道的身份牌和管理权限,对于创建插件数量 >= 2 的插件作者,我们将提供知识星球永久免费入驻名额
20
+ :::
You can’t perform that action at this time.
0 commit comments