Cloud Native 12 min read

How Tencent Scaled Mini‑Program Development with Cloud‑Native DevOps and Serverless

This article details Tencent Online Education's three business lines, the challenges of mini‑program engineering such as inconsistent environments and release issues, and how a custom DevOps workflow, automated testing, a bespoke CLI tool, and Serverless cloud functions were introduced to create a unified, scalable cloud‑native development pipeline.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
How Tencent Scaled Mini‑Program Development with Cloud‑Native DevOps and Serverless

1. Business Background

Tencent Online Education includes three main products: Tencent Classroom for adult learning, Penguin Tutor for K12 education, and ABCmouse for children's English learning.

All three businesses have mini‑programs deployed on various client platforms.

2. Mini‑Program Engineering Practice

Because many features are developed in parallel, the team faced problems such as inconsistent development environments, missing npm build steps, QR‑code preview expiration, and accidental code leakage during release.

Missing npm build before publishing can cause outdated dependencies.

QR‑code preview has limited validity, especially with multiple concurrent features.

Release steps lack visibility, leading to accidental code inclusion.

To address these issues, a DevOps workflow was built, covering build, test, release and collaboration.

A custom CLI tool Imweapp was created on top of the WeChat Developer Tool’s CLI, providing branch‑merge checks, npm‑package validation, automated versioning and upload.

Automated testing includes UI testing with miniprogram-automator and jest, and unit testing with miniprogram-simulate and jest. Common pitfalls such as component name prefixes, asynchronous UI actions, native component inspection, and API mocking are listed.

Business overview diagram
Business overview diagram

3. Mini‑Program Cloud Development Practice

To overcome limitations of the built‑in SDK, the team adopted Serverless cloud functions and a custom Web SDK to share backend resources across multiple mini‑programs and web clients.

Serverless functions are triggered by API Gateway; cold‑start latency is reduced by pre‑initialising resources, using VPC networking, and splitting heavy controllers into separate functions.

The team integrated the Serverless‑plus package with their Koa‑based framework IMServer, creating imserve-serverless for easy Serverless development.

Deployment is managed via the Cloud Development CLI, which standardises build environments, supports Git‑hook triggered deployments to test, pre‑release and production environments, and archives code for rollback.

CI/CD pipeline diagram
CI/CD pipeline diagram

Overall, the solution unifies mini‑program CI/CD, automated testing, Serverless migration and cloud‑function deployment, improving reliability and scalability across dozens of teams and over thirty mini‑programs.

Final architecture overview
Final architecture overview
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.

Cloud Nativeci/cdautomationDevOpsmini-program
Tencent IMWeb Frontend Team
Written by

Tencent IMWeb Frontend Team

IMWeb Frontend Community gathering frontend development enthusiasts. Follow us for refined live courses by top experts, cutting‑edge technical posts, and to sharpen your frontend skills.

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.