Library / SDK
macrozheng/mall avatar
macrozheng/mall

macrozheng/mall: A Full Spring Boot E-Commerce Reference Implementation

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。.

84,844 stars29,834 forksJavaApache-2.0

At a glance

What is it?
mall is an open-source Java e-commerce system built on Spring Boot and MyBatis, covering a customer-facing storefront and a full backend admin panel, with Docker deployment and a companion learning tutorial at macrozheng.com. The master branch targets Spring Boot 3.5 and JDK 17, last pushed on 2026-09-15.
Who is it for?
mall suits Java developers who want a complete, working reference implementation of an e-commerce system using Spring Boot, MyBatis, and a realistic middleware stack. The project is not a ready-to-ship product for a business: it is designed as a learning resource with a companion tutorial site.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 15 days ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What mall is and who the project serves

The README describes mall as a full e-commerce system consisting of a customer-facing storefront and a backend management system, implemented with SpringBoot and MyBatis and deployed with Docker. The project's stated purpose is to create a complete e-commerce system using mainstream current technology.

The target audience is Java developers who want a working, full-stack reference implementation rather than a toy application. The README links to a companion learning tutorial at macrozheng.com, a video tutorial series, and a microservice variant (mall-swarm) based on Spring Cloud Alibaba. This positions the project as educational: a codebase to study, run, and extend, not a commercial product.

A live online demo of the backend admin panel is accessible at macrozheng.com/admin/index.html. The frontend storefront demo is at macrozheng.com/app/. The README notes that viewing the storefront in a browser's mobile mode produces a better experience, since the frontend is designed for the mobile viewport.

System architecture: modules and how they connect

The project is a Maven multi-module monorepo. The top-level pom.xml defines the workspace, and seven modules make up the full system:

code
mall
├── mall-common -- 工具类及通用代码
├── mall-mbg -- MyBatisGenerator生成的数据库操作代码
├── mall-security -- SpringSecurity封装公用模块
├── mall-admin -- 后台商城管理系统接口
├── mall-search -- 基于Elasticsearch的商品搜索系统
├── mall-portal -- 前台商城系统接口
└── mall-demo -- 框架搭建时的测试代码

mall-common holds shared utilities. mall-mbg contains the MyBatisGenerator-generated data access layer. mall-security wraps Spring Security into a shared authentication and authorization module. mall-admin is the REST API layer for the backend management panel. mall-search implements product search on top of Elasticsearch. mall-portal is the REST API layer for the customer-facing storefront. mall-demo contains test code from the initial framework setup.

The storefront and admin panel each have separate frontend repositories: mall-admin-web for the Vue-based admin panel and mall-app-web for the mobile storefront. These are listed in the README as companion repositories.

Backend technology stack and its middleware requirements

The backend technology table in the README documents fourteen external technologies beyond the Spring ecosystem. Elasticsearch handles product search. RabbitMQ handles message queuing. Redis serves as an in-memory data store for caching and session management. MongoDB provides a NoSQL store for additional data.

Elastic's LogStash and Kibana handle log aggregation and visualization. Nginx serves static assets. Docker containerizes the application. Jenkins automates deployment. Druid provides the database connection pool. Either Alibaba Cloud OSS or MinIO handles object storage for product images.

At the application layer, JWT provides authentication tokens, Lombok reduces boilerplate in entity classes, Hutool provides Java utility functions, PageHelper handles MyBatis pagination, SpringDoc generates the OpenAPI documentation, and Hibernate-Validator handles input validation.

The master branch targets Spring Boot 3.5 and JDK 17. The dev-v2 branch targets Spring Boot 2.7 and JDK 8. The README makes this distinction explicit as a branch note at the top of the file.

Frontend and mobile technology stack

The admin panel (mall-admin-web) uses Vue 2, Vue Router, Vuex for state management, the Element UI component library, Axios for HTTP requests, v-charts for Echarts-based charts, js-cookie for cookie management, and nprogress for progress bar display. The README's frontend table lists these eight dependencies.

The mobile storefront (mall-app-web) uses Vue, Vuex, and uni-app as the mobile frontend framework. uni-app is a Vue-based framework that compiles to multiple mobile targets including WeChat Mini Programs, H5, and native apps. The README also lists mix-mall as an e-commerce project template and luch-request as the HTTP framework for the mobile frontend.

The separation of frontend repositories means developers can work on the backend API and the frontend independently. The backend modules expose REST APIs that both the admin panel and the storefront consume.

