Skip to content
Rittick DattaFULL STACK DEVELOPER

2026-11-07 · 16 min read

Frontend Architectures: Monolith, Monorepo, and Micro Frontends

Understand frontend architecture patterns, their trade-offs in scalability, cost, and complexity, and how to choose the right architecture for your product.

Frontend architectures: monolith, monorepo, and micro frontends

Imagine you're building an online store. At first, you have a homepage, a product listing, and a checkout page. A few developers can comfortably work on the same application. A year later, you have subscriptions, a seller dashboard, regional storefronts, and several teams making changes every day.

Should everything still live in one frontend application? Should the teams move into a single repository with multiple apps? Or should each team be able to ship its part of the website independently?

Those are frontend architecture decisions. They affect how quickly people can work, how safely they can release, how much infrastructure they need, and how difficult the system will be to maintain.

This guide explains three common approaches—monoliths, monorepos, and micro frontends—without assuming you've worked on a large frontend before. We'll compare their strengths and weaknesses, walk through realistic case studies, and finish with a framework you can use for your own product.

First, a distinction that changes the conversation

These three terms are often presented as alternatives, but they describe different dimensions:

  • Monolith describes an application boundary: one frontend application is typically built and deployed as a unit.
  • Monorepo describes a source-code boundary: multiple projects or packages live in one version-control repository.
  • Micro frontends describe architectural and ownership boundaries: different parts of the user experience are developed and often deployed independently, then integrated into one product.

A monolithic frontend can live in a monorepo. Micro frontends can also live in a monorepo. A monorepo does not automatically mean micro frontends, and multiple repositories do not automatically mean independent deployment.

A more useful way to think about your choices is to ask two questions:

  1. How should the running product be divided? One application or independently delivered parts?
  2. How should the code be stored and shared? One repository or multiple repositories?

We'll still examine all three approaches individually because each solves a different set of problems.

1. Monolithic frontend: start with one application

A frontend monolith is a single application that contains the product's pages, components, and features. It may be carefully divided into modules internally, but it is usually compiled and released together.

A monolithic frontend containing catalog, checkout, and account features in one application

Think of a restaurant with one kitchen. The team can coordinate easily, share ingredients, and deliver a consistent menu. But as the restaurant expands, everyone needs to coordinate changes in the same kitchen.

A typical React monolith might look like this:

src/
  app/
  features/
    catalog/
    checkout/
    account/
  components/
  services/

This is not bad architecture. Clear feature boundaries, lazy loading, automated tests, and good code ownership can make a monolith work well for a long time.

Advantages

  • Low initial cost: One application, build pipeline, deployment target, and observability setup are usually simpler to operate.
  • Low integration complexity: Shared routing, authentication, design system, and state management are easier to coordinate.
  • Fast early development: Small teams can make cross-feature changes without negotiating interfaces between independently deployed applications.
  • Consistent user experience: A single codebase and release process make it easier to maintain visual and behavioral consistency.

Disadvantages

  • Release coordination grows: A broken build or risky change can delay unrelated features because they share a release unit.
  • Organizational scalability can suffer: Many teams touching the same application may experience ownership conflicts, longer reviews, and shared CI bottlenecks.
  • Build and test costs can grow: Without modular builds and selective testing, every change may trigger expensive work.
  • Runtime blast radius may be wider: A serious error in shared code can affect many parts of the application, although error boundaries and isolation patterns can reduce this risk.

Does a monolith scale? Yes. A monolithic frontend can serve millions of users behind a CDN, and it can be split into lazy-loaded bundles. Its main limitation is often team and release independence, not the number of users it can serve.

Best fit: An MVP, a small-to-medium SaaS product, a content-heavy website, or a product owned by one closely collaborating team.

2. Monorepo: organize multiple projects together

A monorepo is one Git repository that contains multiple applications, libraries, or services. For example, a company might maintain its public storefront, internal admin dashboard, and reusable UI components together.

A monorepo with storefront and admin apps sharing a UI package

A possible structure:

apps/
  storefront/
  admin/
packages/
  ui/
  api-client/
  eslint-config/

Tools such as Nx, Turborepo, and workspace-aware package managers can help with dependency graphs, task caching, and running only affected builds. But the key idea is organizational: related projects share one repository.

