12 Star 201 Fork 75

mizhexiaoxiao/vue-fastapi-admin

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

Vue FastAPI Admin Logo

vue-fastapi-admin

English | 简体中文

vue-fastapi-admin is a modern front-end and back-end separation development platform that combines FastAPI, Vue3, and Naive UI. It incorporates RBAC (Role-Based Access Control) management, dynamic routing, and JWT (JSON Web Token) authentication, making it ideal for rapid development of small to medium-sized applications and also serves as a valuable learning resource.

Features

  • Popular Tech Stack: The backend is developed with the high-performance asynchronous framework FastAPI using Python 3.11, while the front-end is powered by cutting-edge technologies such as Vue3 and Vite, complemented by the efficient package manager, pnpm.
  • Code Standards: The project is equipped with various plugins for code standardization and quality control, ensuring consistency and enhancing team collaboration efficiency.
  • Dynamic Routing: Backend dynamic routing combined with the RBAC model allows for fine-grained control of menus and routing.
  • JWT Authentication: User identity verification and authorization are handled through JWT, enhancing the application's security.
  • Granular Permission Control: Implements detailed permission management including button and interface level controls, ensuring different roles and users have appropriate permissions.

Live Demo

Screenshots

Login Page

Login Page

Workbench

Workbench

User Management

User Management

Role Management

Role Management

Menu Management

Menu Management

API Management

API Management

Quick Start

Please follow the instructions below for installation and configuration:

Method 1:dockerhub pull image

docker pull mizhexiaoxiao/vue-fastapi-admin:latest 
docker run -d --restart=always --name=vue-fastapi-admin -p 9999:80 mizhexiaoxiao/vue-fastapi-admin

Method 2: Build Image Using Dockerfile

Install Docker
yum install -y docker-ce
systemctl start docker
Build the Image
git clone https://github.com/mizhexiaoxiao/vue-fastapi-admin.git
cd vue-fastapi-admin
docker build --no-cache . -t vue-fastapi-admin
Start the Container
docker run -d --restart=always --name=vue-fastapi-admin -p 9999:80 vue-fastapi-admin
Access the Service

http://localhost:9999

username:admin

password:123456

Local Setup

Backend

The backend service requires the following environment:

  1. Create a Python virtual environment:
poetry shell
  1. Install project dependencies:
poetry install
  1. Start the backend service:
make run

The backend service is now running, and you can visit http://localhost:9999/docs to view the API documentation.

Frontend

The frontend project requires a Node.js environment (recommended version 18.8.0 or higher).

  • node v18.8.0+
  1. Navigate to the frontend project directory:
cd web
  1. Install project dependencies (pnpm is recommended: https://pnpm.io/zh/installation)
npm i -g pnpm # If pnpm is already installed, skip this step
pnpm i # Or use npm i
  1. Start the frontend development server:
pnpm dev

Directory Structure Explanation

├── app                   // Application directory
│   ├── api               // API interface directory
│   │   └── v1            // Version 1 of the API interfaces
│   │       ├── apis      // API-related interfaces
│   │       ├── base      // Base information interfaces
│   │       ├── menus     // Menu related interfaces
│   │       ├── roles     // Role related interfaces
│   │       └── users     // User related interfaces
│   ├── controllers       // Controllers directory
│   ├── core              // Core functionality module
│   ├── log               // Log directory
│   ├── models            // Data models directory
│   ├── schemas           // Data schema/structure definitions
│   ├── settings          // Configuration settings directory
│   └── utils             // Utilities directory
├── deploy                // Deployment related directory
│   └── sample-picture    // Sample picture directory
└── web                   // Front-end web directory
    ├── build             // Build scripts and configuration directory
    │   ├── config        // Build configurations
    │   ├── plugin        // Build plugins
    │   └── script        // Build scripts
    ├── public            // Public resources directory
    │   └── resource      // Public resource files
    ├── settings          // Front-end project settings
    └── src               // Source code directory
        ├── api           // API interface definitions
        ├── assets        // Static resources directory
        │   ├── images    // Image resources
        │   ├── js        // JavaScript files
        │   └── svg       // SVG vector files
        ├── components    // Components directory
        │   ├── common    // Common components
        │   ├── icon      // Icon components
        │   ├── page      // Page components
        │   ├── query-bar // Query bar components
        │   └── table     // Table components
        ├── composables   // Composable functionalities
        ├── directives    // Directives directory
        ├── layout        // Layout directory
        │   └── components // Layout components
        ├── router        // Routing directory
        │   ├── guard     // Route guards
        │   └── routes    // Route definitions
        ├── store         // State management (pinia)
        │   └── modules   // State modules
        ├── styles        // Style files directory
        ├── utils         // Utilities directory
        │   ├── auth      // Authentication related utilities
        │   ├── common    // Common utilities
        │   ├── http      // Encapsulated axios
        │   └── storage   // Encapsulated localStorage and sessionStorage
        └── views         // Views/Pages directory
            ├── error-page // Error pages
            ├── login      // Login page
            ├── profile    // Profile page
            ├── system     // System management page
            └── workbench  // Workbench page

Visitors Count

Loading
MIT License Copyright (c) 2023 mizhexiaoxiao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

⭐️ 基于FastAPI + Vue3 + Naive UI的现代化前后端分离管理平台,融合了RBAC权限管理、动态路由和JWT鉴权,助力中小型应用快速搭建,也可用于学习参考。 expand collapse
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mizhexiaoxiao/vue-fastapi-admin.git
git@gitee.com:mizhexiaoxiao/vue-fastapi-admin.git
mizhexiaoxiao
vue-fastapi-admin
vue-fastapi-admin
main

Search