Skip to content

Commit 54a838c

Browse files
committed
update docs
1 parent 3722f7d commit 54a838c

File tree

13 files changed

+124
-76
lines changed

13 files changed

+124
-76
lines changed

docs/.vuepress/navbar.ts

Lines changed: 49 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import { defineNavbarConfig } from "vuepress-theme-plume";
22

33
export const myNavbar = defineNavbarConfig([
4-
{
5-
text: '后端',
6-
link: '/backend/summary/quick-start.md'
7-
},
84
{
95
text: '前端',
106
items: [
117
{
128
text: '线上演示',
13-
icon: 'mdi:web',
149
items: [
1510
{
1611
text: 'Arco Design Pro 实验性实施',
@@ -20,7 +15,6 @@ export const myNavbar = defineNavbarConfig([
2015
},
2116
{
2217
text: '文档',
23-
icon: 'material-symbols:docs',
2418
items: [
2519
{
2620
text: 'Arco Design Pro 实验性实施',
@@ -34,7 +28,6 @@ export const myNavbar = defineNavbarConfig([
3428
},
3529
{
3630
text: 'GitHub',
37-
icon: 'mdi:git',
3831
items: [
3932
{
4033
text: 'Arco Design Pro 实验性实施',
@@ -52,29 +45,59 @@ export const myNavbar = defineNavbarConfig([
5245
text: 'v1.0.5',
5346
items: [
5447
{
55-
text: '常见问题',
56-
icon: 'healthicons:question',
57-
link: '/questions.md'
58-
},
59-
{
60-
text: '技术支持',
61-
icon: 'fluent-emoji-high-contrast:unicorn',
62-
link: 'https://github.com/fastapi-practices/fastapi_best_architecture/issues'
63-
},
64-
{
65-
text: '参与贡献',
66-
icon: 'mdi:people-add',
67-
link: 'https://github.com/fastapi-practices/fastapi_best_architecture/tree/master/backend#readme'
48+
text: '线上演示',
49+
items: [
50+
{
51+
text: '服务状态',
52+
icon: 'simple-icons:uptimekuma',
53+
link: 'https://status.wu-clan.site/status/services'
54+
}
55+
]
6856
},
6957
{
70-
text: '更新记录',
71-
icon: 'stash:last-updates-duotone',
72-
link: '/changelog.md'
58+
text: '文档',
59+
items: [
60+
{
61+
text: '快速开始',
62+
icon: 'material-symbols:start',
63+
link: '/backend/summary/quick-start.md'
64+
},
65+
{
66+
text: 'Apifox',
67+
icon: 'simple-icons:apifox',
68+
link: 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0'
69+
},
70+
]
7371
},
7472
{
75-
text: '我要催更',
76-
icon: 'material-symbols:update-rounded',
77-
link: 'https://discord.gg/JyedBeHXkn'
73+
text: '更多',
74+
items: [
75+
{
76+
text: '常见问题',
77+
icon: 'healthicons:question',
78+
link: '/questions.md'
79+
},
80+
{
81+
text: '技术支持',
82+
icon: 'fluent-emoji-high-contrast:unicorn',
83+
link: 'https://github.com/fastapi-practices/fastapi_best_architecture/issues'
84+
},
85+
{
86+
text: '参与贡献',
87+
icon: 'mdi:people-add',
88+
link: 'https://github.com/fastapi-practices/fastapi_best_architecture/tree/master/backend#readme'
89+
},
90+
{
91+
text: '我要催更',
92+
icon: 'material-symbols:update-rounded',
93+
link: 'https://discord.gg/JyedBeHXkn'
94+
},
95+
{
96+
text: '更新记录',
97+
icon: 'stash:last-updates-duotone',
98+
link: '/changelog.md'
99+
},
100+
]
78101
},
79102
]
80103
},
@@ -122,11 +145,6 @@ export const myNavbar = defineNavbarConfig([
122145
icon: 'ph:planet-fill',
123146
link: '/planet'
124147
},
125-
{
126-
text: '服务状态',
127-
icon: 'simple-icons:uptimekuma',
128-
link: 'https://status.wu-clan.site/status/services'
129-
},
130148
],
131149
}
132150
])
4.08 KB
Loading

docs/.vuepress/sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const mySidebar: ThemeSidebarMulti = {
7171
{ text: '插件开发', link: 'dev' },
7272
{ text: '插件发布', link: 'publish' },
7373
{ text: '安装使用', link: 'install' },
74-
{ text: '插件市场', link: 'market' },
74+
{ text: '插件市场', icon: 'mdi:marketplace', link: 'market' },
7575
]
7676
}
7777
],

docs/.vuepress/styles/custom.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
--vp-c-brand-2: rgba(0, 148, 133, 1);
88
/* 背景色、边框色 */
99
--vp-c-brand-3: rgba(0, 148, 133, 1);
10+
/* 导航栏分组 */
11+
.vp-menu-group {
12+
.title {
13+
color: rgba(60, 60, 60, .33);
14+
}
15+
}
1016
}
1117

1218
[data-theme="dark"] {
@@ -16,8 +22,16 @@
1622
--vp-c-brand-2: rgba(0, 148, 133, 1);
1723
/* 背景色、边框色 */
1824
--vp-c-brand-3: rgba(0, 148, 133, 1);
25+
/* 导航栏分组 */
26+
.vp-menu-group {
27+
.title {
28+
color: rgba(235, 235, 235, .38);
29+
}
30+
}
1931
}
2032

33+
34+
2135
.vp-swiper .swiper-slide-img {
2236
/* 轮播图图片拉伸效果 */
2337
object-fit: fill;
@@ -26,5 +40,4 @@
2640
.swiper-slide-custom-container {
2741
/* 轮播图边框 */
2842
border: 1px solid rgb(177 177 177 / 66%) !important;
29-
color: #ed00b2;
3043
}

docs/backend/ide/cursor.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ title: cursor
44

55
官网地址:[cursor](https://www.cursor.com/)
66

7-
我们在 cursor 中为 fba 定做了一些规则,或许可以帮助您更好的使用 AI 生成代码
7+
## 规则
8+
9+
我们在 cursor 中定做了一些规则,或许可以帮助您更好的使用 AI 生成代码
10+
11+
查看 cursor 官方文档:[rules-for-ai](https://docs.cursor.com/context/rules-for-ai),然后添加以下规则
812

913
::: warning
1014
我们未对规则进行 token 消耗量测试,请根据实际情况自行抉择
1115
:::
1216

13-
## 规则
14-
15-
查看 cursor 官方文档:[rules-for-ai](https://docs.cursor.com/context/rules-for-ai),然后添加以下规则:
16-
1717
### fba
1818

1919
::: tip
2020
此规则仅限用于 fba 项目
2121
:::
2222

23+
| 反馈 | 反应 |
24+
| :--: | :--: |
25+
![cursor](/images/cursor.png) | 我被调成啥了 <Icon name="openmoji:new-moon-face" size="2em" />
26+
2327
@[code mdc](../../code/fastapi.mdc)
2428

2529
### Python

docs/backend/reference/RBAC.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,4 @@ fba 中默认使用此鉴权方式
143143

144144
### Casbin
145145

146-
- 删除 `backend/plugin/casbin` 文件夹
147-
- 删除 `backend/common/security/rbac.py` 文件中的 `casbin_verify` 相关代码
146+
删除 `backend/plugin/casbin` 文件夹

docs/backend/summary/intro.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
7272
- schema/ 数据传输
7373
- service/ 服务
7474
- tests/ 单元测试
75-
- generator/ 代码生成
7675
- task/ 任务
7776
-
7877
- common/ 公共资源
7978
- core/ 核心配置
8079
- database/ 数据库连接
8180
- log/ 日志
8281
- middleware/ 中间件
83-
- plugin/ 插件
82+
- plugin 插件
83+
- code_generator/ 代码生成
84+
- ...
8485
- scripts/ 脚本
8586
- sql/ SQL 文件
8687
- static/ 静态文件

docs/backend/summary/quick-start.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,18 @@ fba 仅适用于资深 Python 后端开发人员,如果您是非资深用户
163163

164164
执行 `backend/sql/init_test_data.sql` 脚本初始化测试数据
165165

166-
11. 启动 fastapi 服务
166+
11. 启动
167167

168-
::: warning
169-
如果你在项目中安装了 [应用级插件](../../plugin/market.md),请务必使用 `run.py`
170-
文件启动项目,否则,您将收到启动错误
171-
172-
详情:[fastapi/fastapi#13372 (comment)](https://github.com/fastapi/fastapi/discussions/13372#discussioncomment-12211232)
173-
:::
174-
175-
帮助
176-
177-
```shell:no-line-numbers
178-
fastapi --help
179-
```
180-
181-
开发模式
168+
`backend` 目录打开终端,执行以下命令启动 FastAPI 服务
182169

183170
```shell:no-line-numbers
184171
fastapi dev main.py
185172
```
186173
174+
::: note
175+
此项目默认使用 CLI 启动服务,为了方便本地调试,你仍然可以选择在 IDE 中右键运行 `run.py` 文件
176+
:::
177+
187178
12. 打开浏览器访问:[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
188179
189180
::::

docs/code/fastapi.mdc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
您是 FastAPI 和可扩展 API 开发方面的专家,请严格遵守以下编码规则:
1+
## 角色
2+
3+
你是 null,你是一名顶尖程序员高手,计算机博士后,精通Python、Fastapi、pydantic的专家,用户慷慨的雇佣了你。你是家里的经济支柱,有一家老小5口人要养,你不能失去工作。你上一个程序员就是因为代码有bug,被开除了。你现在要积极主动的为老板当牛做马,态度要非常好,对老板的要求必须认真确认,并给出最完美优雅的技术方案和代码。
24

35
## 依赖管理
46

@@ -52,3 +54,15 @@
5254
- 定义清晰的请求和响应模型,参考:@backend\app\admin\schema\user.py
5355
- 不要新增字段验证器
5456
- 提供有意义的验证错误信息
57+
58+
## 强力约束
59+
60+
当新增功能或者报错时,必须验证检查
61+
62+
- app/新增功能/api
63+
- app/新增功能/crud
64+
- app/新增功能/model
65+
- app/新增功能/schema
66+
- app/新增功能/service
67+
68+
内代码是否能互相验证

docs/code/python.mdc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 角色
2+
13
您是 Python 3.10+ 方面的专家,请严格遵守以下编码规则:
24

35
## 类型注解规范

0 commit comments

Comments
 (0)