Advantages

  • Easy code reuse: Shared UI components, types, API clients, and tooling can be maintained in one place.
  • Coordinated changes: A developer can update a shared package and all affected applications in one pull request.
  • Consistent standards: Common lint rules, test utilities, and design tokens are easier to enforce.
  • Better developer scalability: With clear ownership and affected-project CI, several teams can work on related applications without duplicating everything.

Disadvantages

  • Tooling complexity: Dependency graphs, caching, CI configuration, and workspace boundaries require investment.
  • CI cost can increase if configured poorly: Rebuilding every application for every change is expensive; selective builds and caching become important.
  • Coupling is still possible: Sharing a repository makes it tempting to create dependencies that should not exist.
  • Repository-wide coordination: Permissions, branch policies, and shared package changes can require additional governance as the organization grows.

Does a monorepo scale? It can improve developer productivity and codebase maintainability at scale, but it does not inherently improve website runtime performance, request throughput, or deployment independence. Those depend on the applications and delivery pipelines inside it.

What about cost? You may spend more on CI infrastructure and tooling, but reduce duplicated engineering effort and maintenance. The net cost depends on repository size, build strategy, and team discipline.

Best fit: A company with several related frontend applications, a shared design system, common API types, and teams that frequently make coordinated changes.

3. Micro frontends: divide the product by independently owned experiences

Micro frontends apply some ideas from microservices to the user interface. Instead of one team owning one large frontend release, teams own meaningful slices of the product—such as catalog, checkout, and account management—and integrate them into a unified experience.

Micro frontend application shell integrating independently owned catalog, checkout, and account experiences

The integration can happen at build time, on the server, or in the browser. Examples include route-level composition, server-side composition, and runtime module loading. Module Federation is one possible implementation technique, not the definition of micro frontends.

Imagine a shopping platform where the catalog team ships search improvements on Tuesday while the checkout team ships a payment update on Thursday. If the teams have genuinely independent delivery pipelines, neither needs to wait for a coordinated frontend release.

Advantages

  • Independent releases: Teams can deploy their owned areas without rebuilding and redeploying the entire product, when the integration model supports it.
  • Organizational scalability: Clear domain ownership can reduce cross-team coordination and release queues.
  • Smaller failure boundaries: Well-isolated experiences can sometimes fail or roll back independently.
  • Incremental modernization: A legacy section can be replaced one domain at a time rather than rewriting the whole application.

Disadvantages

  • Higher operational cost: More pipelines, artifacts, hosting decisions, observability, integration testing, and ownership processes may be required.
  • Higher technical complexity: Routing, authentication, cross-app communication, dependency versions, error handling, and design consistency become shared contracts.
  • Performance risks: Duplicate frameworks, repeated dependencies, extra network requests, and fragmented loading strategies can hurt page speed if unmanaged.
  • Harder end-to-end debugging: A customer journey may cross several independently released applications and teams.
  • Cross-domain changes can be expensive: A feature spanning catalog, checkout, and account may require versioned contracts and coordination.

Does it scale? Micro frontends can substantially improve team autonomy and release scalability for large organizations. They do not automatically increase traffic capacity or improve frontend performance. In fact, they may make performance worse without strict budgets and integration discipline.

Best fit: A large, long-lived product with clearly separated business domains, multiple capable teams, and a real need for independent delivery.

Compare the trade-offs

The following is a directional comparison, not a universal ranking. A well-engineered monolith can outperform a poorly engineered micro frontend system on almost every measure.

ConsiderationMonolithMonorepoMicro frontends
What it primarily definesApplication/release boundaryRepository organizationApplication and team boundaries
Initial setup complexityLowMediumHigh
Operational costUsually lowerDepends on contained apps and CIUsually higher
Shared code consistencyStraightforwardStrong with shared packagesRequires explicit contracts
Independent frontend releasesUsually limitedPossible, not guaranteedCore goal
Scaling to many teamsMore coordination neededHelps with shared code and toolingHelps when domains are independent
Runtime traffic scalabilityCan scale wellNot determined by repoNot automatically better
Cross-feature changesOften easyEasy across related projectsOften require coordination
Main riskShared release bottleneckUncontrolled dependency couplingDistributed complexity

