Skip to content

Commit 13e6684

Browse files
committed
update docs
1 parent 7a36090 commit 13e6684

File tree

1 file changed

+40
-20
lines changed

1 file changed

+40
-20
lines changed

docs/guide/summary/quick-start.md

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,31 @@ title: 快速开始
1313

1414
1. 准备本地环境
1515

16-
* Python 3.10+
17-
* Mysql 8.0+
18-
* Redis 推荐最新稳定版
16+
* Python 3.10+
17+
* Mysql 8.0+
18+
* Redis 推荐最新稳定版
1919

2020
2. 准备 Git 仓库
2121

2222
::: info
2323
提供两种方案,选择其中一种即可
2424
:::
2525

26-
1. 拉取源代码仓库
26+
1. 拉取源代码仓库
2727

28-
此方式需要你删除拉取项目后根目录下的 `.git` 文件夹,之后上传到你指定的仓库即可,具体请自行查阅你要上传平台的行为准则
28+
此方式需要你删除拉取项目后根目录下的 `.git` 文件夹,之后上传到你指定的仓库即可,具体请自行查阅你要上传平台的行为准则
2929

30-
```shell
31-
git clone https://github.com/fastapi-practices/fastapi_best_architecture.git
32-
```
30+
```shell
31+
git clone https://github.com/fastapi-practices/fastapi_best_architecture.git
32+
```
3333

34-
2. 拉取模板仓库
34+
2. 拉取模板仓库
3535

36-
此项目支持创建模板仓库,意味着,你可以直接创建一个非 fork(独立无绑定的关系)的个人账户仓库,如果所示,进入此项目 GitHub 首页,
37-
使用 `use this template` 按钮创建即可,创建完成之后,使用 `git clone` 命令拉取你自己的仓库即可
38-
39-
![use_this_template](/images/use_this_template.png)
36+
此项目支持创建模板仓库,意味着,你可以直接创建一个非 fork(独立无绑定的关系)的个人账户仓库,如果所示,进入此项目
37+
GitHub 首页,
38+
使用 `use this template` 按钮创建即可,创建完成之后,使用 `git clone` 命令拉取你自己的仓库即可
39+
40+
![use_this_template](/images/use_this_template.png)
4041

4142
3. 安装依赖包
4243

@@ -75,7 +76,7 @@ title: 快速开始
7576
```shell
7677
alembic revision --autogenerate
7778
```
78-
79+
7980
执行迁移
8081

8182
```shell
@@ -129,21 +130,37 @@ title: 快速开始
129130
### 前端
130131

131132
:::: steps
133+
132134
1. 准备本地环境
133135

134-
* Nodejs 14.0+
136+
* Nodejs 18.0+
137+
* yarn 1.x
135138

136139
2. 安装和启动
137140

138141
::: caution
139142
目前它仅作为效果演示,而不是用于生产!
140-
143+
141144
如果你不想前端依赖安装问题带来困扰,请务必使用 `yarn` v1.x 版本
142145
:::
143-
144-
你可以跳转 [fastapi_best_architecture_ui](https://github.com/fastapi-practices/fastapi_best_architecture_ui) 查看详情
145-
::::
146146

147+
安装依赖
148+
149+
```shell
150+
yarn install
151+
```
152+
153+
启动
154+
155+
```shell
156+
yarn dev
157+
```
158+
159+
::: warning
160+
第一次启动可能会很慢,你可以查看此 [Issue](https://github.com/fastapi-practices/fastapi_best_architecture_ui/issues/72)
161+
查看详情
162+
:::
163+
::::
147164

148165
## 开发流程
149166

@@ -152,6 +169,7 @@ title: 快速开始
152169
:::
153170

154171
::: steps
172+
155173
1. 定义数据库模型(model)
156174

157175
2. 定义数据验证模型(schema)
@@ -161,7 +179,7 @@ title: 快速开始
161179
4. 编写业务(service)
162180

163181
5. 编写数据库操作(crud)
164-
:::
182+
:::
165183

166184
## 单元测试
167185

@@ -170,6 +188,7 @@ title: 快速开始
170188
:::
171189

172190
::: steps
191+
173192
1. 创建测试数据库 `fba_test`,选择 utf8mb4 编码
174193
2. 使用 `backend/sql/create_tables.sql` 文件创建数据库表
175194
3. 使用 `backend/sql/init_pytest_data.sql` 文件初始化用于单元测试的测试数据
@@ -178,4 +197,5 @@ title: 快速开始
178197
```shell
179198
pytest -vs --disable-warnings
180199
```
200+
181201
:::

0 commit comments

Comments
 (0)