Cloud Native 11 min read

Why I Open‑Source an Unlaunched WeChat E‑Commerce Mini‑Program Built Mostly by AI

The author open‑sources a never‑launched WeChat e‑commerce mini‑program, recounts how 95% of its code was generated by AI, analyzes the project's architecture, the challenges faced with the original demo and AI tooling, and shares a detailed AI‑assisted development workflow.

Tech Architecture Stories
Tech Architecture Stories
Tech Architecture Stories
Why I Open‑Source an Unlaunched WeChat E‑Commerce Mini‑Program Built Mostly by AI

How the Project Started

The author began the project in the summer of 2025 after realizing his own coding skills had rusted. He first used GitHub Copilot for autocomplete, then turned to ChatGPT to refresh his knowledge of modern JavaScript (ES6) and to reread the WeChat mini‑program documentation, cloud server options, databases, and image storage.

He evaluated several cloud providers and found Tencent CloudBase offered natural support for mini‑programs, citing four main advantages:

No need to handle WeChat authentication manually.

Serverless cloud functions that eliminate hosting overhead and reduce deployment cost.

Document‑oriented database compatible with MongoDB.

Built‑in cloud storage, avoiding separate object‑storage setup.

Integrated WeChat Pay support.

To start quickly, he chose the TDesign component library and a demo e‑commerce mini‑program as a base, expecting it to be sufficiently complete for reuse. However, many hidden pitfalls emerged later.

Why the Project Stalled

The work halted for three practical reasons.

The TDesign demo suffered from:

AI coding at that stage was still unreliable; many bugs required manual fixing.

The enterprise‑level WeChat mini‑program registration process was cumbersome, involving numerous documents, certifications, and payment capabilities.

Why the Project Was Re‑started

In late 2025, the release of Gemini 3.0 Pro, ChatGPT 5.1 Codex, and Anthropic Opus 4.5 dramatically improved AI coding performance. The author therefore decided to rebuild the project from scratch, leveraging the stronger AI assistance.

The main actions taken were:

Large‑scale refactoring powered by the upgraded AI coding models.

Redesign of data models and page logic.

After establishing a clear underlying structure, development speed increased, allowing rapid feature iteration, debugging, and optimization.

Key architectural changes included:

Designing minimal SPU, SPEC, and SKU models.

Rebuilding data structures for orders, checkout flow, after‑sale state machine, and shopping‑cart logic.

Streamlining page logic to rely mainly on native mini‑program UI components and TDesign, keeping only a few custom components.

Clarifying the responsibilities of cloud functions versus the service layer.

Notable Pain Points Encountered

The built‑in low‑code platform in Tencent CloudBase proved unusable—its AI assistance, documentation, and overall experience were all subpar, leading the author to embed the management backend directly into the mini‑program.

WeChat Pay documentation was vague, especially regarding encrypted callback fields; AI‑driven code search helped decipher and implement the required decryption logic.

Collaboration with AI

The author primarily used the Codex VS Code extension and Antigravity. At that time, coding agents still suffered from typical issues such as context loss, model drift, session resets, and over‑engineering simple problems—issues previously described by Karpathy in CLAUDE.md.

To mitigate these problems, the author recorded all critical information in README.md, ARCHITECTURE.md, CURRENT_IMPLEMENT.md, and a dedicated handoff.md. Before starting a new AI session, the handoff file was reviewed and updated.

Later, the workflow evolved to incorporate OpenSpec + SuperPowers, inspired by BMAD, Spec Kit, GSD, and Trellis. The concept of “Harness Engineering” emerged, extending beyond Prompt and Context Engineering. The author now maintains a structured process:

Brainstorm PRD, split into versions, then into Alpha, Beta, Release stages.

Each stage maps to an OpenSpec Change, a branch, and a worktree.

Every OpenSpec Change includes three mandatory tasks: N‑2 (AI implementation report), N‑1 (AI review report), and N (human review approval before archiving, committing, and pushing).

Automation of this pipeline is in progress, with plans to integrate CI/CD via GitHub Actions.

Key Takeaways

Large‑model capabilities have become markedly stronger; the author now rotates among the three major providers, switching when one shows issues.

Early positive feedback was strong because AI compensated for the author’s weakness in low‑level coding while leveraging his strength in architecture and design.

Model drift and hallucinations persist, making Harness, clear context, and a well‑defined OpenSpec workflow essential for reliable output.

Additionally, the speed of code generation has turned code itself into a cheap commodity; the scarce resource is human attention. The author sees a new software‑engineering paradigm emerging rapidly.

Project Overview

The application covers nine business domains on the user side (home, categories, products, cart, user center, address, reviews, orders, stores) and nine domains on the admin side (dashboard, home config, business reports, distribution reports, distribution management, inventory, category management, product management, order/after‑sale management).

It consists of roughly 54,000 lines of effective code, including styles, distributed as:

35 pages (13 for the admin side).

36 services handling all business logic, exposing 91 endpoints.

23 cloud functions with 39 invocations, providing serverless business processing and added security.

13 data models built on CloudBase’s FlexDB, balancing indexing and performance.

The project is released under the MIT license; interested readers can request the repository address.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

serverlessAI codingSoftware EngineeringWeChat Mini ProgramCloudBaseharness engineeringTDesign
Tech Architecture Stories
Written by

Tech Architecture Stories

Internet tech practitioner sharing insights on business architecture, technology, and a lifelong love of tech.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.