>_ DevTrendsen

Language

Home

Languages

Sections

Frontend Backend Mobile DevOps AI / ML GameDev Blockchain Embedded Security
Kotlin

How the Official WooCommerce Android App Source Code is Structured

When you need to study the architecture of a large e-commerce Android app, finding a suitable example can be tricky. Most real-world projects are hidden in companies' private repositories, and public tutorials are limited to simple to-do lists. The WooCommerce mobile app is a welcome exception. The Automattic team keeps the client source code fully open.

The repository contains a full-featured Kotlin application used daily by thousands of online store owners. It's an excellent platform for learning practical architectural solutions, testing approaches, and layouts.

What's Inside the Project

The app is built around Kotlin and Android Jetpack components. Previously, the data layer lived in a separate FluxC library. Later, the developers moved this logic directly into the main repository.

Interesting detail: Google ML Kit is used for barcode scanning and text recognition on product packaging. This is one of the few proprietary dependencies in the project. If you plan to build without Google services, this module will need to be replaced.

The repository documentation includes guides on the following topics:

  • Setting up OAuth2 authorization for working with the WooCommerce REST API.
  • Supporting right-to-left (RTL) interfaces and localization.
  • Adapting screens for tablets and large screens.
  • Using feature flags for safe release of new features.

Building and Running

You can get the project running locally in a few minutes. The basic requirements are just Android Studio and an installed SDK.

First, clone the repository:

git clone https://github.com/woocommerce/woocommerce-android.git
cd woocommerce-android

Next, copy the configuration template to the secrets directory:

cp defaults.properties ~/.configure/woocommerce-android/secrets/secrets.properties

After that, open the folder in Android Studio. The GUI will create local.properties with SDK paths automatically. You can build a debug version or run tests from the terminal using standard Gradle commands:

./gradlew assembleVanillaDebug                         
./gradlew installVanillaDebug                          
./gradlew :WooCommerce:testVanillaDebugUnitTest        
./gradlew :WooCommerce:connectedVanillaDebugAndroidTest

Why You Should Study This Repository

In the WooCommerce Android code, you can find solutions to everyday tasks that mid-level or senior developers face:

  • Configured Detekt static analyzer with a ready-made set of rules matching team standards.
  • Automatic screenshot generation for Google Play through a special test run.
  • Organized analytics event tracking separately for basic store management and POS terminal.
  • Proper separation of styles and themes using Material Design.

Who Will Benefit from This Project

The repository will be useful for Android developers who want to see how a real Kotlin application with a rich history is structured. Here you can evaluate how Automattic's engineering team handles tech debt, structures modules, and integrates new Jetpack libraries.

If you're building your own e-commerce client or WordPress API integration, this code will save you a lot of time during the architecture design phase.

Related projects