Mobile Development 14 min read

Evolution of the Architecture of Hello Travel's Alipay Mini Program

Hello Travel restructured its Alipay mini‑program by splitting business code into separate repositories, creating a custom incremental build tool, implementing event‑based decoupling, and centralizing release management, which solved branch conflicts, reduced package size and build time, and set the stage for broader platform adoption.

HelloTech
HelloTech
HelloTech
Evolution of the Architecture of Hello Travel's Alipay Mini Program

Today we share the architecture evolution of Hello Travel's Alipay mini program.

The content is divided into four parts: (1) a brief introduction to Alipay mini programs and the project background; (2) the problems we encountered and our thinking; (3) the new architecture we built for the mini program; (4) future outlook.

1. Mini Program Introduction and Background

Alipay mini programs are similar to WeChat mini programs. They provide a full‑featured IDE with a VS‑Code‑like editor, a simulator, and configuration panels. The global configuration declares pages, default titles, and styles, and does not support aliases.

2. Problems and Reflections

In a simple scenario the development‑release workflow is straightforward, but for a medium‑to‑large scale mini program the traditional git‑flow quickly becomes unmanageable. Hello Travel’s mini program has dozens of business lines, dozens of developers, and many feature branches, leading to frequent branch conflicts, uncontrolled release codes, and difficulty tracking which experience code belongs to which branch.

We identified five concrete issues:

Code branch conflicts

Business code coupling

Excessive mini‑program package size

Long compilation time

Uncontrolled release process

3. Solutions – New Architecture

Repository Splitting : Each business line’s code is moved to an independent repository while keeping shared entry, framework, login, and location code in a base repository. This reduces branch complexity, isolates permissions, and improves code safety.

Custom Build Tool : Existing solutions (git submodule, subtree, Lerna) were rejected due to complexity or mismatch with our needs. We built a custom tool that provides an abstraction layer, supports incremental builds, and dynamically assembles the final mini‑program package from the base repository and selected business repositories.

Incremental build reduces the full package (33.1 MB, 108 s) to a minimal package (6.72 MB, 22.6 s), dramatically speeding up preview and development.

Event‑Based Decoupling : To allow cross‑repository communication (e.g., homepage grid clicks), we introduced a special event file at each repository root. The build tool extracts callbacks, generates event listeners in the final package, and routes events to a fallback 404 page when the target is not built.

Centralized Release Platform : The platform controls permissions, versioning, experience‑code issuance, and package size. It integrates with DingTalk bots for automatic experience‑code notifications and runs webpack‑bundle‑analyzer on each commit to detect size regressions.

4. Outlook

The current architecture was built for Hello Travel’s own mini program, but we aim to generalize it for other Alipay mini programs and eventually for other platforms such as WeChat, QQ, 360, and Toutiao. By open‑sourcing the build tool and release platform, we hope to give back to the community.

incremental buildbuild toolFrontend ArchitectureAlipay Mini Programrelease processRepository Management
HelloTech
Written by

HelloTech

Official Hello technology account, sharing tech insights and developments.

0 followers
Reader feedback

How this landed with the community

login 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.