Mobile Development 16 min read

Mobile Infrastructure Construction and Practices at Youzan

Youzan’s mobile infrastructure combines enforced pre‑release processes, unified permission workflows, cross‑platform Zan Weex and emerging Flutter support, dynamic configuration, robust CI, logging, testing, and shared component libraries to deliver efficient, high‑quality, gray‑/conditional‑/full releases while fostering collaboration across its mobile development teams.

Youzan Coder
Youzan Coder
Youzan Coder
Mobile Infrastructure Construction and Practices at Youzan

Mobile infrastructure construction has become essential for every enterprise involved in mobile development. Youzan, an e‑commerce service company, has been continuously improving its mobile infrastructure to support the full development lifecycle, reduce R&D cost, improve efficiency, and ensure quality.

On December 7, Youzan held a mobile technology salon to share its achievements in mobile infrastructure. The overall architecture diagram shows a daily build process with hundreds of builds and weekly releases, emphasizing the importance of process, dynamization, efficiency, quality, and collaboration. Mobile developers now possess basic front‑end, back‑end, and operations capabilities.

1. Process

To coordinate the growing number of collaborators, processes are enforced through a system rather than just agreements. Key processes include the pre‑release “boarding” mechanism and permission‑approval workflows.

1.1 Pre‑release boarding mechanism

Before a release, branches cannot be merged arbitrarily. All merges must be submitted via the Bus platform and meet conditions such as backend release, online testing passed, and product confirmation, with a required review. Regression bugs are also submitted through the same platform, ensuring transparency and traceability. The platform provides real‑time reminders, e.g., notifying submitters when a branch lacks review or when the release time changes.

1.2 Permission and approval workflow

Youzan Mobile uses platforms such as the Weex publishing platform, mobile configuration center, app distribution platform, and hot‑fix platform. A unified model standardizes permissions and approvals across these platforms, allowing new platforms to integrate via a common interface. Developers can request and approve permissions through enterprise WeChat (or DingTalk) with real‑time notifications.

For details, see the article “Standardization of Permission and Approval Process in Youzan Mobile”.

2. Dynamization and Cross‑Platform

Mobile app development differs from front‑end/back‑end in two ways: apps have version cycles, and native development requires separate codebases for Android and iOS. Therefore, dynamization and cross‑platform support are major themes.

2.1 Zan Weex construction

Various cross‑platform frameworks (Hybrid, RN, Weex, Flutter) aim to bridge platform differences. Youzan has explored both Weex and Flutter. Over half of monthly projects use Weex for some or all pages, while Flutter is being piloted.

Zan Weex achieves cross‑platform capability and page‑level dynamization, allowing pages to be added or modified without a new release.

The end‑to‑end solution includes scaffolding, ZanWeex SDK, build platform, publishing platform, hot‑deployment, and monitoring, lowering the barrier for Weex development and ensuring quality.

Example of image handling before optimization:

<imageclass="logo" src="https://img.yzcdn.cn/public_files/2018/10/12/1151d58514efbc645ea266610ad8b743.png"/>

After optimization, images are placed in the project directory and referenced with a relative path:

<imageclass="logo" src="resources/phone/stock/people.jpg"/>

The build process uploads image resources together with JS files to CDN, and the ZanWeex SDK intercepts rendering to rewrite URLs, enabling normal image rendering.

Benefits of Zan Weex:

Reduces development effort by nearly half for native‑JS interaction.

Supports dynamic release and rollback, with gray, conditional, and full releases.

Provides a stable development experience without fatal blockers.

Weex is suitable for new simple pages (display‑only or list‑type) and for major UI rewrites of existing pages that meet the above criteria.

2.2 App Configuration Center

The App Configuration Center delivers simple data, copy, and feature toggles dynamically via long‑connection, without requiring a new release or even app startup. It abstracts key‑value configurations, supporting gray, conditional, and full releases.

3. Efficiency and Quality

Efficiency and quality must be balanced; improving efficiency should not sacrifice quality. Continuous integration, logging, and monitoring contribute to both.

3.1 Continuous Integration

CI is essential for efficiency and quality. Youzan uses Jenkins for CI and builds a custom platform (MBD) on top of GitLab Runner, supporting Android test packages, online packages, hot‑fixes, iOS enterprise and release packages, Weex and Flutter builds, with extensive customization and data statistics.

Build results are synchronized to the APUB distribution platform, which supports gray, conditional, and full releases for Android, while iOS uses App Store’s gray release mechanism.

Hot‑fixes: Android integrates WeChat’s Tinker; iOS uses a Lua‑based hot‑fix, both supporting gray, conditional, and full releases.

3.2 Logging and Monitoring

Comprehensive logging (network, operation, business, error) is required for monitoring and troubleshooting. Logs are stored locally and uploaded on remote trigger, user action, or error level, using on‑demand upload to save storage.

The logging platform enables easy search and upload, greatly facilitating issue investigation.

3.3 Test Automation

Code coverage (Android JACOCO, iOS LCOV) and UI automation testing are explored using open‑source tools.

4. Collaboration

Collaboration occurs both with external teams and among internal mobile groups. Key aspects include the API glue layer and shared components.

4.1 API Glue Layer

Mobile teams act as a “mobile gateway” aggregating data from multiple backend domains (store, product, account, etc.) via a glue layer, avoiding the need to decide which domain provides a combined API. This improves ownership clarity, knowledge sharing, and unified monitoring.

4.2 Shared Components

Shared UI component libraries, networking, analytics, image handling, and account modules form a common foundation. Ownership is assigned, and contributions are managed via merge requests. A portal site lists all component libraries, owners, repositories, and documentation.

5. Reflections

For medium‑sized enterprises, building a complete mobile infrastructure is challenging; priorities depend on the company’s stage, needs, and long‑term plans. The rise of mobile middle‑platforms (e.g., Alibaba’s EMAS) offers a one‑stop solution, but Youzan chose to build its own, gaining deeper technical insight and continuous growth.

We have built a generic service to support gray, conditional, and full releases for both app publishing and hot‑fix deployment.

Recruitment: Youzan’s e‑commerce mobile team is hiring. Interested candidates can email [email protected].

Fluttermobile developmentCI/CDWeexCollaborationinfrastructureProcess Automation
Youzan Coder
Written by

Youzan Coder

Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.

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.