1

My Proposed Monorepo Architecture

enter image description here

This layout is what I've come up with from reading through tons of articles and being convinced that Nx suits many of our needs where I work. The layout works fine for a company of this size because we need opinionated architecture to keep things running smoothly.

Goal

I want to achieve isolated development, testing, and deployment while using a monorepo.

I have a few concerns with common workflows that I'm not sure how to approach just yet.

Questions

Case 1: I want to work only on homepage, how can I avoid having to have the entire mono repo locally?

  • I read about how Microsoft solved for this, but we don't have access to Azure DevOps at the moment and I wonder if this isn't solvable in some other way. Also, the open source tool they built requires a platform compatible with it, such as Azure DevOps.
  • Are Git subtrees a solve for this? Would my monorepo look like a collection of child repos (subtrees) that, in reality, live in their own repos, and are just declared here for build/deploy reasons? This seems to ruin all the benefits of having a mono repo in the first place.

Case 2: I want to deploy changes I made to the homepage app without having to build & deploy every app in the monorepo. How?

  • Is Jenkins able to use Webpack to solve for this and build & deploy only specified apps or changed apps? Even if all of it is in a single repo?

This may be a simple case of not knowing what to search for, but federated modules and monorepos are also relatively new.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.