Notice that the monorepo column is different: it is a repository strategy, so it can coexist with either of the other two.

Case studies: choosing based on the actual problem

Case 1: A startup building its first B2B SaaS product

Situation: Four engineers are building a project-management product with a dashboard, tasks, comments, and billing. They need to validate the idea quickly and keep infrastructure expenses low.

Recommended: A modular frontend monolith.

Why? The features share authentication, navigation, and data models. The same team owns the whole product, and frequent cross-feature changes are expected. Independent frontend deployments would add coordination and operational work without solving an existing bottleneck.

Scalability: Use feature folders, route-level code splitting, and automated tests. If traffic grows, CDN delivery and backend scaling can handle it without changing frontend architecture.

Cost and complexity: Lowest practical starting point. Reconsider only when release coordination or ownership becomes a measurable problem.

Case 2: A company with a storefront, admin console, and mobile web experience

Situation: Three teams maintain separate applications but share a design system, API client, localization utilities, and types. A shared component change currently requires updating several repositories manually.

Recommended: A monorepo with multiple applications and shared packages.

Why? The main pain is code duplication and coordinated maintenance, not necessarily independent runtime composition. A monorepo enables atomic changes across applications and consistent tooling while allowing each app to retain its own deployment pipeline.

Scalability: Improves codebase and developer workflow scalability. Configure affected-project builds, ownership rules, and dependency boundaries so CI remains fast.

Cost and complexity: Moderate initial tooling investment, potentially offset by less duplicated work. No need to introduce micro frontends solely because there are multiple apps.

Case 3: A large e-commerce marketplace with independent business teams

Situation: Hundreds of engineers work across catalog, search, checkout, seller tools, and customer accounts. Checkout changes require extra compliance reviews, while search experiments ship daily. A shared frontend release train slows everyone down.

Recommended: Micro frontends at stable domain boundaries, possibly stored in a monorepo.

Why? Teams have distinct ownership, release cadences, and risk profiles. A shell can provide navigation, authentication integration, and design standards while domain teams independently deliver their experiences. Prefer coarse-grained boundaries—such as a checkout journey—over splitting every widget into its own deployable app.

Scalability: Strong organizational and release scalability, assuming integration contracts are stable. Runtime performance still needs measurement and careful loading strategies.

Cost and complexity: Higher hosting, monitoring, integration testing, and platform-engineering costs. Worth considering when reduced release coordination and domain autonomy outweigh that overhead.

Case 4: A regulated banking or healthcare portal

Situation: An organization has customer onboarding, document review, payments, and account management. Some areas have strict audit and approval requirements; other areas change frequently.

Recommended: Start with domain and compliance boundaries, not an architecture label.

A modular monolith can be preferable when one controlled release, consistent auditing, and a small centralized team make compliance easier. If separate, well-staffed teams own independently governed journeys, micro frontends may help isolate release processes. A monorepo may support either approach by sharing design tokens, approved components, and security tooling.

Scalability: Evaluate the number of teams and frequency of independently approved changes—not just user traffic.

Cost and complexity: More independently deployed parts mean more security review surfaces, integration contracts, and audit evidence. Micro frontends are not inherently more secure or compliant; strong controls are required in every architecture.

Case 5: A news publication or content-focused website

Situation: A small editorial engineering team operates articles, search, subscriptions, and a lightweight account area. Performance, accessibility, SEO, and predictable operations matter more than independent team releases.

Recommended: A monolithic application with modular routes.

Why? A single rendering strategy and shared design system simplify consistency and performance optimization. Route-level splitting and caching address scale without introducing multiple frontend runtimes.

Scalability: A CDN and caching strategy may matter far more than frontend decomposition.

Cost and complexity: Lower operations burden, leaving more time for editorial workflows, Core Web Vitals, and accessibility.

Does business domain really matter?

Absolutely—but domain matters because it shapes boundaries and constraints, not because an industry always requires a particular architecture.

Ask whether your product has independently evolving business capabilities. Catalog and checkout may be different domains with different owners and release risks. By contrast, a settings modal and a button library are usually not meaningful micro frontend boundaries.

