{"id":15285737,"url":"https://github.com/changsz/mall-go","last_synced_at":"2025-04-28T16:11:15.889Z","repository":{"id":236212384,"uuid":"777519933","full_name":"ChangSZ/mall-go","owner":"ChangSZ","description":"电商系统的后台管理系统，包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块","archived":false,"fork":false,"pushed_at":"2024-10-16T06:53:09.000Z","size":3559,"stargazers_count":37,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-30T11:11:11.304Z","etag":null,"topics":["gin","go","gorm","mall","mysql","redis","swagger-ui","trace","websocket"],"latest_commit_sha":null,"homepage":"http://mall.water-melon.top","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/ChangSZ.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T02:05:33.000Z","updated_at":"2025-03-23T17:35:45.000Z","dependencies_parsed_at":"2024-05-20T04:22:35.899Z","dependency_job_id":"3c839614-41d3-4d76-807f-20c9e8f50705","html_url":"https://github.com/ChangSZ/mall-go","commit_stats":{"total_commits":116,"total_committers":2,"mean_commits":58.0,"dds":0.1637931034482759,"last_synced_commit":"78a99c70879859ab856e96ac3125432b4700fa6f"},"previous_names":["changsz/mall-go"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChangSZ%2Fmall-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChangSZ%2Fmall-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChangSZ%2Fmall-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChangSZ%2Fmall-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChangSZ","download_url":"https://codeload.github.com/ChangSZ/mall-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251342724,"owners_count":21574245,"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","gorm","mall","mysql","redis","swagger-ui","trace","websocket"],"created_at":"2024-09-30T15:07:24.237Z","updated_at":"2025-04-28T16:11:15.873Z","avatar_url":"https://github.com/ChangSZ.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 关于\n\n`go-mall` 是基于 [gin-boilerplate](https://github.com/ChangSZ/gin-boilerplate) 框架实现的一套电商系统的后台管理系统，包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。\n\n\n\u003e - **快速体验admin** --\u003e [在线访问地址](http://mall.water-melon.top/admin) \n\u003e - **快速体验app**   --\u003e [在线访问地址](http://mall.water-melon.top/app)\n\n\u003c/br\u003e\n! 本项目暂未未包含任何效果图, 可以去源项目查看, 链接如下:\n\n本项目是对[macrozheng/mall](https://github.com/macrozheng/mall)商城项目后端代码的重构 ==\u003e [进度](./note.md)\n\nmall_admin前端 --\u003e [mall-admin-web](https://github.com/ChangSZ/mall-admin-web) \n\nmall_portal(app)前端 --\u003e [mall-app-web](https://github.com/ChangSZ/mall-app-web)\n\u003chr/\u003e\n\n## 友情提示\n铁子们, 当前mall_admin、mall_portal基本功能均已OK, 使用中暂未发现问题, 我还未进行覆盖性测试, 你们可以搭建前后端自己先玩着. 有问题麻烦狠狠issue\n\n工程相关文档后期会逐步补充完善\n\n推荐先mark吧🤩, 靠谱楼主, 会持续更新的~\n\n\u003c/br\u003e\n\n## 技术选型\n\n### 后端技术\n\n| 技术                 | 说明               | 官网                                       |\n| -------------------- | ------------------ | ------------------------------------------ |\n| Gin-Boilerplate      | Web应用开发框架    | https://github.com/ChangSZ/gin-boilerplate |\n| Gorm                 | ORM框架            | https://github.com/go-gorm/gorm            |\n| Golib                | 工具包集合         | https://github.com/ChangSZ/golib           |\n| Elasticsearch        | 搜索引擎           | https://github.com/elastic/elasticsearch   |\n| RabbitMQ             | 消息队列           | https://www.rabbitmq.com/                  |\n| Redis                | 内存数据存储       | https://redis.io/                          |\n| MongoDB              | NoSql数据库        | https://www.mongodb.com                    |\n| LogStash             | 日志收集工具       | https://github.com/elastic/logstash        |\n| Kibana               | 日志可视化查看工具 | https://github.com/elastic/kibana          |\n| Nginx                | 静态资源服务器     | https://www.nginx.com/                     |\n| Docker               | 应用容器引擎       | https://www.docker.com                     |\n| Jenkins              | 自动化部署工具     | https://github.com/jenkinsci/jenkins       |\n| MinIO                | 对象存储           | https://github.com/minio/minio             |\n| JWT                  | JWT登录支持        | https://github.com/golang-jwt/jwt          |\n| Swagger-UI           | API文档生成工具    | https://github.com/swagger-api/swagger-ui  |\n| Hibernator-Validator | 验证框架           | https://github.com/go-playground/validator |\n| Websocket            | websocket          | https://github.com/gorilla/websocket       |\n| Trace                | 链路追踪           | https://go.opentelemetry.io                |\n\n### 前端技术\n\n| 技术       | 说明                  | 官网                                   |\n| ---------- | --------------------- | -------------------------------------- |\n| Vue        | 前端框架              | https://vuejs.org/                     |\n| Vue-router | 路由框架              | https://router.vuejs.org/              |\n| Vuex       | 全局状态管理框架      | https://vuex.vuejs.org/                |\n| Element    | 前端UI框架            | https://element.eleme.io               |\n| Axios      | 前端HTTP框架          | https://github.com/axios/axios         |\n| v-charts   | 基于Echarts的图表框架 | https://v-charts.js.org/               |\n| Js-cookie  | cookie管理工具        | https://github.com/js-cookie/js-cookie |\n| nprogress  | 进度条控件            | https://github.com/rstacruz/nprogress  |\n\n### 移动端技术\n\n| 技术         | 说明             | 官网                                    |\n| ------------ | ---------------- | --------------------------------------- |\n| Vue          | 核心前端框架     | https://vuejs.org                       |\n| Vuex         | 全局状态管理框架 | https://vuex.vuejs.org                  |\n| uni-app      | 移动端前端框架   | https://uniapp.dcloud.io                |\n| mix-mall     | 电商项目模板     | https://ext.dcloud.net.cn/plugin?id=200 |\n| luch-request | HTTP请求框架     | https://github.com/lei-mu/luch-request  |\n\n\n### 架构图\n\n#### 系统架构图\n\n![系统架构图](./docs/resource/re_mall_system_arch.jpg)\n\n#### 业务架构图\n\n![业务架构图](./docs/resource/re_mall_business_arch.jpg)\n\n\u003chr/\u003e\n\n## 快速开始\n### 拉取代码\n```bash\n$ git clone https://github.com/ChangSZ/mall-go.git\n$ cd mall-go\n```\n\n### 环境准备\n```bash\n# 启动mysql、redis等中间件(也可以选择其他方式)\n$ docker-compose -f deploy/docker-compose-env.yml up -d\n# sql文件拷贝进mysql镜像中\n$ docker cp internal/proposal/tablesqls/mall.sql mysql:/\n# 进入mysql容器\n$ docker exec -it mysql bash\n# 登录数据库\n$ mysql -u root -proot\n# 创建数据库并退出登录\n$ CREATE DATABASE api;  # 框架使用\n$ CREATE DATABASE mall; \n$ exit;\n# 数据导入\n$ mysql -u root -p mall \u003c mall.sql\n```\n\n### 开始运行\n```bash\n# 运行GO框架\n$ go run main.go -env fat  \n# 运行mall_admin\n$ go run cmd/mall_admin/main.go -env fat\n# 运行mall_portal\n$ go run cmd/mall_portal/main.go -env fat\n# -env 表示设置哪个环境，主要是区分使用哪个配置文件，默认为 fat\n```\n\n## Go框架\n### 安装界面\n首次启动程序之后，会在浏览器中自动打开安装界面，[链接地址](http://127.0.0.1:8080/render/install)\n\n重新启动程序，会在浏览器中自动打开登录界面，[链接地址](http://127.0.0.1:8080)\n\n输入默认账号 admin，密码 admin 即可登录成功\n\n如果想重新安装，删除INSTALL.lock文件即可。该文件存在即认为无需安装。\n\n### 格式化代码\n```bash\n  go run cmd/mfmt/main.go\n```\n\n### 重点使用\n- 代码生成器\n  - 生成数据表CURD - 选择对应的mysql数据表即可\n  - 生成控制器方法 - 输入相对于/internal/api的目录路径即可\n- 查询小助手\n- 其他的可以用来学习娱乐\n\n### 详细使用介绍\n参见[go框架: gin-boilerplate](https://water-melon.top/detail/10)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangsz%2Fmall-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchangsz%2Fmall-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangsz%2Fmall-go/lists"}