How We Manage Multiple Angular Mobile Apps in a Monorepo

How We Manage Multiple Angular Mobile Apps in a Monorepo

How We Manage Multiple Angular Mobile Apps in a Monorepo

🧩 Managing Multiple Mobile Apps with a Monorepository

At Bluesunrise, we worked with a client who needed multiple similar mobile apps. These apps shared functionality, components, and design. To build and maintain them efficiently, we decided to use a monorepo architecture.

This allowed us to keep everything in one place, reduce development cost, and share logic through a custom Angular library.

πŸ—‚οΈ Project Structure

We created a single GitHub repository containing multiple applications and a shared library:

root/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ pnumbers/
β”‚ β”œβ”€β”€ fnumbers/
β”‚ β”œβ”€β”€ mnumbers/
β”‚ β”œβ”€β”€ weld-office/
β”‚ └── weld-lib/ ← shared library
β”œβ”€β”€ package.json ← common dependencies and scripts

βš™οΈ How Angular Handles It

All apps are registered in the angular.json configuration file. Each app has its own settings for building, serving, testing, etc.

Here’s a simplified part of it:

"projects": {
  "pnumbers": {
    "root": "apps/pnumbers",
    "projectType": "application",
    "architect": {
      "build": {
        "options": {
          "outputPath": "apps/pnumbers/www",
          "styles": [
            "apps/pnumbers/src/styles.scss",
            "apps/weld-lib/assets/styles/weld-global.scss"
          ]
        }
      }
    }
  },
  "weld-lib": {
    "projectType": "library",
    "root": "apps/weld-lib"
  }
}

This approach makes it easy to define separate build and serve configurations for each app while sharing the core functionality from weld-lib.

βœ… Benefits of a Monorepo

Using a monorepository gave us several advantages:

⚠️ Challenges to Consider

While monorepos are powerful, they also introduce complexity. Here are a few trade-offs we had to manage:

πŸš€ Final Thoughts

Despite the extra complexity, the monorepo approach was the right decision for this project. It helped us move fast, keep things DRY, and ensure a consistent experience across all the mobile apps.

If your team is working on multiple similar projects, or you plan to scale, a monorepo might be the perfect fit.