zero-admin is the backend half of a shop whose front ends live elsewhere
Zero-Admin 是一套基于 go-zero 框架实现的电商系统的后端服务
At a glance
- What is it?
- zero-admin is a go-zero based e-commerce backend that ships as a set of services rather than one application: an API layer, RPC services, consumers and scheduled jobs, with React and Flutter clients in separate repositories. The interesting entry point is a code generator that builds API and protobuf files straight from database tables, and the interesting caveat is that the ORM has just changed underneath a front end that is still catching up.
- Who is it for?
- zero-admin suits a Go team that wants a working mall backend with the go-zero conventions already laid out, and it suits anyone who wants to see how a database driven code generator fits into a real service layout rather than a toy.
- 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 30 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
One backend, three separate client repositories
Zero-Admin is described as an e-commerce system backend built on the go-zero framework and deployed with Docker containers, and it contains a storefront and an administration system rather than a single application. The split is literal in the repository list. The admin console lives in a separate repository, zero-admin-ui, built with React. The mobile app is another one, flutter_mall, a Flutter e-commerce project with home, list, detail, cart and member centre pages, and its payment path is wired to Alipay. The web storefront is a third, zero-pc-web, also built with React. So the repository you are reading is the service layer that all three talk to, which is the right thing to know before you judge the code: a change in the API here breaks clients that live in other trees and in other release cycles.
The directory layout follows the go-zero service split
The top level of the tree follows the conventions that go-zero services use, and the names are worth reading as a description of the architecture. There is an `api/` directory for the API layer, an `rpc/` directory for the RPC services, a `consumer/` directory for message consumers, a `job/` directory for scheduled work, and a `pkg/` directory for shared code. Around them sit `script/`, a `makefile`, a `goctl-shell.md` note, a `quick_start.sh` and a `service_manager.sh`, plus the usual `go.mod` and `go.sum`. The dependency list confirms the shape. The service framework is go-zero at version 1.10.3, communication between services is gRPC with protobuf messages, and the persistence layer is gorm with MySQL and Postgres drivers, a database resolver plugin and the gorm/gen code generator. Alongside those sit a MongoDB driver in two major versions, a RabbitMQ client, an Elasticsearch client, a scheduler based on gocron, an Alipay SDK, a JWT library, a UA parser and a copier utility. That is a fairly complete set of the pieces a real commerce backend needs, and it is worth noticing how many of them a project of this size expects to carry.
The code generator is where a new module starts
The installation section in the documentation is really an installation section for the code generator, and that tells you the intended workflow: the modules are generated rather than typed by hand. The tool is installed with go install, and then pointed at a database:
go install github.com/feihua/generate-code@latest
generate-code golang zero --dsn "root:123456@tcp(127.0.0.1:3306)/demo" --tableNames sys_ --prefix sys_ --rpcClient sysclient --author liufeihuaThe flags show what the generator needs to know: the target framework, the data source name of the MySQL database, the table name prefix it should look for, the prefix it should use in the generated code, the name of the RPC client to create, and the author string written into the headers. The table prefix in the example is `sys_`, which is the convention for the system tables such as users, roles and menus, and the generated RPC client is named to match. There is also a companion tool for the IDE, goctl-helper, a GoLand visual plugin that generates API and protobuf files from a database and plugs into the official goctl plugin mechanism.
The ORM switch is the reason the front end is behind
Two notes at the top of the documentation set the current state, and they matter more than the feature list below them. The persistence layer has been switched wholesale to gorm, and the backend interfaces changed substantially, with the front end still being adapted. That is a project caught mid migration, and it is the single most important fact for an engineer evaluating it. The consequence is that the code on the main branch and the front end in the sibling repositories may not line up, and that any walkthrough written earlier, including the documentation site, can describe endpoints that no longer exist. The related open item is in the same vein: the top of the README announces that a GetX version of the Flutter mall and an Element Plus version of the admin console are planned, which tells you the author intends to keep several client stacks alive in parallel, each with its own adaptation work.
Two clients of the same API: an admin console and a storefront
The feature surface is split across the two halves of the system, and the split is conventional. The storefront side covers a home portal, personalised product recommendations based on a user's history and preferences, product search with keyword search and filtering, product display with descriptions, prices and reviews, a shopping cart, a full order flow from placing an order through payment, shipping and receipt, a member centre for personal details, order status and points, and a help centre for common questions and after sales policy. The admin side covers goods management for adding, editing and deleting products, order management for monitoring status and shipping or cancelling, member management for registered users and membership levels, promotion management for campaigns such as spend thresholds and discounts, operations management for advertising and promotion, content management for announcements and news, permission management for system user rights, and settings for payment methods and logistics information. The storefront also needs a product search backend, which the presence of an Elasticsearch client and a UA parser in the dependency list suggests is where the search work happens.
Demo instances, default accounts and a template for a lighter start
The documentation points at running instances so you can look before you install: a mall preview, a Vue version preview, and a web preview, with the note that some functions in the demo account have their modification and deletion permissions closed off. The credentials given are the pair every deployment of this kind ships with, admin and the password 123456, which is fine for a public demo and something you must change before exposing anything. There is also an Android build available through a third party distribution page, and a separate template repository, zero-admin-template, that contains only the base RBAC permission layer. That template is the more sensible starting point for a new project, because it is smaller than the full system and it isolates the part most teams rewrite anyway: the roles, menus and permissions that a mall front end needs to log in against.
Licence, releases and what to check before adopting
The project is under the Apache License 2.0, with the licence file in the repository, which is a permissive grant that asks you to keep the notices when you redistribute. On releases, the pattern is worth noting: the list shows v0.0.4 published on 2026-08-19 and v0.0.1 from 2024-05-10, and the last push to the repository was on 2026-09-23, so the code moves without a steady stream of tags, and the version numbers themselves are still in the pre-release range that signals an API that can change. A team that depends on the API surface should therefore pin a commit rather than track the branch. The credits in the documentation point to go-zero and to the mall project by macrozheng, and a reader who wants another take on the same domain model can start from there.
Editorial conclusion
zero-admin suits a Go team that wants a working mall backend with the go-zero conventions already laid out, and it suits anyone who wants to see how a database driven code generator fits into a real service layout rather than a toy. It does not suit a team that wants a product you can deploy and use today, because the documentation states that the API changed substantially when the persistence layer moved to gorm and that the front end is still being adapted, and the demo instances carry default credentials. Before you build on it, check three things: whether the sibling front end repository you need matches the current API, the `api/` and `rpc/` definitions in this repository rather than the old documentation site, and the licence and release state, which is Apache-2.0 with the latest tag at v0.0.4 from 2026-08-19 and the last push on 2026-09-23.
Frequently asked questions
What is zero-admin?
It is an e-commerce backend written with the go-zero framework and deployed in Docker, with a storefront and an administration system behind one API. The repository is the service layer, while the React admin console, the React web storefront and the Flutter app live in separate sibling repositories.
How do I generate code for a new module in zero-admin?
Install the generator with `go install github.com/feihua/generate-code@latest`, then run it with the target framework, the database DSN, the table name prefix to scan, the code prefix, the RPC client name and the author string. There is also a GoLand plugin, goctl-helper, that does the same thing visually and works with the official goctl plugin mechanism.
Is the zero-admin API stable?
Not currently. The documentation states that the persistence layer was switched to gorm, that the backend interfaces changed substantially, and that the front end is still being adapted to match, so the API and the sibling client repositories can be out of step.
What database and message broker does zero-admin use?
The persistence layer is gorm, with MySQL and Postgres drivers plus a database resolver plugin, and the module list also includes a MongoDB driver and a RabbitMQ client. The go.mod file pins go-zero 1.10.3, gRPC and protobuf for service communication, and a scheduler built on gocron.
Which licence does zero-admin use and when was it last released?
The project is under the Apache License 2.0. The listed releases are v0.0.4 from 2026-08-19 and v0.0.1 from 2024-05-10, and the last push to the repository was on 2026-09-23.
Official sources
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.
[](https://hysenlabs.com/projects/feihua-zero-admin)Was this useful?