explaingit

imshire/xu-shop

141GoAudience · developerComplexity · 4/5ActiveLicenseSetup · hard

TLDR

Full stack single merchant e-commerce platform for the WeChat ecosystem with a Go backend, Taro shopper apps, and a Vue 3 admin console, AGPL-3.0 licensed.

Mindmap

mindmap
  root((xu-shop))
    Inputs
      WeChat login
      Product catalogue
      Orders
      Stock updates
    Outputs
      Mini program
      H5 web app
      Admin dashboard
      Shipping labels
    Use Cases
      Launch a WeChat store
      Run a single merchant shop
      Study production e-commerce
    Tech Stack
      Go
      Gin
      GORM
      PostgreSQL
      Redis
      Taro
      Vue 3

Things people build with this

USE CASE 1

Spin up a single merchant WeChat store with mini program, H5, and admin

USE CASE 2

Study a production grade Go plus PostgreSQL plus Redis e-commerce stack

USE CASE 3

Reuse the Redis Lua atomic stock decrement pattern in your own checkout

USE CASE 4

Bootstrap an admin console with SKU editing, batch shipping, and GMV dashboards

Tech stack

GoGinGORMPostgreSQLRedisTaroVue

Getting it running

Difficulty · hard Time to first run · 1day+

Needs Go 1.22, PostgreSQL 15, Redis 7, MinIO, plus WeChat merchant credentials and a Kuaidi100 key for the full flow to work.

AGPL-3.0, you can use and modify the code but any modified or network served version must also be released as open source under the same license.

In plain English

xu-shop is an open source full stack e-commerce project aimed at a single merchant who wants their own private store running on the WeChat ecosystem. The README is in Chinese, but the structure is recognisable: a WeChat mini program and H5 web app for shoppers, a Vue 3 admin console for the merchant, and a Go backend that holds it all together. The whole thing is presented as a complete production-grade reference implementation, shipped with 16 product requirement documents and 17 architecture documents. The technology stack splits cleanly across layers. The backend is Go 1.22 with Gin, GORM, PostgreSQL 15, Redis 7, and the asynq job queue. The shopper-facing apps are built once in Taro 4 with React 18 and TypeScript, then run as both a mini program and an H5 site. The admin console is Vue 3.4 with Element Plus, Vite 5, and Pinia. Supporting infrastructure includes Docker Compose, MinIO for storage, Nginx, and OpenTelemetry. Third-party integrations cover WeChat login, WeChat Pay V3, the Kuaidi100 courier API for shipping labels, and Alibaba Cloud OSS. On the shopper side, the app handles WeChat one-tap login, phone number binding, browsing categories with SKU variants, favourites, history, a cart with live stock checks, ordering with automatic timeout cancellation through asynq, WeChat JSAPI and H5 payment, real-time courier tracking, and template messages back to the user. The admin side covers SPU and SKU editing, image upload, stock transfers with low-stock alerts, batch shipping, label printing, manual refunds, user tagging, a GMV dashboard with pre-aggregated metrics, and role-based access control. Architecture highlights mentioned include Redis Lua scripts for atomic stock decrement to prevent overselling, string IDs everywhere to avoid JavaScript BigInt precision loss, idempotency keys for both callbacks and clients, single-entry state machines for orders and refunds, JWT blacklists, and SQL parameterisation. The project is AGPL-3.0 licensed, which means modifications must stay open source and the code cannot be wrapped into a closed commercial product.

Copy-paste prompts

Prompt 1
Walk me through running xu-shop locally with Docker Compose, PostgreSQL 15, and Redis 7
Prompt 2
Explain how xu-shop prevents overselling using Redis Lua scripts and show me the script
Prompt 3
Show me how the Taro 4 client is built once and deployed as both a WeChat mini program and an H5 site
Prompt 4
Map out xu-shop's order state machine and where asynq timeouts cancel unpaid orders
Prompt 5
Help me swap the WeChat Pay V3 integration in xu-shop for Stripe while keeping the rest of the flow
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.