Home

Awesome

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:

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.

  1. Go to the Config page to view the project's default configuration:

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.