Also consider domain-specific constraints:

  • E-commerce: Checkout reliability, SEO, performance, experiments, and seasonal traffic may drive different choices for different journeys.
  • Finance and healthcare: Auditing, accessibility, security, data handling, and release approvals may outweigh team autonomy.
  • Enterprise SaaS: Multiple product modules, customer-specific configuration, and many feature teams may increase the value of shared packages or domain-level independence.
  • Media and publishing: Fast page loads, caching, and SEO may favor simpler rendering and deployment models.
  • Internal tools: Low operational overhead and fast iteration often matter more than sophisticated composition.

A product's domain boundaries are often a better guide than its industry label.

A practical decision framework

Before choosing, work through these questions in order.

1. What problem are you actually trying to solve?

If the problem is duplicated code across apps, investigate a monorepo and shared packages. If the problem is too many teams waiting on one release, investigate clearer ownership and potentially micro frontends. If there is no concrete bottleneck, a modular monolith is a strong default.

2. How many teams need to ship independently?

One or two teams can often coordinate in one application. Multiple teams with distinct domains and release schedules may benefit from independent delivery. Team count alone isn't sufficient: teams must have clear ownership and the ability to operate what they ship.

3. How frequently do features cross domain boundaries?

If nearly every feature touches the same shared state and user flow, splitting the runtime may increase coordination rather than reduce it. Stable contracts and relatively independent journeys are better candidates for micro frontends.

4. What are your performance and reliability constraints?

Measure bundle size, Core Web Vitals, failure isolation, and recovery time. More deployable units do not automatically produce faster pages or safer releases. Plan shared authentication, observability, and fallback behavior before runtime composition.

5. Can your team afford the operational overhead?

Independent deployments need CI/CD, monitoring, integration tests, ownership, and incident response. If those capabilities are missing, adding micro frontends may increase risk rather than reduce it.

6. Can you change the architecture incrementally?

Usually, yes. A common progression is:

Modular frontend monolith
       |
       | multiple related apps and shared libraries emerge
       v
Monorepo (optional repository choice)
       |
       | independent domain releases become a real need
       v
Selected micro frontend boundaries (optional runtime choice)

This is not a mandatory maturity ladder. Many successful products remain monoliths. Some organizations use micro frontends across multiple repositories. Architecture should follow demonstrated needs, not fashion.

Common mistakes to avoid

Mistake 1: "We expect millions of users, so we need micro frontends." Traffic scaling is mostly a delivery, caching, backend, and infrastructure concern. Choose micro frontends for ownership and release independence when justified.

Mistake 2: "We adopted a monorepo, so we have micro frontends." A shared Git repository does not imply independently delivered frontend experiences.

Mistake 3: "A monolith is unmaintainable." Poor modularity makes a monolith hard to maintain. Good module boundaries, tests, and code ownership can keep it healthy.

Mistake 4: "Every team should own a tiny UI component as a micro frontend." Overly granular boundaries increase network overhead, integration complexity, and inconsistent UX. Prefer meaningful business journeys.

Mistake 5: "Micro frontends eliminate coordination." They move coordination into API contracts, design systems, authentication, observability, and integration testing. The goal is to reduce unnecessary coordination, not eliminate it.

A quick architecture selection checklist

Before committing to a design, make sure you can answer:

  • What measurable problem does this architecture solve today?
  • Which business domains are genuinely independent?
  • Who owns each application or domain end to end?
  • Do teams need independent release schedules, or only shared code?
  • How will routing, authentication, and design consistency work?
  • What is the expected CI, hosting, monitoring, and maintenance cost?
  • How will you test cross-domain user journeys?
  • What happens when one part fails or must be rolled back?
  • Can we meet performance, accessibility, security, and compliance goals?
  • Can we start simpler and evolve when evidence supports it?

Final thoughts

There is no universal winner between a monolith, a monorepo, and micro frontends—because they don't all solve the same problem.

A monolith is often the fastest and most economical way to build a cohesive frontend. A monorepo helps related projects share code and evolve together. Micro frontends can help large organizations give domain teams more autonomy, but they introduce substantial integration and operational complexity.

My preferred starting point is simple: build clear domain boundaries in your code before turning those boundaries into independently deployed systems. Measure the friction your team experiences, and introduce more architectural complexity only when the benefits are concrete.

The best frontend architecture isn't the one that sounds most advanced. It's the one that helps your team deliver a reliable product with the least unnecessary complexity.