mall4j is a free, open source e-commerce platforms project written in JavaScript and released under AGPL-3.0. It has 5,255 GitHub stars, 1,360 forks and 14 open issues, and was last pushed 4 days ago. On this registry it ranks #16 of 30 tracked projects in E-commerce Platforms, with 5 head-to-head comparisons available. It gained 1 stars over the last 3 tracked days.

What is mall4j?

Mall4j is a Java mall system source code product family whose main open-source repository provides a Spring Boot 4 and Vue3 B2C single-merchant e-commerce storefront and admin backend, written for developers and teams who want to study, evaluate, or build on a Java mall codebase.

What it is

Mall4j is a Java mall system source code product system, and this repository is the main open-source repository of that system. It is built on Spring Boot 4, Sa-Token for authorisation, MyBatis and MyBatis-Plus for persistence, and Redis, with a Vue3 front end in a front-end/back-end separated architecture. The open-source edition targets the B2C single-merchant scenario and includes product, order, member, specification and SKU, cart, payment, permission, content, and statistics capabilities. The README positions it for learning, evaluation, secondary development, and enterprise mall prototype work.

The problem it solves is the cost of starting a Java e-commerce platform from nothing. Instead of writing specification and SKU handling, cart, order, freight template, payment, and back-office permission modules from scratch, a team gets a working reference implementation of the full flow. The thing it replaces is bespoke Java mall development or a closed commercial mall codebase; the vendor's own paid alternatives are its commercial editions covering B2C, B2B2C, S2B2C, B2B2B, SaaS, multi-tenant, and cross-border scenarios.

Key capabilities

  • Core B2C mall flow in one codebase: product, order, member, specification/SKU, cart, and payment modules.
  • Admin backend modules for product management, order management, freight templates, specification management, member management, operations management, content management, statistics reports, permission management, and system settings.
  • Spring Boot 4 backend with Vue3 front end in a front-end/back-end separated layout; exact versions are read from the backend pom.xml and the frontend package.json.
  • Sa-Token permission authentication and MyBatis / MyBatis-Plus persistence.
  • Redis caching with Redisson distributed locks, aimed at multi-instance production deployment.
  • Companion front-end repositories: mall4v (Vue3 admin), mall4m (native WeChat mini program), mall4uni (uni-app multi-terminal), and mall4cloud (microservice mall repository for B2B2C architecture).
  • Agent Skill definitions shipped in .agents/skills/mall4j/ for Cursor and Codex, with the same content at .claude/skills/mall4j/ for Claude Code, to assist startup and secondary development against existing features.

Who uses it and how

  • Teams evaluating a Java mall system or mall source code before committing to a commercial licence.
  • Developers doing secondary development who need a working reference for SKU, cart, and order flows rather than a specification document.
  • Enterprises building an internal mall prototype before deciding between the open-source base and a commercial edition.
  • Front-end teams pairing the Java backend with mall4v, mall4m, or mall4uni client code.
  • Operators expecting multiple application instances, since Redis and Redisson locking are part of the stated feature set for production deployment.

Getting started

The README directs setup to the documentation in the repository doc directory, mirrored in Gitee and at the Kancloud documentation site, alongside a Bilibili development-environment video (BV1eW4y1V7c1), with framework versions taken from pom.xml and package.json. No Docker image or Compose file appears in the facts, so the documented path is a manual local environment build.

How it compares

The facts name no third-party product that this repository replaces and no comparable mall tool in this registry, so it stands alone here. The only comparison the README draws is internal: the AGPLv3 open-source edition against Mall4j's own commercial editions, which add B2B2C, S2B2C, B2B2B, SaaS, multi-tenant, and cross-border scope, 100% unencrypted source delivery, permanent licensing, private deployment delivery, and enterprise support. Pricing and feature comparisons sit at mall4j.com/price/.

When to use it — and when not to

Under AGPLv3, closed-source commercial use requires a separate commercial licence, so a team that cannot accept copyleft terms should not start with this repository. A self-hoster operates the whole stack alone: the Spring Boot 4 application, its MyBatis persistence layer, Redis, and whichever client front end is chosen, and because the facts give no single install command, image, or Compose file, setup runs through the doc directory and video. The README is largely Chinese-language, and the registry metadata lists the primary language as JavaScript even though the backend is Java, so treat pom.xml and package.json as the authority on what is actually inside.

