guzhi/README.md
mizhexiaoxiao ec2334034c Update
2023-08-16 16:10:16 +08:00

109 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p align="center">
<a href="https://github.com/mizhexiaoxiao/vue-fastapi-admin">
<img alt="Vue FastAPI Admin Logo" width="200" src="https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/web/src/assets/svg/logo.svg">
</a>
</p>
<h1 align="center">vue-fastapi-admin</h1>
基于FastAPI + Vue3 + Naive UI的现代化前后端分离开发平台融合了RBAC权限管理、动态路由和JWT鉴权助力中小型应用快速搭建。
### 登录页
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/login.jpg)
### 工作台
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/workbench.jpg)
### 用户管理
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/user.jpg)
### 角色管理
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/role.jpg)
### 菜单管理
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/menu.jpg)
### API管理
![image](https://github.com/mizhexiaoxiao/vue-fastapi-admin/blob/main/deploy/sample-picture/api.jpg)
### 快速开始
#### 方法一dockerhub拉取镜像
```sh
docker pull mizhexiaoxiao/vue-fastapi-admin:latest
docker run -d --restart=always --name=vue-fastapi-admin -p 9999:80 mizhexiaoxiao/vue-fastapi-admin
```
#### 方法二dockerfile构建镜像
##### docker安装(版本17.05+)
```sh
yum install -y docker-ce
systemctl start docker
```
##### 构建镜像
```sh
git clone https://github.com/mizhexiaoxiao/vue-fastapi-admin.git
cd vue-fastapi-admin
docker build --no-cache . -t vue-fastapi-admin
```
##### 启动容器
```sh
docker run -d --restart=always --name=vue-fastapi-admin -p 9999:80 vue-fastapi-admin
```
##### 访问
http://localhost:9999
usernameadmin
password123456
### 本地启动
#### 后端
启动项目需要以下环境:
- Python 3.11
- [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer)
1. 创建虚拟环境
```sh
poetry shell
```
2. 安装依赖
```sh
poetry install
```
3. 启动服务
```sh
make run
```
服务现在应该正在运行,访问 http://localhost:9999/docs 查看API文档
#### 前端
启动项目需要以下环境:
- node v18.8.0+
1. 进入前端目录
```sh
cd web
```
安装依赖(建议使用pnpm: https://pnpm.io/zh/installation)
```sh
npm i -g pnpm # 已安装可忽略
pnpm i # 或者 npm i
```
启动
```sh
pnpm dev
```