Skip to content

Commit bd1eb97

Browse files
committed
update docs
1 parent 7fd5a71 commit bd1eb97

File tree

9 files changed

+134
-45
lines changed

9 files changed

+134
-45
lines changed

docs/.vuepress/navbar.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@ import {defineNavbarConfig} from "vuepress-theme-plume";
22

33
export const myNavbar = defineNavbarConfig([
44
{
5-
text: 'UI 演示',
6-
items: [
5+
text: 'UI 效果',
6+
items:[
77
{
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+
]
1020
},
1121
{
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+
]
1430
}
1531
]
1632
},
@@ -40,12 +56,12 @@ export const myNavbar = defineNavbarConfig([
4056
]
4157
},
4258
{
43-
text: '插件',
59+
text: '插件市场',
4460
icon: 'clarity:plugin-solid',
4561
link: '/plugin/before'
4662
},
4763
{
48-
text: '授权',
64+
text: '购买授权',
4965
icon: 'fluent:person-key-20-filled',
5066
link: '/guide/summary/why.md#承诺'
5167
},

docs/.vuepress/sidebar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const mySidebar: SidebarMulti = {
1919
collapsed: false,
2020
prefix: 'reference/',
2121
items: [
22-
{text: '路由', link: 'route'},
22+
{text: '路由', link: 'router'},
2323
{text: 'JWT', link: 'jwt'},
2424
{text: 'CRUD', link: 'CRUD'},
2525
{text: '接口响应', link: 'response'},
@@ -71,6 +71,7 @@ export const mySidebar: SidebarMulti = {
7171
items: [
7272
{text: '前言', link: 'before'},
7373
{text: '插件开发', link: 'dev'},
74+
{text: '插件发布', link: 'publish'},
7475
{text: '插件市场', link: 'market'},
7576
]
7677
}

docs/guide/reference/route.md renamed to docs/guide/reference/router.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,33 @@ FBA 中的路由遵循 Restful API 规范
1212

1313
::: file-tree
1414

15-
- backend/ 后端
16-
- app/ 应用
17-
- xxx 某自定义应用
15+
- backend 后端
16+
- app 应用
17+
- xxx 自定义应用(包含子包)
1818
- api 接口
19-
- v1 包含子包
19+
- v1
2020
- xxx 子包
21-
- __init\_\_.py 在此文件内导入 xxx.py 中的路由器
21+
- __init\_\_.py 在此文件内注册子包内 xxx.py 文件中的路由
2222
- xxx.py
2323
- ...
24-
- ...
25-
- v2/
26-
- ...
2724
- __init\_\_.py
28-
- router.py 在此文件内注册所有子包 __init\_\_.py 中的路由
29-
- xxx 某自定义应用
25+
- router.py 在此文件内注册所有子包 __init\_\_.py 文件中的路由
26+
- xxx 自定义应用(不包含子包)
3027
- api 接口
31-
- v1 不包含子包
28+
- v1
3229
- _\_init\_\_.py 不做任何操作
3330
- xxx.py
34-
- ...
31+
- ...
3532
- __init\_\_.py
36-
- router.py 在此文件内注册所有 xxx.py 中的路由
33+
- router.py 在此文件内注册所有 xxx.py 文件中的路由
3734
- __init\_\_.py
38-
- router.py 在此文件内注册所有 app router.py 中的路由
35+
- router.py 在此文件内注册所有 app 目录下 router.py 文件中的路由
3936

4037
:::
4138

4239
::: 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`
4543
,我们这里务必导入文件内的路由参数 `router`,为了避免参数名称冲突,我们可以使用 `as` 为路由参数起一个别名
4644
:::

docs/guide/summary/intro.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,21 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
4646
- [x] 角色管理:角色菜单权限分配,角色路由权限分配
4747
- [x] 字典管理:维护系统内部常用固定数据或参数
4848
- [x] 令牌管理:系统用户在线状态检测,支持踢人下线
49+
- [x] 登录认证:基于后端的图形验证码后台认证登录
50+
- [x] 多点登录:通过用户信息一键修改多点登录支持
4951
- [x] 代码生成:后端代码自动生成,支持预览,写入及下载
52+
- [x] 定时任务:自动化任务,异步任务,支持函数调用
53+
- [x] 插件系统:通过热插拔插件模式告别高耦合集成
5054
- [x] 操作日志:系统正常和异常操作的日志记录与查询
51-
- [x] 登录认证:图形验证码后台认证登录
5255
- [x] 登录日志:用户正常和异常登录的日志记录与查询
5356
- [x] 服务监控:服务器硬件设备信息与状态
54-
- [x] 定时任务:自动化任务,异步任务,支持函数调用
55-
- [x] 接口文档:自动生成在线交互式 API 接口文档
57+
- [x] 接口文档:自动生成在线交互式 API 文档
5658

5759
## 项目结构
5860

5961
::: file-tree
6062

61-
- backend/ 后端
63+
- backend 后端
6264
- alembic/ 数据库迁移
6365
- app/ 应用
6466
- admin 系统后台
@@ -76,6 +78,7 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
7678
- database/ 数据库连接
7779
- log/ 日志
7880
- middleware/ 中间件
81+
- plugin/ 插件
7982
- scripts/ 脚本
8083
- sql/ SQL文件
8184
- static/ 静态文件

docs/guide/summary/quick-start.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ title: 快速开始
230230
::: steps
231231

232232
1. 定义数据库模型(model)
233+
233234
2. 定义数据验证模型(schema)
235+
234236
3. 定义视图(api)和路由(router)
237+
235238
4. 编写业务(service)
236239

237240
5. 编写数据库操作(crud)

docs/plugin/before.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ title: 前言
3030

3131
## 技术支持
3232

33-
插件作者需提供至少一种联系方式且必须加入 Discord 社区,我们会在社区内为每个插件提供独立互动频道
34-
35-
第三方插件用户需自行联系第三方插件作者,我们不提供任何第三方插件技术支持
33+
我们会在社区内为每个插件提供独立互动频道,第三方插件用户需自行联系第三方插件作者,我们不提供任何第三方插件技术支持
3634

3735
## 免责声明
3836

docs/plugin/dev.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,59 @@
22
title: 插件开发
33
---
44

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) 生产可用,我们将开启此计划...

docs/plugin/market.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,15 @@ title: 插件市场
88
:::
99

1010
::: info
11-
你可以在 [插件互动频道](https://discord.gg/5SDAZgDya9) 与插件作者及社区人员进行互动和交流
12-
:::
13-
14-
> [!IMPORTANT]
15-
> 插件需要人工审核,请 [点击此处](https://discord.com/channels/1185035164577972344/1332032404663046204)
16-
> 与我们联系,一旦插件审核通过,我们会立即更新至此页面
11+
您可以在 [插件互动频道](https://discord.gg/5SDAZgDya9) 与插件作者及社区人员进行互动和交流
1712

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) 代码插件
1918

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+
:::
2520

2621
## 官方
2722

docs/plugin/publish.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
:::

0 commit comments

Comments
 (0)