project readme (upstream, from github) — read inline

Mall4j Java 商城系统

Mall4j Java商城系统源码

Mall4j 是 Java 商城系统源码产品体系。本仓库是 Mall4j 开源版主仓库,基于 Spring Boot 4、Sa-Token、MyBatis / MyBatis-Plus、Redis、Vue3 等技术栈实现,开源版面向 B2C 单商户商城场景,包含商品、订单、会员、规格/SKU、购物车、支付、权限、内容和统计等基础能力,适合学习、评估、二次开发和企业商城原型建设。

如果你正在选型 Java 商城系统、商城源码或电商系统源码,可以先从本仓库了解 Mall4j 的开源实现;需要多商户、供应链、SaaS、跨境、多端交付或企业级技术支持时,再参考官网版本说明。

项目说明

  • 项目名称:Mall4j Java 商城系统、Mall4j 商城源码、Mall4j 电商系统源码。
  • 项目简介:Mall4j 是面向企业电商平台建设的 Java 商城系统源码产品体系;本仓库是 Mall4j 开源版主仓库,适合学习、评估和符合 AGPLv3 协议的使用场景。
  • 技术说明:Mall4j 主线已升级到 Spring Boot 4 和 Vue3,具体依赖版本以后端 pom.xml 和前端 package.json 为准。
  • 开源授权:本仓库开源版遵守 AGPLv3 协议,适合学习、评估和符合协议的使用场景。
  • 商业授权:闭源商用、企业私有化交付、企业级售后和更多业务版本应参考 Mall4j 官网商业授权说明。
  • 企业版本:商业版坚持 100% 源码交付、源码无加密、永久授权;付费企业版本覆盖 B2C、B2B2C、S2B2C、B2B2B、SaaS、多租户、跨境等场景,具体功能和服务范围以官网与合同确认为准。
  • 版本说明:Mall4j 以商城源码产品体系为主,同时提供商业版、SaaS 版、跨境版等企业版本;企业版本的功能和服务以官网说明为准。
  • 相关链接:官网价格/功能对比客户案例、当前仓库。

项目特点

  • Spring Boot 4 + Vue3 前后端分离
  • Sa-Token 权限认证,MyBatis / MyBatis-Plus 持久层
  • Redis 缓存、Redisson 分布式锁,适配生产多实例部署
  • 完整 SKU、购物车、下单和后台管理流程
  • AGPLv3 开源,商业授权和企业版本说明见“授权与版本”

技术版本说明

Mall4j 主线已升级到 Spring Boot 4 和 Vue3,适合新项目评估和长期维护。对于仍停留在旧技术栈上的商城系统,后续框架升级、依赖兼容和安全维护成本通常更高;本项目的具体依赖版本以后端 pom.xml 和前端 package.json 为准。

前言

本仓库致力于提供一个完整、易于维护的 Mall4j 开源版电商系统参考实现。后台管理系统包含商品管理、订单管理、运费模板、规格管理、会员管理、运营管理、内容管理、统计报表、权限管理和系统设置等模块。当前开源版聚焦 B2C 单商户商城基础能力;营销、分销、供应链、多商户、SaaS、跨境等更多版本和功能范围以 Mall4j 商城官网 为准。

文档与快速启动

项目文档位于仓库 doc 目录,也可以通过以下链接查看:

建议先阅读文档,再结合视频搭建本地开发环境。

授权与版本

本仓库开源版使用 AGPLv3 协议。你可以按协议学习、研究、二次开发和自行部署。

闭源商用、企业私有化部署交付、100% 源码交付、源码无加密、永久授权、多商户/供应链/SaaS/跨境版本、演示环境和企业级售后支持属于商业授权或企业版本范围,可以通过 Mall4j 官网了解。

商业授权支持

商务二维码

开源版与企业版本

对比项 开源版 企业版本
学习、评估、二次开发 支持 支持
授权方式 AGPLv3 开源协议 商业授权
闭源商用 需另行取得商业授权 按商业授权使用
部署方式 可自行部署(遵循 AGPLv3) 可提供企业私有化部署交付服务
仓库/版本定位 Mall4j 开源版主仓库,面向 B2C 单商户商城 Mall4j 企业版本体系,不等同于本开源仓库的增强版
版本范围 B2C 单商户商城基础能力 可覆盖 B2C、B2B2C、S2B2C、B2B2B、SaaS、多租户、跨境等版本
100% 源码交付、源码无加密、永久授权 可获取当前开源代码,不等同商业交付承诺 商业版支持,具体以官网和合同为准
企业级售后支持 社区交流为主 可提供商业支持

