{"id":23477102,"url":"https://github.com/coding-w/go-admin","last_synced_at":"2025-04-13T11:59:48.994Z","repository":{"id":258542100,"uuid":"859749315","full_name":"coding-w/go-admin","owner":"coding-w","description":"go-admin 是基于 Gin 和 Gorm 开发的管理系统，主要具备 JWT + Casbin 鉴权、动态路由、动态菜单以及文件上传下载等功能。该项目旨在学习和实践 Gin 的使用，源自于某开源项目的改进与扩展。","archived":false,"fork":false,"pushed_at":"2024-10-21T02:26:43.000Z","size":145,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T11:59:45.390Z","etag":null,"topics":["gin","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coding-w.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-19T08:04:56.000Z","updated_at":"2024-12-25T03:52:34.000Z","dependencies_parsed_at":"2024-10-21T13:16:38.098Z","dependency_job_id":null,"html_url":"https://github.com/coding-w/go-admin","commit_stats":null,"previous_names":["town-coding/go-admin","coding-w/go-admin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-w%2Fgo-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-w%2Fgo-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-w%2Fgo-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-w%2Fgo-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coding-w","download_url":"https://codeload.github.com/coding-w/go-admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710436,"owners_count":21149188,"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":["gin","go","golang"],"created_at":"2024-12-24T18:14:35.734Z","updated_at":"2025-04-13T11:59:48.967Z","avatar_url":"https://github.com/coding-w.png","language":"Go","readme":"## 1. 基本介绍\n\u003e go-admin 是基于 Gin 和 Gorm 开发的管理系统，主要具备 JWT + Casbin 鉴权、动态路由、动态菜单以及文件上传下载等功能。该项目旨在**学习和实践** Gin 的使用，源自于某开源项目的改进与扩展。\n\n## 2. 使用说明\n```\n- golang版本 \u003e= v1.22\n- IDE推荐：Goland\n```\n\n### 2.1 初始化项目\n```bash\n# 下载项目\ngit clone https://github.com/town-coding/go-admin\n# 进入项目文件夹\ncd go-admin\n# 使用 go mod 并安装go依赖包\ngo mod tidy\n# 修改config.yaml文件，配置数据库类型，配置数据信息\n# 初始化 数据库\ngo run main.go init\n# 启动项目\ngo run main.go\n```\n## 3. 技术选型\n- 后端：使用 Gin 构建基础的 RESTful 风格 API。\n- 数据库：项目集成 PostgreSQL 和 MySQL 作为数据存储，通过 Gorm 实现基本的数据库操作。\n- 日志：集成 Zap 实现高效的日志记录。\n- 缓存：使用 Redis 存储当前活跃用户的 JWT 令牌，并实现多点登录限制。\n- 其他中间件：\n  - 使用 Viper 动态读取系统配置，结合 Pflag 匹配命令行参数，并通过 Cobra 实现命令行操作。\n  - 集成 Cron 用于定时任务管理。\n\n## 4. 主要功能\n\n- 权限管理：基于 JWT 和 Casbin 实现的权限管理系统。\n- 多点登录：利用 JWT 令牌和 Redis 缓存实现多点登录功能。\n- 文件上传下载：支持基于阿里云和本地的文件上传操作。\n- 用户管理：系统管理员可分配用户角色及角色权限。\n- 角色管理：创建主要的权限控制对象，为角色分配不同的 API 权限和菜单权限。\n- 菜单管理：实现用户动态菜单配置，支持不同角色的菜单显示。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-w%2Fgo-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoding-w%2Fgo-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-w%2Fgo-admin/lists"}