谷粒商城项目是一套电商项目,包括前台商城系统以及后台管理系统,
- 原项目基于 SpringCloud、SpringCloud Alibaba、MyBatis Plus实现。前台商城系统包括:用户登录、注册、商品搜索、商品详情、购物车、订单、秒杀活动等模块。后台管理系统包括:系统管理、商品系统、优惠营销、库存系统、订单系统、用户系统、内容管理等七大模块。
- 本项目使用 golang(go-micro) + php(laravel) + vue(vant)实现
支付模块使用以太币(
ethereum) 需要在浏览器中安装 Metamask 插件 https://metamask.io/
├── admin # 后台
├── gateway # 服务网关
├── services # 所有服务
│ ├── cart # 购物车服务
│ ├── center # 中心服务
│ ├── market # 营销服务
│ ├── member # 会员服务
│ ├── order # 订单服务
│ ├── product # 产品服务
│ ├── seckill # 秒杀服务
│ ├── third-party # 第三方服务
│ ├── wallet # 钱包服务
│ ├── warehouse # 仓储服务
├── deploys # 部署相关
├── web # 前端
├── pkg # 公共类库
├── seed # 爬虫 - 填充商品数据
├── docker-compose.yml # 一键安装所有服务
├── docker-compose-tool.yml # 一键安装app所有工具
├── Makefile # 项目管理文件
├── sonar-project.properties # sonarqube代码检查- 微服务框架 go-micro
- API网关 grpc-gateway
- grpc框架 grpc
- consul服务注册中心 consul
- 以太坊客户端 go-ethereum
- GRPC中间件 middware
- 链路追踪 opentelemetry jaeger
- 数据库组件 GORM
- redis组件 redis
- 命令行工具 Cobra
- 文档使用 Swagger 生成
- 配置文件解析库 Viper
- 使用 JWT 进行身份鉴权认证
- 校验器 validator
- 包管理工具 Go Modules
- CI/CD GitHub Actions
- 使用 GolangCI-lint 进行代码检测
- 使用 make 来管理 Go 工程
- 入口
- 移动端 Vue 组件库 vant
- 脚手架 vue-cli4 vant rem 移动端框架方案
- 入口
- laravel框架(5.5.*) laravel文档
- laravel-admin后台框架 laravel-admin文档
| 工具 | 说明 | 官网 |
|---|---|---|
| RedisDesktop | redis客户端连接工具 | https://redisdesktop.com/download |
| electerm | Linux远程连接工具 | https://github.com/electerm/electerm |
| Navicat | 数据库连接工具 | http://www.formysql.com/xiazai.html |
| PowerDesigner | 数据库设计工具 | http://powerdesigner.de |
| Postman | API接口调试工具 | https://www.postman.com |
| Jmeter | 性能压测工具 | https://jmeter.apache.org |
| Typora | Markdown编辑器 | https://typora.io |
| 工具 | 版本号 | 下载 |
|---|---|---|
| golang | 1.20 | https://golang.org/dl/ |
| nodejs | 18.15 | https://nodejs.org/zh-cn/download/ |
| php | 8.1 | https://www.php.net/downloads.php |
| python | 3.9 | https://www.python.org/downloads/ |
| solidity | 0.8.0 | http://remix.ethereum.org/ |
| mysql | 5.7 | https://www.mysql.com/ |
| redis | 6.0 | https://redis.io/download |
| nginx | 1.19 | http://nginx.org/en/download.html |
| consul | latest | https://github.com/hashicorp/consul |
| protobuf | latest | https://github.com/protocolbuffers/protobuf |
| minio | latest | http://docs.minio.org.cn/docs/ |
| elasticsearch | 7.17.7 | https://www.elastic.co/cn/downloads/elasticsearch |
| rabbitmq | 3.9 | https://www.rabbitmq.com/download.html |
# 部署
cd micro-mall
# 安装项目工具集
docker-compose -f docker-compose-tool.yml up -d
# 安装所有服务
# 前端项目默认api host:127.0.0.1,如需修改,请 vim web/Dockerfile
# minio 默认 host 127.0.0.1 可通过环境变量 MICRO_DFS_ENDPOINT 自定义
docker-compose up -d- 开发规范: Uber Go 语言编码规范
- 代码扫描: sonarqube install doc