Running the project locally and finding documentation

The README points to the documentation at macrozheng.com for setup instructions rather than documenting them inline. The development tools table lists the recommended toolchain: IDEA for the IDE, RedisDesktop for Redis, Robomongo for MongoDB, Navicat for the relational database, and Postman for API testing.

The README also lists design and productivity tools: PowerDesigner for database design, Axure for prototyping, MindMaster for mind maps, ScreenToGif for GIF recording, ProcessOn for flowcharts, and Snipaste for screenshots. This list gives a sense of the scope of documentation and design work the companion tutorial covers.

The live demo environment shows the end state. Before running locally, developers need to have Docker, JDK 17, and Maven installed, and the full middleware stack (Elasticsearch, RabbitMQ, Redis, MongoDB, MySQL) running or available. The README does not document a minimal single-service startup path, so a partial local setup requires reading the documentation to understand which services are strictly required for which modules.

Limitations and where mall is the wrong starting point

mall is designed as a learning reference, not as a production template for a commercial business. The tutorial at macrozheng.com covers the implementation decisions, but the codebase does not include security hardening for public deployment, load testing results, multi-region support, or production-grade monitoring configuration.

The middleware stack is substantial. Running Elasticsearch, RabbitMQ, Redis, MongoDB, and MySQL together requires meaningful memory and disk resources on a development machine. Teams with limited local hardware will need to use cloud-hosted versions of some services, which adds configuration complexity beyond what the documentation describes.

The microservice variant mall-swarm uses Spring Cloud Alibaba. Developers who need distributed deployment should use mall-swarm rather than adapting the monolithic mall repository to a microservice architecture.

The latest tagged release is v1.0.3 from 2024-03-01, but the repository has received pushes through 2026-09-15, meaning the master branch is newer than the latest tag. Developers who deploy from the master branch are using untagged code.

mall versus newbee-mall and other Spring Boot e-commerce starters

The RELATED SEARCHES for mall include several alternative Spring Boot e-commerce projects. newbee-mall is a simpler Spring Boot e-commerce project with less middleware dependency: it uses MySQL and Spring Boot without Elasticsearch or RabbitMQ, making it more approachable for beginners who want to run a working e-commerce app without configuring a full middleware stack.

Mall4j and CRMEB are commercial-grade platforms that go beyond reference implementations and offer ready-to-deploy features and support. The distinction matters for a team deciding between a learning resource and a starting point for a paying product.

mall's position in this space is the most comprehensive free Java reference implementation with a full tutorial series. It covers more of the enterprise Java stack than simpler alternatives, which makes it more educational for developers who want to understand how production-style middleware integrates in a real application. The trade-off is higher setup complexity.

Editorial conclusion

mall suits Java developers who want a complete, working reference implementation of an e-commerce system using Spring Boot, MyBatis, and a realistic middleware stack. The project is not a ready-to-ship product for a business: it is designed as a learning resource with a companion tutorial site. Adopters who want to build on it should verify that the middleware requirements (Elasticsearch, RabbitMQ, Redis, MongoDB) match their infrastructure capacity before starting, since running the full stack locally requires significant resources. The master branch requires JDK 17 and Spring Boot 3.5; teams on older JVMs should use the dev-v2 branch for Spring Boot 2.7 and JDK 8 compatibility.

Frequently asked questions

What does the macrozheng/mall project include?

mall includes a Spring Boot backend with seven Maven modules: shared utilities, a MyBatis data access layer, a Spring Security module, a backend admin API, an Elasticsearch search module, a customer-facing storefront API, and demo code. Separate frontend repositories provide a Vue admin panel and a uni-app mobile storefront.

What technology stack does macrozheng/mall use?

The backend uses Spring Boot, Spring Security, MyBatis, Elasticsearch, RabbitMQ, Redis, MongoDB, Nginx, Docker, and Jenkins, among others. The frontend admin panel uses Vue, Vuex, and Element UI. The mobile storefront uses uni-app. The master branch targets Spring Boot 3.5 and JDK 17.

Is macrozheng/mall suitable for a production e-commerce site?

The README positions mall as a learning resource with a companion tutorial, not a production-ready commercial system. A live demo is available at macrozheng.com/admin/index.html. Developers who need a production-ready starting point should review the microservice variant mall-swarm and assess whether the codebase meets their security and scalability requirements.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/macrozheng-mall.svg)](https://hysenlabs.com/projects/macrozheng-mall)
Community notes

Community notes