Skip to content

Commit 52a1cf7

Browse files
committed
update docs
1 parent eac8a0c commit 52a1cf7

File tree

7 files changed

+80
-49
lines changed

7 files changed

+80
-49
lines changed

docs/.vuepress/components/PluginMarket.vue

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@
110110
/>
111111
<span>可用</span>
112112
</label>
113+
<label class="filter-badge" :class="{ active: selectedStatus === 'wip' }">
114+
<input
115+
type="radio"
116+
value="wip"
117+
v-model="selectedStatus"
118+
name="status"
119+
/>
120+
<span>开发中</span>
121+
</label>
113122
<label class="filter-badge" :class="{ active: selectedStatus === 'expired' }">
114123
<input
115124
type="radio"
@@ -166,7 +175,7 @@
166175
<div
167176
v-for="(item, index) in filteredItems"
168177
:key="index"
169-
:class="{ 'clickable': item.link, 'expired': item.expired }"
178+
:class="{ 'clickable': item.link, 'expired': item.expired || item.wip }"
170179
class="plugin-card"
171180
@click="handleCardClick(item)"
172181
>
@@ -183,6 +192,9 @@
183192
<div v-if="item.expired" class="expired-overlay">
184193
<span class="expired-text">已过期,不适用</span>
185194
</div>
195+
<div v-if="item.wip" class="expired-overlay">
196+
<span class="expired-text">正在开发中</span>
197+
</div>
186198
</div>
187199
<div class="card-content">
188200
<div class="card-title-row">
@@ -208,7 +220,7 @@
208220
/>
209221
</div>
210222
</div>
211-
<div v-if="item.expired" class="expired-overlay-card"></div>
223+
<div v-if="item.expired || item.wip" class="expired-overlay-card"></div>
212224
</div>
213225
</div>
214226
</div>
@@ -230,6 +242,7 @@ export interface PluginItem {
230242
logo: string
231243
free?: boolean
232244
expired?: boolean
245+
wip?: boolean
233246
}
234247
235248
const props = withDefaults(
@@ -317,9 +330,11 @@ const baseFilteredItems = computed(() => {
317330
}
318331
319332
if (selectedStatus.value === 'active') {
320-
result = result.filter(item => !item.expired)
333+
result = result.filter(item => !item.expired && !item.wip)
321334
} else if (selectedStatus.value === 'expired') {
322335
result = result.filter(item => item.expired)
336+
} else if (selectedStatus.value === 'wip') {
337+
result = result.filter(item => item.wip)
323338
}
324339
325340
return result
@@ -481,18 +496,6 @@ const handleCardClick = (item: PluginItem) => {
481496
overflow: hidden;
482497
}
483498
484-
.filter-content-enter-active,
485-
.filter-content-leave-active {
486-
transition: all 0.3s ease;
487-
max-height: 1000px;
488-
}
489-
490-
.filter-content-enter-from,
491-
.filter-content-leave-to {
492-
max-height: 0;
493-
opacity: 0;
494-
}
495-
496499
@media (max-width: 767px) {
497500
.filter-card.collapsed {
498501
margin-bottom: 0;

docs/.vuepress/data/plugin.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const pluginItems: PluginItem[] = [
5656
{
5757
icon: "codicon:mcp",
5858
title: "MCP 服务器管理",
59-
description: "提供了 MCP 服务器管理功能,并添加了可调用 MCP 的 AI 聊天接口",
59+
description: "提供了 MCP 服务器管理功能,可配合 AI 插件食用",
6060
label: '官方',
6161
tags: ["MCP", "pgsql", "mysql", "后端"],
6262
link: "https://github.com/fastapi-practices/mcp",
@@ -65,7 +65,7 @@ export const pluginItems: PluginItem[] = [
6565
{
6666
icon: "ant-design:aliyun-outlined",
6767
title: "阿里云 oss",
68-
description: "阿里云 oss 文件上传",
68+
description: "阿里云 oss 对象存储",
6969
label: '官方',
7070
tags: ["pgsql", "mysql", "后端"],
7171
link: "https://github.com/fastapi-practices/aliyun_oss",
@@ -122,4 +122,24 @@ export const pluginItems: PluginItem[] = [
122122
image: "https://registry.npmmirror.com/@lobehub/icons-static-png/latest/files/dark/tencentcloud-color.png",
123123
logo: 'https://avatars.githubusercontent.com/u/67427627?v=4',
124124
},
125+
{
126+
icon: "carbon:ai-label",
127+
title: "AI",
128+
description: "为系统带来了 AI 赋能,是系统 AI 能力的基石",
129+
label: '官方',
130+
tags: ["AI", "pgsql", "mysql", "后端"],
131+
link: "https://github.com/fastapi-practices/ai",
132+
logo: 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png',
133+
wip: true,
134+
},
135+
{
136+
icon: "logos:aws-s3",
137+
title: "S3",
138+
description: "提供兼容 S3 协议的对象存储能力",
139+
label: '官方',
140+
tags: ["S3", "pgsql", "mysql", "后端"],
141+
link: "https://github.com/fastapi-practices/s3",
142+
logo: 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png',
143+
wip: true,
144+
},
125145
]

docs/.vuepress/data/sponsors.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ export const homeSponsor: Sponsor = { ...defaultSponsor };
1919

2020
export const goldSponsors: Sponsor[] = [
2121
{
22-
link: 'https://www.serpshot.com/logo.png',
23-
href: 'https://www.serpshot.com',
24-
alt: 'Serpshot',
22+
link: 'https://ss-id.com/images/logo.png',
23+
href: 'https://ss-id.com/#/register?code=K64cODZr',
24+
alt: 'SS-ID',
2525
expiryTime: '2099-12-31T23:59:59',
2626
},
2727
{ ...defaultSponsor }
2828
]
2929

3030
export const generalSponsors: Sponsor[] = [
31+
{
32+
link: 'https://www.serpshot.com/logo.png',
33+
href: 'https://www.serpshot.com',
34+
alt: 'Serpshot',
35+
expiryTime: '2099-12-31T23:59:59',
36+
},
3137
{
3238
link: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQQImbvY5S8IbJ1iL6yHfExtHiAhUtLIoi7AQ&s',
3339
href: 'https://user.by.ltd/aff.php?aff=12215',
1.56 KB
Loading

docs/backend/reference/db.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ DATABASE_PASSWORD='123456'
7373

7474
## 解耦
7575

76-
如果你只想保留一种数据库,请参考以下内容进行解耦
76+
如果你只想保留一种数据库,参考如下
7777

7878
- 删除 `with_variant` 相关代码(如果存在),仅保留数据库对应的类型
7979
- 删除 `backend/core/conf.py` 文件中的 `DATABASE_TYPE` 及其相关的调用代码

docs/backend/reference/pk.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ title: 主键
7171

7272
1. 务必仔细查看本章节警告内容,确保数据库环境整洁
7373
2. 更新 `backend/core/conf.py` 中的 `DATABASE_PK_MODE` 配置为 `snowflake`
74-
3. 执行 `backend/sql/xxx/init_snowflake_test_data.sql` 脚本初始化测试数据
75-
4. 阅读 [注意事项](#注意事项)
74+
3. 阅读 [注意事项](#注意事项)
7675

7776
::: caution Windows 平台警告
7877
如果您正在 Windows 平台中使用 mysql >= 8.0,还需要更新 `backend/database/db.py` 文件内的 `mysql+asyncmy`

docs/backend/summary/quick-start.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ fba 仅适用于资深 Python 后端开发人员,如果您是非资深用户
4242
![use_this_template](/images/use_this_template.png)
4343
:::
4444

45-
5. 安装依赖
45+
5. env
46+
47+
`backend` 目录打开终端,执行以下命令创建环境变量文件
48+
49+
```shell:no-line-numbers
50+
cp .env.example .env
51+
```
52+
53+
6. 按需修改配置文件:`backend/core/conf.py``.env`
54+
7. 安装依赖
4655

4756
此项目使用 uv 作为项目管理器,建议您 [安装 uv](https://docs.astral.sh/uv/getting-started/installation/)
4857

@@ -61,24 +70,18 @@ fba 仅适用于资深 Python 后端开发人员,如果您是非资深用户
6170
uv pip install -r requirements.txt
6271
```
6372
:::
73+
8. 创建数据库表和测试数据 <Badge type="warning" text="二选一" />
6474

65-
6. env
66-
67-
`backend` 目录打开终端,执行以下命令创建环境变量文件
75+
::: tabs
76+
@tab CLI
77+
`根目录` 打开终端,执行以下命令
6878

6979
```shell:no-line-numbers
70-
cp .env.example .env
80+
fba init
7181
```
7282

73-
7. 按需修改配置文件:`backend/core/conf.py``.env`
74-
8. 创建数据库表 <Badge type="warning" text="二选一" />
75-
76-
::: tabs
77-
@tab 自动创建
78-
跳过此步骤,启动 fba 后将自动创建
79-
80-
@tab Alembic 迁移
81-
`backend` 目录 打开终端
83+
@tab Alembic + 手动
84+
`根目录` 打开终端,执行以下命令
8285

8386
生成迁移文件
8487

@@ -91,11 +94,21 @@ fba 仅适用于资深 Python 后端开发人员,如果您是非资深用户
9194
```shell:no-line-numbers
9295
alembic upgrade head
9396
```
97+
98+
初始化测试数据
99+
100+
架构:执行 `backend/sql/` 目录下对应主键模式的脚本
101+
102+
插件:执行 `backend/plugin/sql/` 目录下对应主键模式的脚本
103+
104+
```shell:no-line-numbers
105+
fba --sql xxx.sql
106+
```
94107
:::
95108

96109
9. 启动
97110

98-
`根目录` 打开终端,执行以下命令启动 FastAPI 服务
111+
`根目录` 打开终端,执行以下命令
99112

100113
```shell:no-line-numbers
101114
fba run
@@ -130,17 +143,7 @@ fba 仅适用于资深 Python 后端开发人员,如果您是非资深用户
130143
beat 服务,相关接口将自动恢复正常
131144
:::
132145
133-
11. 初始化测试数据
134-
135-
架构:执行 `backend/sql/` 目录下对应主键模式的脚本
136-
137-
插件:执行 `插件/sql/` 目录下对应主键模式的脚本
138-
139-
::: info
140-
你也可以选择通过 [CLI](../reference/cli.md) 快速执行这些脚本
141-
:::
142-
143-
12. 打开浏览器访问:[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
146+
11. 打开浏览器访问:[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
144147
145148
::::
146149

0 commit comments

Comments
 (0)