Skip to main content

Monorepo

What are monorepo advantages?

Two significant options for implementation are:

  1. NX
  2. TurboRepo

TurboRepo lags NX for features.

TurboRepo has been acquired by Vercel (circa Jan 2022) so expect more focus on improving the Developer Experience with ability for teams to scale complex solutions.

NX also offer NX.cloud as a platform to rival Vercel. ThoughtWorks is now trialing NX as a best practice tool for building monorepos in Javascript/Typescript.

Micro Architecture

See Javascript Monorepos by Robin Wieruch for comprehensive explanation.

Leverage monorepo architecture to orchestrate complex solutions from predictable, well tested, standardised components.

For a SaaS Product you will need a variation of:

  • Marketing Site
  • Web App
  • Mobile App
  • API Services

Using a monorepo you can create a shared library of (dockyard) of standardised frontend components and utility functions (shipping containers) and use a manifest to pick out the required stack elements to load applications (ships) faster. This is how the big players operate to maximise their leverage.

A monorepo architecture helps to orchestrate shipping what matters to the customer from a common source of components and libraries.

From the same code base, use Kubernetes to maintain the cloud infrastructure of services to provider data to the applications.

A single large source code repository that stores code and assets across all projects within an organization — has gained traction over the last few years, with Google popularizing the approach. The main benefits are to enable easier sharing of source code across teams, and even to make refactoring easier across the company-wide code base..

Tools

NameNotes
NX
TurboRepo

Resources

ContentType
Monorepos and Micro frontendsPodcast