常见问题

Mall4j 是什么?

Mall4j 是面向企业电商平台建设的 Java 商城系统源码产品体系。本仓库是 Mall4j 开源版主仓库,适合学习、评估、二次开发和符合 AGPLv3 协议的使用场景。

企业版本适合闭源商用、企业私有化部署交付、长期维护和售后支持。

Mall4j 开源版可以免费使用吗?

可以,前提是遵守 AGPLv3 开源协议。

如果项目不适合 AGPLv3,可以通过 Mall4j 官网了解商业授权。

闭源商用、企业级售后和更多业务版本属于商业授权或企业版本范围。

Mall4j 商业版源码是否加密?

Mall4j 商业版坚持 100% 源码交付、源码无加密、永久授权。具体交付范围、授权方式、服务内容和合同条款以官网说明和商务确认为准。

Mall4j 是否支持 Spring Boot 4 和 Vue3?

Mall4j 主线已升级到 Spring Boot 4 和 Vue3,具体依赖版本以后端 pom.xml 和前端 package.json 为准。

Mall4j 适合哪些商城项目?

本开源仓库适合 Java 商城系统、B2C 单商户商城、商城源码评估、二次开发和原型建设场景。Mall4j 体系下的企业自建商城、企业私有化部署交付、多商户、供应链、SaaS、跨境等版本以官网版本说明为准。

相关资料

相关开源仓库

仓库 说明
mall4j Mall4j 开源版主仓库,面向 B2C 单商户商城
mall4v Vue3 管理后台前端
mall4m 原生微信小程序商城前端
mall4uni uni-app 多端商城前端
mall4cloud Mall4cloud 开源版微服务商城仓库,面向 B2B2C 架构

商城演示地址

商城小程序演示

Mall4j 小程序商城演示二维码

商城技术选型

技术 版本 说明
Spring Boot 4.x MVC核心框架
Spring Security web 以pom为准,一直更新 web应用安全防护
Sa-Token 以pom为准,一直更新 一个轻量级 Java 权限认证框架
MyBatis 以pom为准,一直更新 ORM框架
MyBatisPlus 以pom为准,一直更新 基于mybatis,使用lambda表达式的
spring-doc 以pom为准,一直更新 接口文档工具
jakarta-validation 以pom为准,一直更新 验证框架
redisson 以pom为准,一直更新 对redis进行封装、集成分布式锁等
hikari 以pom为准,一直更新 数据库连接池
logback 以pom为准,一直更新 log日志工具
lombok 以pom为准,一直更新 简化对象封装工具
hutool 以pom为准,一直更新 更适合国人的java工具集
knife4j 以pom为准,一直更新 基于swagger,更便于国人使用的swagger ui

通过阿里的代码规范扫描工具(Alibaba Java Coding Guidelines plugin),扫描无异常:

规约扫描结果

部署教程

ps: 如果你不清楚如何启动我们的商城,请仔细阅wiki当中的文档

https://gitee.com/gz-yami/mall4j/wikis

开发环境搭建视频(推荐先看下文档再看视频):https://www.bilibili.com/video/BV1eW4y1V7c1

有声音了。如果视频对你有用,记得点赞投币噢。

相关截图

1. 后台截图

商城后台

2. 移动端截图

Mall4j 移动端商城截图

提交反馈

  • Mall4j商城官方技术QQ 1群:722835385(3000人群已满)
  • Mall4j商城官方技术QQ 2群:729888395(2000人群已满)
  • Mall4j商城官方技术QQ 3群:630293864
  • Mall4j 商城官网:https://www.mall4j.com

特别鸣谢

Frequently asked questions

Is mall4j free to use?

mall4j is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mall4j do?

⭐️⭐️⭐️ 电商商城 小程序电商商城系统 PC商城 H5商城 APP商城 Java商城 O2O商城 跨境商城

What is mall4j written in?

mall4j is primarily written in JavaScript. Its source is publicly available at https://github.com/gz-yami/mall4j, and it has 5,255 GitHub stars.