{"id":13573989,"url":"https://github.com/gnimli/go-web-mini","last_synced_at":"2025-04-09T18:21:19.311Z","repository":{"id":50550819,"uuid":"329175535","full_name":"gnimli/go-web-mini","owner":"gnimli","description":"Go + Vue开发的管理系统脚手架, 前后端分离, 仅包含项目开发的必需部分, 基于角色的访问控制(RBAC), 分包合理, 精简易于扩展。 后端Go包含了gin、 gorm、 jwt和casbin等的使用, 前端Vue基于vue-element-admin开发","archived":false,"fork":false,"pushed_at":"2021-02-27T10:36:23.000Z","size":3071,"stargazers_count":278,"open_issues_count":4,"forks_count":83,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T12:53:52.098Z","etag":null,"topics":["casbin","gin","go","jwt","rbac","vue"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnimli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-13T02:52:45.000Z","updated_at":"2025-04-01T03:17:11.000Z","dependencies_parsed_at":"2022-08-12T21:40:44.455Z","dependency_job_id":null,"html_url":"https://github.com/gnimli/go-web-mini","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnimli%2Fgo-web-mini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnimli%2Fgo-web-mini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnimli%2Fgo-web-mini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnimli%2Fgo-web-mini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnimli","download_url":"https://codeload.github.com/gnimli/go-web-mini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085486,"owners_count":21045168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["casbin","gin","go","jwt","rbac","vue"],"created_at":"2024-08-01T15:00:44.671Z","updated_at":"2025-04-09T18:21:19.294Z","avatar_url":"https://github.com/gnimli.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ego-web-mini\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\nGo + Vue开发的管理系统脚手架, 前后端分离, 仅包含项目开发的必需部分, 基于角色的访问控制(RBAC), 分包合理, 精简易于扩展。 后端Go包含了gin、 gorm、 jwt和casbin等的使用, 前端Vue基于vue-element-admin开发: https://github.com/gnimli/go-web-mini-ui.git\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/github/go-mod/go-version/gnimli/go-web-mini\" alt=\"Go version\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/Gin-1.6.3-brightgreen\" alt=\"Gin version\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/Gorm-1.20.12-brightgreen\" alt=\"Gorm version\"/\u003e\n\u003cimg src=\"https://img.shields.io/github/license/gnimli/go-web-mini\" alt=\"License\"/\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## 特性\n\n- `Gin` 一个类似于martini但拥有更好性能的API框架, 由于使用了httprouter, 速度提高了近40倍\n- `MySQL` 采用的是MySql数据库\n- `Jwt` 使用JWT轻量级认证, 并提供活跃用户Token刷新功能\n- `Casbin` Casbin是一个强大的、高效的开源访问控制框架，其权限管理机制支持多种访问控制模型\n- `Gorm` 采用Gorm 2.0版本开发, 包含一对多、多对多、事务等操作\n- `Validator` 使用validator v10做参数校验, 严密校验前端传入参数\n- `Lumberjack` 设置日志文件大小、保存数量、保存时间和压缩等\n- `Viper` Go应用程序的完整配置解决方案, 支持配置热更新\n- `GoFunk` 包含大量的Slice操作方法的工具包\n\n## 中间件\n\n- `AuthMiddleware` 权限认证中间件 -- 处理登录、登出、无状态token校验\n- `RateLimitMiddleware` 基于令牌桶的限流中间件 -- 限制用户的请求次数\n- `OperationLogMiddleware` 操作日志中间件 -- 记录所有用户操作\n- `CORSMiddleware` -- 跨域中间件 -- 解决跨域问题\n- `CasbinMiddleware` 访问控制中间件 -- 基于Casbin RBAC, 精细控制接口访问\n\n## 项目截图\n\n![登录](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/login.PNG)\n![用户管理](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/user.PNG)\n![角色管理](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/role.PNG)\n![角色权限](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/rolePermission.PNG)\n![菜单管理](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/menu.PNG)\n![API管理](https://github.com/gnimli/go-web-mini-ui/blob/main/src/assets/GithubImages/api.PNG)\n\n## 项目结构概览\n\n```\n├─common # casbin mysql zap validator 等公共资源\n├─config # viper读取配置\n├─controller # controller层，响应路由请求的方法\n├─dto # 返回给前端的数据结构\n├─middleware # 中间件\n├─model # 结构体模型\n├─repository # 数据库操作\n├─response # 常用返回封装，如Success、Fail\n├─routes # 所有路由\n├─util # 工具方法\n└─vo # 接收前端请求的数据结构\n\n```\n## 前端Vue项目\n    go-web-mini-ui \n\u003chttps://github.com/gnimli/go-web-mini-ui.git\u003e\n\n## TODO\n\n- 增加图片服务器\n- 增加promtail-loki-grafana日志监控系统\n- 增加swagger文档\n\n## MIT License\n\n    Copyright (c) 2021 gnimli\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnimli%2Fgo-web-mini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnimli%2Fgo-web-mini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnimli%2Fgo-web-mini/lists"}