Skip to content
Public template

About

An Enterprise-Grade Full-Stack RBAC Permission Management System Built with Go + React.

Topics

Resources

Contributing

Stars

177 stars

Watchers

0 watching

Forks

Repository files navigation

Shadmin

An Enterprise-Grade Full-Stack RBAC Permission Management System Built with Go + React

English · 简体中文

Shadmin Showcase

Go React TypeScript License

Gin · Ent ORM · Casbin · Shadcn UI · TanStack Router · Tailwind CSS

✨ Features

  • 🏗️ Clean Architecture — Domain‑driven layered design (Controller → Usecase → Repository)
  • 🔐 RBAC with Casbin — Fine‑grained role‑based access control for APIs and menus
  • 🌗 Light & Dark Themes — Seamless theme switching with system preference detection
  • 📱 Responsive Design — Optimized for desktop, tablet, and mobile
  • 🔍 Global Search — Quick navigation across menus and resources
  • 📊 Dashboard — Data visualization with charts and statistics
  • 🗂️ Dynamic Menus — Backend‑driven menu tree with permission‑aware rendering
  • ⚡ Cacher — Supports Redis or go-cache, flexible and optional
  • 🗄️ Multi‑Database — SQLite (default), PostgreSQL, MySQL out of the box

🚀 Get Running

Prerequisites

  • Go: use the version declared in go.mod; SQLite requires a C compiler (CGO_ENABLED=1).
  • Node.js and pnpm: see engines and the pinned packageManager in frontend/package.json.

Run

git clone https://github.com/ahaodev/shadmin.git
cd shadmin

# Build the assets embedded in the backend.
cd frontend
pnpm install --frozen-lockfile
pnpm build
cd ..

# Generate the Ent code, which is not committed.
go generate ./ent
go run .

First launch creates .env, initializes SQLite, and seeds data. See .env.example for configuration.

Sign in at http://localhost:55667 (admin / admin123).

Development tools

For frontend development, keep the backend running and run pnpm dev in frontend/. Open http://localhost:5173; Vite proxies API requests to the backend. If you change the backend port, update the proxy in vite.config.ts.

Swagger is available at http://localhost:55667/swagger/index.html. To regenerate it after changing API annotations, install the version used by the Dockerfile, then run go generate ./...:

go install github.com/swaggo/swag/cmd/swag@v1.16.6
go generate ./...

📚 Documentation

📄 License

MIT

About

An Enterprise-Grade Full-Stack RBAC Permission Management System Built with Go + React.

Topics

Resources

Contributing

Stars

177 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages