Skip to content

一个基于 Golang 和 Vue3 的轻量级后台管理项目,前端技术栈:UnoCSS, UnoCSS UI,后端技术栈:Gin, Gorm, Rabbit。A backend management template based on Golang and Vue3.

License

Notifications You must be signed in to change notification settings

szluyu99/rabbit-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rabbit Admin

English | 简体中文

Rabbit Admin is a backend management template based on Golang and Vue3.

In addition to the basic technology stack, it is mainly based on the author's other open source projects:

  • The frontend component library uses unocss-ui
  • The backend framework is based on the scaffold rabbit

At present, the backend scaffolding is not yet stable, and I am still considering the design of certain modules.

Preview

ArticleList

Write

Tag

Permission

Config

Technology Stack

Frontend technology stack:

Backend technology stack:

Quick Start

Run the backend project:

git clone https://github.com/szluyu99/rabbit-admin.git

cd rabbit-admin/cmd
# MySQL
# Create the database rabbit_admin
go run . -d mysql -n "root:123456@tcp(127.0.0.1:3306)/rabbit_admin?charset=utf8mb4&parseTime=True&loc=Local"

# Sqlite
# No other actions are required
go run . -d sqlite -n "rabbit_admin.db"

You can directly run the run_mysql.sh or run_sqlite.sh file.

After running the backend project, create a super administrator account: admin@test.com, 123456

# MySQL
go run . -d mysql -n "root:123456@tcp(127.0.0.1:3306)/rabbit_admin?charset=utf8mb4&parseTime=True&loc=Local" -superuser admin@test.com  -password 123456

# Sqlite
go run . -d sqlite -n "rabbit_admin.db" -superuser admin@test.com -password 123456

You can directly run the createsuper_mysql.sh or createsuper_sqlite.sh file.


Run the frontend project:

cd rabbit-admin/web
npm install -g pnpm
pnpm install
pnpm run dev

Visit http://localhost:5173

Instructions

Instructions

By default, only the super administrator user can manage the permission module.

After logging in with the super administrator account, you can create roles on the Role page, assign permissions to roles on the Permission page, and finally assign roles to users on the User page (or set the default role when creating a user on the Config page).

  1. Run the project and create a super administrator account, then log in to the system.

  2. Go to the Permission page and click the initialize button to initialize default permissions.

  3. Go to the Role page and click the initialize button to initialize three default roles: admin, user, test.

  • You can then assign permissions to roles and also assign roles to users on the User page.
  1. Go to the Config page to view the project's default configuration:
  • USER_NEED_ACTIVATE: whether users need to be activated
  • API_NEED_AUTH: whether APIs need to be authenticated. If set to false, all APIs do not require authentication.
  • CREATE_DEFAULT_ROLE: the name of the default role when creating a user, which needs to exist in Role.

If using MySQL, you can directly import the rabbit_admin.sql.

  1. Log out of the current account, or open a new browser (or incognito window) and register a new account, then log in.

  2. The default permission level for a new account is "user" (set by CREATE_DEFAULT_ROLE in the Config page).

  3. If no permissions are assigned to a role by default, a newly created account can only access APIs with "Anonymous" permissions.

About

一个基于 Golang 和 Vue3 的轻量级后台管理项目,前端技术栈:UnoCSS, UnoCSS UI,后端技术栈:Gin, Gorm, Rabbit。A backend management template based on Golang and Vue3.

Resources

License

Stars

Watchers

Forks