Open-source project
go-admin-team/go-admin avatar
go-admin-team/go-admin

go-admin: a Gin + Vue admin scaffold with Casbin RBAC and a code generator

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;项目文档》:https://www.go-admin.pro Demo: https://vue.go-admin.pro Antd PRO:https://antd.go-admin.pro

12,788 stars2,594 forksGoMIT

At a glance

What is it?
go-admin-team/go-admin is a front-end and back-end separated admin scaffold built on Gin, GORM and Vue, with JWT auth, Casbin role control, a code generator and a form builder. It saves boilerplate for internal tools, and it asks you to accept its opinions about structure.
Who is it for?
Adopt go-admin if you need a Go admin panel with working RBAC, multi-tenant user management and a code generator, and you accept its project layout. Do not adopt it if you want a library you can drop into an existing service, or if you cannot commit to keeping the Go and pnpm toolchains current.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What go-admin actually removes from the work

Every internal tool starts with the same list: users, roles, menus, permissions, login logs, an audit trail, a settings page. go-admin ships that list as a running application. The README describes it as a front-end and back-end separated authority management system, and the internal feature list names user management, department management, position management, menu management, role management, dictionary management, parameter management, operation log, login log and service monitoring.

The audience is a Go team that has been told to build an admin console and would rather not write Casbin wiring, JWT refresh handling and a Vue shell from scratch. Because the front end is a separate repository (go-admin-team/go-admin-ui), a team that already has a Vue application can point it at the API instead of adopting the supplied UI. The scaffold is opinionated about where things live, and that is the trade: you get a working system on day one, and you inherit its decisions.

The Gin, GORM and Casbin layering

The backend is a Gin application. The README lists middleware for user authentication, cross-domain requests, access logs and a tracking ID, and the go.mod file confirms the pieces: gin-gonic/gin, casbin/casbin/v3, gorm.io/gorm with drivers for MySQL, PostgreSQL, SQLite and SQL Server, robfig/cron/v3 for scheduled tasks, swaggo for Swagger output, and prometheus/client_golang for metrics.

Authorization is a Casbin RBAC model, and the README says role management assigns menu permissions and splits data scope by organization. That is the part that usually takes the longest to get right, and it is already wired. Persistence goes through GORM, which is why the database list is four drivers rather than one. Configuration is a YAML file mapped onto a struct, which the README calls simple model mapping, so adding a setting means adding a field rather than parsing a string.

The repository also carries a Dockerfile and a docker-compose.yml. Both are worth reading before you deploy, because they encode assumptions about how the process shuts down.

Installing go-admin and starting the API

The README states the environment requirements as Go 1.26.5, Node v22 or newer with v24 LTS recommended, and pnpm v9 or newer for the UI project. Both repositories must sit in the same parent folder. The commands below are the ones the README gives.

bash
mkdir goadmin
cd goadmin
git clone https://github.com/go-admin-team/go-admin.git
git clone https://github.com/go-admin-team/go-admin-ui.git

Build the backend. The README warns that on Windows without CGO the SQLite driver fails to link, showing a cgo exec error, so a pure-Go build path matters there.

bash
cd ./go-admin
go mod tidy
go build

Before the first start you edit config/settings.yml, which the README identifies as the file holding the database connection under settings.database, and confirm the log path.

bash
vi ./config/settings.yml

The service starts through a subcommand rather than a bare binary, which is the multi-command mode the README mentions. The Dockerfile shows the shape: the binary is invoked as /main with the server subcommand and an explicit config path.

bash
./main server -c /config/settings.yml

If you prefer containers, the compose file publishes port 8000 and mounts ./config/, ./static/ and ./temp/ into the container. The README points at two hosted demos, vue.go-admin.pro and antd.go-admin.pro, both with the account admin and password 123456, if you want to see the finished UI before installing anything.

Where go-admin is the wrong tool

Two limits stand out. The first is the shutdown path. The compose file sets stop_grace_period to 30s and carries a comment explaining that the process spends its exit time in a drain, then the server, then cleanup callbacks, and that past the deadline it receives SIGKILL and the cleanup callbacks are cut off part-way. The Makefile makes the same point about docker rm -f, noting that the force flag kills a running container with no grace at all. If your orchestrator gives containers ten seconds by default, you will truncate that sequence. This is a configuration problem rather than a design flaw, but it is one you have to notice.

