An Enterprise-Grade Full-Stack RBAC Permission Management System Built with Go + React
English · 简体中文
Gin · Ent ORM · Casbin · Shadcn UI · TanStack Router · Tailwind CSS
- 🏗️ 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
- Go: use the version declared in go.mod; SQLite requires a C compiler (
CGO_ENABLED=1). - Node.js and pnpm: see
enginesand the pinnedpackageManagerin frontend/package.json.
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).
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 ./...