Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-21 19:39:19 +08:00
v3-admin-vite/README.md

228 lines
5.6 KiB
Markdown
Raw Normal View History

2022-10-13 17:44:39 +08:00
<div align="center">
2024-12-05 17:10:34 +08:00
<img alt="logo" width="120" height="120" src="./src/common/assets/images/layouts/logo.png">
2022-10-13 17:44:39 +08:00
<h1>V3 Admin Vite</h1>
</div>
2024-12-05 17:34:43 +08:00
[![github release](https://img.shields.io/github/v/release/un-pany/v3-admin-vite?style=flat)](https://github.com/un-pany/v3-admin-vite/releases)
[![github stars](https://img.shields.io/github/stars/un-pany/v3-admin-vite?style=flat)](https://github.com/un-pany/v3-admin-vite/stargazers)
2024-12-05 17:10:34 +08:00
[![gitee stars](https://gitee.com/un-pany/v3-admin-vite/badge/star.svg)](https://gitee.com/un-pany/v3-admin-vite/stargazers)
2024-12-05 16:24:10 +08:00
<b>English | <a href="./README.zh-CN.md">中文</a></b>
2022-09-30 12:23:35 +08:00
2024-12-05 16:24:10 +08:00
## Introduction
2022-04-21 18:45:27 +08:00
2025-02-11 16:33:09 +08:00
V3 Admin Vite is a well-crafted backend management system template, built with popular technologies such as Vue3, Vite, TypeScript, and Element Plus
2022-04-21 18:45:27 +08:00
2024-12-05 16:24:10 +08:00
## Notifications
2023-08-11 09:34:15 +08:00
2024-12-05 16:24:10 +08:00
> [!NOTE]
> Powered by love! All source code is free and open-source. If you find it helpful, feel free to give a star to support!
2023-08-11 11:00:31 +08:00
2024-12-05 16:24:10 +08:00
> [!IMPORTANT]
> Welcome to experience the brand-new version 5.0, currently in the beta stage. It will be a masterpiece!
2023-08-11 11:00:31 +08:00
2024-12-05 16:24:10 +08:00
> [!WARNING]
> Version 4.x will no longer be maintained unless there are critical bugs! [Click to switch to the 4.x branch](https://github.com/un-pany/v3-admin-vite/tree/4.x)
2023-08-11 11:00:31 +08:00
2024-12-05 16:24:10 +08:00
> [!TIP]
> Paid services are officially launched! If you dont want to do it yourself but want to remove TS or other modules, try the lazy package! [Click to check it out](https://github.com/un-pany/v3-admin-vite/issues/225)
2023-08-11 09:34:15 +08:00
2025-03-21 19:23:08 +08:00
> [!TIP]
> If you have mobile web app needs, try the new open-source template. [MobVue](https://github.com/un-pany/mobvue)
2024-12-05 16:24:10 +08:00
## Usage
2023-08-10 18:22:32 +08:00
2024-12-05 16:24:10 +08:00
<details>
<summary>Recommended Environment</summary>
2023-08-10 18:22:32 +08:00
2024-12-05 16:24:10 +08:00
<br>
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
- Latest version of `Visual Studio Code`
- Install the recommended plugins in the `.vscode/extensions.json` file
- `node` 20.x or 22+
2025-02-06 11:02:19 +08:00
- `pnpm` 9.x or 10+
2022-06-13 18:26:45 +08:00
2024-12-05 16:24:10 +08:00
</details>
2022-04-23 10:09:03 +08:00
2024-12-05 16:24:10 +08:00
<details>
<summary>Local Development</summary>
2022-04-23 10:09:03 +08:00
2024-12-05 16:24:10 +08:00
<br>
2022-04-22 19:09:33 +08:00
```bash
2024-12-05 16:24:10 +08:00
# Clone the project
2022-04-22 19:09:33 +08:00
git clone https://github.com/un-pany/v3-admin-vite.git
2024-12-05 16:24:10 +08:00
# Enter the project directory
2022-04-22 19:09:33 +08:00
cd v3-admin-vite
2024-12-05 16:24:10 +08:00
# Install dependencies
2022-04-22 19:09:33 +08:00
pnpm i
2024-12-05 16:24:10 +08:00
# Start the development server
2022-04-22 19:09:33 +08:00
pnpm dev
```
2024-12-05 16:24:10 +08:00
</details>
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
<details>
2024-12-05 17:10:34 +08:00
<summary>Build</summary>
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
<br>
2022-04-22 19:09:33 +08:00
```bash
2024-12-05 16:24:10 +08:00
# Build for the staging environment
pnpm build:staging
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
# Build for the production environment
pnpm build
2022-04-22 19:09:33 +08:00
```
2024-12-05 16:24:10 +08:00
</details>
<details>
<summary>Local Preview</summary>
<br>
2022-04-22 19:09:33 +08:00
```bash
2024-12-05 16:24:10 +08:00
# Execute the build command first to generate the dist directory, then run the preview command
pnpm preview
```
</details>
<details>
<summary>Code Check</summary>
<br>
```bash
# Code linting and formatting
2022-04-22 19:09:33 +08:00
pnpm lint
2023-02-16 14:38:21 +08:00
2024-12-05 16:24:10 +08:00
# Unit tests
2023-02-16 14:38:21 +08:00
pnpm test
2022-04-22 19:09:33 +08:00
```
2024-12-05 16:24:10 +08:00
</details>
2022-10-12 17:30:08 +08:00
2024-12-05 16:24:10 +08:00
<details>
<summary>Commit Guidelines</summary>
2022-10-12 17:30:08 +08:00
2024-12-05 16:24:10 +08:00
<br>
2022-12-30 17:55:09 +08:00
2024-12-05 16:24:10 +08:00
`feat` New feature
2022-12-30 17:55:09 +08:00
2024-12-05 16:24:10 +08:00
`fix` Bug fix
2022-10-14 10:02:09 +08:00
2024-12-05 16:24:10 +08:00
`perf` Performance improvement
2022-10-14 10:02:09 +08:00
2024-12-05 16:24:10 +08:00
`refactor` Code refactoring
`docs` Documentation and comments
`types` Type-related changes
`test` Unit tests related
`ci` Continuous integration, workflows
`revert` Revert changes
`chore` Chores (update dependencies, modify configurations, etc)
</details>
## Links
2025-03-01 11:12:30 +08:00
**Online Preview**: [github-pages](https://un-pany.github.io/v3-admin-vite)
2024-12-05 16:24:10 +08:00
2025-03-01 11:12:30 +08:00
**Chinese Documentation**: [link](https://juejin.cn/post/7089377403717287972)
2024-12-05 16:24:10 +08:00
2025-03-01 11:12:30 +08:00
**Zero to Hero Tutorial**: [link](https://juejin.cn/column/7207659644487139387)
2024-12-05 16:24:10 +08:00
2025-03-01 11:08:17 +08:00
**Mobile Web App**: [mobvue](https://github.com/un-pany/mobvue)
2024-12-05 16:24:10 +08:00
**Electron Desktop Version**: [v3-electron-vite](https://github.com/un-pany/v3-electron-vite)
2025-03-01 11:12:30 +08:00
**Chinese Repository**: [gitee](https://gitee.com/un-pany/v3-admin-vite)
2024-12-05 16:24:10 +08:00
2025-03-01 11:12:30 +08:00
**Optional Group**: [check how to join](https://github.com/un-pany/v3-admin-vite/issues/191)
2022-10-14 10:02:09 +08:00
2025-03-01 11:12:30 +08:00
**Donations**: [buy a coffee for the author](https://github.com/un-pany/v3-admin-vite/issues/69)
2022-11-07 17:44:48 +08:00
2025-03-01 11:12:30 +08:00
**Releases & Changelog**: [releases](https://github.com/un-pany/v3-admin-vite/releases)
2022-11-07 17:44:48 +08:00
2024-12-05 16:24:10 +08:00
## Features
2023-04-12 18:07:07 +08:00
2024-12-05 16:24:10 +08:00
**Simplified structure**: No complex encapsulation, no complicated type gymnastics, just enough to meet the needs
2023-04-12 18:07:07 +08:00
2024-12-05 16:24:10 +08:00
**Detailed comments**: Every configuration item comes with as detailed comments as possible
2022-10-12 17:30:08 +08:00
2024-12-05 16:24:10 +08:00
**Latest dependencies**: Keeps all third-party dependencies up to date
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
**Consistency**: Unified code style, naming conventions, and comment style
## Built-in Features
**User Management**: Login, logout demonstration
2025-02-18 11:46:05 +08:00
**Permission Management**: Page-level permissions (dynamic routing), button-level permissions (permission directives, permission functions), route guards
2024-12-05 16:24:10 +08:00
**Multiple Environments**: Development, staging, and production environments
**Multiple Themes**: Normal, dark, and deep blue themes
**Multiple Layouts**: Left-side, top, and hybrid layouts
**Homepage**: Different dashboard pages for different users
**Error Pages**: 403, 404
**Mobile Compatibility**: Layouts compatible with mobile screen resolutions
**Others**: SVG sprite sheet, dynamic sidebar, dynamic breadcrumbs, tab navigation, content zoom and fullscreen, composable functions
## Tech Stack
**Vue3**: Vue3 + script setup with the latest Vue3 Composition API
**Element Plus**: The Vue3 version of Element UI
**Pinia**: The legendary Vuex5
**Vite**: Really fast
**Vue Router**: The routing system
**TypeScript**: A superset of JavaScript
**pnpm**: A faster, disk-space-saving package manager
**Scss**: Consistent with Element Plus
**CSS Variables**: Primarily controls layout and color in the project
2025-03-08 15:46:30 +08:00
**ESLint**: Code linting and formatting
2024-12-05 16:24:10 +08:00
2024-12-05 17:10:34 +08:00
**Axios**: Sends network requests
2024-12-05 16:24:10 +08:00
**UnoCSS**: A high-performance, flexible atomic CSS engine
## Project Preview Image
![preview](./src/common/assets/images/docs/preview.png)
## Contributors
A big thank you to all the contributors!
<a href="https://github.com/un-pany/v3-admin-vite/graphs/contributors">
<img src="https://contrib.rocks/image?repo=un-pany/v3-admin-vite">
</a>
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
## License
2022-04-22 19:09:33 +08:00
2024-12-05 16:24:10 +08:00
[MIT](./LICENSE) License © 2022-PRESENT [pany](https://github.com/pany-ang)