The second is scope. go-admin is a scaffold, not a library. There is no documented path for adding its RBAC or its user tables to an existing Gin service without adopting the application layout, and the README does not describe one. If you have a service in production and want to bolt on an admin panel, you are comparing this against writing the middleware yourself, not against an import. The README also lists unit tests as a TODO, so the test suite is not something you can lean on as a specification of behaviour.

How go-admin differs from a Rails or Django admin

The closest comparison for most teams is Django admin or Rails scaffolding, because all three generate CRUD screens from a data model. The difference is where the generation happens. Django and Rails derive admin pages from model definitions inside the framework, so the model is the single source of truth and the admin is a view onto it.

go-admin inverts that. The README describes a code generation tool that reads a data table structure and produces the add, delete, modify and query business code, plus a form builder where you drag components to lay out a page. The output is Go source and Vue files that you then own and edit. That suits teams that want to read and change the generated code, and it frustrates teams that expect the admin to update itself when a column is added. There is also a content management module in the repository that the README labels a demo, which is a reasonable place to look at generated output before running the generator on your own schema.

Maintenance, upgrades and the MIT licence

The last push to the default branch was on 2026-09-20, and the three most recent releases are v2.6.0 on 2026-08-31, v2.5.0 on 2026-08-27 and v2.4.0 on 2026-08-16. The repository is not archived. That cadence matters because the dependency list is broad: Casbin v3, Gin 1.12, GORM 1.31, four database drivers, three cloud storage SDKs (Aliyun OSS, Huawei OBS, Qiniu), Sentinel, Prometheus and Swagger. Each of those moves on its own schedule, and go.mod pins them. Check that your database driver is among mysql, postgres, sqlite or sqlserver before you plan an upgrade.

The licence is MIT, which the README badge links to and which the repository carries as LICENSE.md. MIT is permissive: it allows use, modification and redistribution with the copyright notice and permission notice retained. It gives no patent grant and no warranty, and it says nothing about the front-end repository, so confirm the licence on go-admin-team/go-admin-ui separately if you redistribute the UI. This is a description of the licence text, not legal advice; your own counsel should review how you ship it.

Editorial conclusion

Adopt go-admin if you need a Go admin panel with working RBAC, multi-tenant user management and a code generator, and you accept its project layout. Do not adopt it if you want a library you can drop into an existing service, or if you cannot commit to keeping the Go and pnpm toolchains current. Verify first that your database driver is one of the four in go.mod, that your deployment handles the shutdown grace period, and that the licence terms fit how you ship.

Frequently asked questions

What is go-admin?

It is a front-end and back-end separated authority management system built on Gin, Vue and either Element UI, Arco Design or Ant Design. It ships user, role, menu, department and log management, Casbin RBAC, JWT authentication, a code generator and a form builder.

How do I log in to the go-admin demo?

The README lists two hosted demos, vue.go-admin.pro for the Element Plus Vue 3 build and antd.go-admin.pro for the Ant Design build. Both use the account admin with the password 123456.

Which database drivers does go-admin support?

The go.mod file requires GORM drivers for MySQL, PostgreSQL, SQLite and SQL Server. The README says you set the connection under settings.database in config/settings.yml, and that the GORM storage layer can be extended to other databases.

What Go and Node versions does go-admin require?

The README states Go 1.26.5, Node v22 or newer with v24 LTS recommended, and pnpm v9 or newer for the UI project. The go.mod file declares go 1.26.5 as well.

Why does go-admin fail to build on Windows?

The README shows a cgo exec error from go-sqlite3 when CGO is not installed, with messages about a missing cc or gcc. The Makefile offers a build-sqlite target that passes the sqlite3 build tag, and a build target that sets CGO_ENABLED=0.

Official sources

  1. go-admin-team/go-admin on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/go-admin-team-go-admin.svg)](https://hysenlabs.com/projects/go-admin-team-go-admin)