基于 Gin + GORM + Casbin + Ant Design React 实现的RBAC权限管理脚手架,目的是提供一套轻量的中后台开发框架,方便、快速的完成业务需求的开发。
- 在线演示地址 (用户名:root,密码:abc-123)(
温馨提醒:为了达到更好的演示效果,这里给出了拥有最高权限的用户,请手下留情,只操作自己新增的数据,不要动平台本身的数据!谢谢!
) - Swagger 文档地址
特性
- 遵循 RESTful API 设计规范
- 基于 Casbin 的 RBAC 访问控制模型
- 存储分离(存储层对外采用接口的方式供业务层调用,实现了存储层的完全隔离,可以非常方便的更换存储方式)
- 支持统一的事务管理
- 日志追踪(基于logrus,日志钩子支持 gorm)
- JWT 认证(采用黑名单方式,存储支持:file/redis)
- 支持 Swagger 文档
- 依赖注入
- 支持跨域请求
- 支持请求频次限制
- 支持静态站点
- 单元测试
casbin群向大佬发来问候。
/home/yanzhengke/gowork/src/github.com/LyricTian/gin-admin/web/node_modules/signale/signale.js:15 constructor(options = {}) { ^
SyntaxError: Unexpected token = at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object.<anonymous> (/home/yanzhengke/gowork/src/github.com/LyricTian/gin-admin/web/node_modules/signale/index.js:2:17) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)
npm ERR! Linux 4.15.0-47-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "--registry=https://registry.npm.taobao.org" "--cache=/home/yanzhengke/.npm/.cache/cnpm" "--disturl=https://npm.taobao.org/dist" "--userconfig=/home/yanzhengke/.cnpmrc" "start" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE npm ERR! web@2.0.0 start:
umi dev
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the web@2.0.0 start script 'umi dev'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the web package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! umi dev npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs web npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls web npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /home/yanzhengke/gowork/src/github.com/LyricTian/gin-admin/web/npm-debug.log