<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>monorepos &amp;mdash; Simple Engineering</title>
    <link>https://getsimple.works/tag:monorepos</link>
    <description></description>
    <pubDate>Tue, 21 Apr 2026 11:15:17 +0000</pubDate>
    <item>
      <title>nodejs monorepos</title>
      <link>https://getsimple.works/nodejs-monorepos?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[This blog is at the same time a reflection taking the monorepos route, from decision-making perspective and implementation side. This document takes two approaches to the problem. &#xA;&#xA;First, identify aspects that have to be containerized, test the containers both in development and production mode. &#xA;&#xA;Second, create the actual codebase built atop containers, to test and deliver code to production. It will be better if the CI/CD is included in this package.  &#xA;&#xA;  This article is under active development, more information is going to be added frequently, as I find free time. &#xA;&#xA;In this article we will talk about: &#xA;&#xA;What is the structure of a typical monorepo &#xA;What are the tools used to manage daily development activities  &#xA;Compared to multirepo project layout, What are the main components of a monorepo that do not exist in a multirepo, and vice versa &#xA;How do packages relate to the actual application from the content perspective&#xA;What are the key differences between a monorepo and monolith&#xA;What are key differences between a monorepo and a multi-repos&#xA;How is monorepo different from git-submodules&#xA;Is it possible to leverage git submodule add url projects/url to compose multiple projects into one independent project &#xA;What are the best strategies for transitioning from multi-repos to monorepo &#xA;What are the best strategies for transitioning from monolith to monorepo &#xA;How do frontend/backend/widgets code repositories fit into monorepo project layout architecture &#xA;How to deploy monorepo projects to different platforms (frontend and widgets to CDN, backend to backend servers) &#xA;How to share the core packages amongst monorepo components, without using npm &#xA;How packaging monorepo works &#xA;Do monorepo allow to deploy and install private packages&#xA;How to automate versioning in a monorepo context &#xA;How to automate change-log in a monorepo context &#xA;How to automate release notes in a monorepo context &#xA;How to automate deployment in a monorepo context&#xA;How to manage deployment keys in a monorepo context &#xA;&#xA;  Even though this blog post was designed to offer complementary materials to those who bought my Testing nodejs Applications book, the content can help any software developer to tuneup working environment. You use this link to buy the book.  Testing nodejs Applications Book Cover&#xA;&#xA;The monorepo project layout architecture &#xA;&#xA;The monorepo project layout architecture is ideal when planning to share Web UI/SDKs/API and backend code.&#xA;&#xA;Develop and Deploy your own React monorepo app in under 2 hours, using Lerna, Travis and Now.&#xA;&#xA;Building Large Scale React Applications in a monorepo architecture&#xA;&#xA;What are key differences between a monorepo and monolith&#xA;&#xA;Misconceptions about monorepos: monorepo != monolith ~ Nrwl Blog&#xA;monorepo and npm ~ npm Blog&#xA;&#xA;How is monorepo different from git-submodules&#xA;&#xA;monorepos in git ~ Atlassian Tutorials&#xA;Configuring npm for use with GitHub Package Registry ~ Github Articles&#xA;Why Babel Uses monorepo ~ Github Babel Design Docs&#xA;&#xA;Tools to manage monorepos &#xA;&#xA;npm is not well-positioned to manage monorepos, as we write this article. There are however other tools that help to achieve that. Here is a non exhaustive list:&#xA;&#xA;learna ~ community-backed &#xA;rush ~ Microsoft backed&#xA;yarn ~ Facebook backed. Uses workspaces, but in reality, they are monorepo components as well.&#xA;&#xA;How to successfully manage a large scale JavaScript monorepo aka megarepo ~ Jonathan Creamer Blog&#xA;&#xA;Sharing code between repos in the same monorepos, without needing npm&#xA;&#xA;The package.json&#39;s private: true property makes sure npm doesn&#39;t search npm, but relies on git/github. One extra mile when using monorepos, is to share the code using tar files.&#xA;&#xA;It is possible to use tar files. That will require reach release to have its own tar file that is deployable and reachable for a particular endpoint. &#xA;&#xA;{&#xA;    dependencies: {&#xA;      &#34;common-package&#34;: &#34;file:../common-package&#34;, //OR&#xA;      &#34;tar-common-package&#34;: &#34;github.com/../../common-package.tar.gz&#34;,&#xA;    }&#xA;  }&#xA;&#xA;  github.com makes it possible to run installations(packages) from its servers. &#xA;&#xA;JavaScript monorepo ~ Using learna &#xA;&#xA;Sharing code via npm without opening an npmjs.com account&#xA;&#xA;This section introduces two concepts, with direct dependency on each other. The first concept deals with using git/github as an npm hub. This concept makes it possible to avoid opening an account on hosting services such as npmjs, while being able to keep private packages. The second concept makes sure private packages are installable using npm install just like regular packages.&#xA;&#xA;Alternatively, there is a new infrastructure that github.com rolled out. Those are packages that can be installed using npm installer. We will see how to operate these as well.  &#xA;&#xA;How to manage authentication keys&#xA;&#xA;One of the problems sharing a large codebase relates to security. How is it possible to share authentication keys, such as database passwords, without compromising the overall security of the application? &#xA;&#xA;Where to store the private keys&#xA;Using services such as git-secret&#xA;Using services such as git-crypt&#xA;Safely Storing Secrets in Git&#xA;Best practices for securely storing API keys&#xA;&#xA;Containerization with Docker &#xA;&#xA;Docker makes it possible to run a stack of applications, regardless of the system the application is developed on. Docker makes it possible to simulate with success the application behavior once the application finally hits the production servers. &#xA;&#xA;Building Efficient Dockerfile ~ BitJudo blog&#xA;&#xA;Container Orchestration with kubernetes &#xA;&#xA;If Docker symbolizes Containerization, kubernetes is aligning itself as the best container orchestration resource. This guide provides resources to get started, and the basic designs that are commonly used in the MEAN stack world. &#xA;&#xA;  Installation can be done via MacPorts or Homebrew. It is always possible to use binaries as well.&#xA;&#xA;How to install kubernetes on MacoOS&#xA;&#xA;Containerized database &#xA;&#xA;This section is an exploration of the implementation of a clustered database. We will see what it takes to deploy a containerized database, how to add upgrade new engines, how to backup and migrate data, how to migrate to new models.&#xA;&#xA;mongodb-enterprise-kubernetes&#xA;&#xA;How to deploy monorepo apps&#xA;&#xA;In a multi-documents context, how to deploy one section to one platform and another section to another platform? &#xA;&#xA;Every single build has to have a corresponding individual deploy script. Push to deploy would be a challenge, unless there is an alternative to selectively detect which part has to go were. Else, all servers running an instance of code, have to have a copy of the full monorepo code.  &#xA;&#xA;How to deploy multiple apps in a monorepo with Heroku &#xA;Continuous integration in projects using monorepos&#xA;DevOps ~ using ansible &#xA;How to set up CI/CD Pipeline for a node.js app with Jenkins ~ Moshe Ezderman - Medium&#xA;&#xA;Conclusion&#xA;&#xA;In this article, we reviewed what it takes, and reasons to move to a monorepo architecture. We also revisited the monorepo coupled with the containerization technique to deliver a better developer experience. There are additional complimentary materials in the &#34;Testing nodejs applications&#34; book.  &#xA;&#xA;References&#xA;&#xA;Testing nodejs Applications book&#xA;monorepos in the wild ~ @maoberlehner Medium&#xA;We went monorepo ~ Invisible Reports Medium&#xA;&#xA;#nodejs #monorepos #multirepos #monolyths #microservice]]&gt;</description>
      <content:encoded><![CDATA[<p>This blog is at the same time a reflection taking the <code>monorepos</code> route, from decision-making perspective and implementation side. This document takes two approaches to the problem.</p>

<p>First, identify aspects that have to be containerized, test the containers both in development and production mode.</p>

<p>Second, create the actual codebase built atop containers, to test and deliver code to production. It will be better if the CI/CD is included in this package.</p>

<blockquote><p>This article is under active development, more information is going to be added frequently, as I find free time.</p></blockquote>

<p><strong><em>In this article we will talk about:</em></strong></p>
<ul><li>What is the structure of a typical <code>monorepo</code></li>
<li>What are the tools used to manage daily development activities<br/></li>
<li>Compared to <code>multirepo</code> project layout, What are the main components of a <code>monorepo</code> that do not exist in a <code>multirepo</code>, and <em>vice versa</em></li>
<li>How do packages relate to the actual application from the content perspective</li>
<li>What are the key differences between a <code>monorepo</code> and <code>monolith</code></li>
<li>What are key differences between a <code>monorepo</code> and a multi-repos</li>
<li>How is <code>monorepo</code> different from <code>git-submodules</code></li>
<li>Is it possible to leverage <code>git submodule add &lt;url&gt; projects/url</code> to compose multiple projects into one independent project</li>
<li>What are the best strategies for transitioning from multi-repos to <code>monorepo</code></li>
<li>What are the best strategies for transitioning from <code>monolith</code> to <code>monorepo</code></li>
<li>How do frontend/backend/widgets code repositories fit into <code>monorepo</code> project layout architecture</li>
<li>How to deploy <code>monorepo</code> projects to different platforms (frontend and widgets to CDN, backend to backend servers)</li>
<li>How to share the core packages amongst <code>monorepo</code> components, without using <code>npm</code></li>
<li>How packaging <code>monorepo</code> works</li>
<li>Do <code>monorepo</code> allow to deploy and install private packages</li>
<li>How to automate versioning in a <code>monorepo</code> context</li>
<li>How to automate change-log in a <code>monorepo</code> context</li>
<li>How to automate release notes in a <code>monorepo</code> context</li>
<li>How to automate deployment in a <code>monorepo</code> context</li>
<li>How to manage deployment keys in a <code>monorepo</code> context</li></ul>

<blockquote><p>Even though this blog post was designed to offer complementary materials to those who bought my <strong><em><a href="https://bit.ly/2ZFJytb">Testing <code>nodejs</code> Applications book</a></em></strong>, the content can help any software developer to tuneup working environment. <strong><em><a href="https://bit.ly/2ZFJytb">You use this link to buy the book</a></em></strong>.  <a href="https://bit.ly/2ZFJytb"><img src="https://snap.as/a/42OS2vs.png" alt="Testing nodejs Applications Book Cover"/></a></p></blockquote>

<h2 id="the-monorepo-project-layout-architecture" id="the-monorepo-project-layout-architecture">The <code>monorepo</code> project layout architecture</h2>

<p>The <code>monorepo</code> project layout architecture is ideal when planning to share Web UI/SDKs/API and backend code.</p>
<ul><li><p><a href="https://codeburst.io/develop-and-deploy-your-own-react-monorepo-app-in-under-2-hours-using-lerna-travis-and-now-2b140d647238">Develop and Deploy your own React <code>monorepo</code> app in under 2 hours, using Lerna, Travis and Now.</a></p></li>

<li><p><a href="https://medium.com/@luisvieira_gmr/building-large-scale-react-applications-in-a-monorepo-91cd4637c131">Building Large Scale React Applications in a <code>monorepo</code> architecture</a></p></li></ul>

<h2 id="what-are-key-differences-between-a-monorepo-and-monolith" id="what-are-key-differences-between-a-monorepo-and-monolith">What are key differences between a <code>monorepo</code> and <code>monolith</code></h2>
<ul><li>Misconceptions about <code>monorepos</code>: <code>monorepo</code> != <code>monolith</code> ~ <a href="https://blog.nrwl.io/misconceptions-about-monorepos-monorepo-monolith-df1250d4b03c">Nrwl Blog</a></li>
<li><code>monorepo</code> and <code>npm</code> ~ <a href="https://blog.npmjs.org/post/186494959890/monorepos-and-npm"><code>npm</code> Blog</a></li></ul>

<h2 id="how-is-monorepo-different-from-git-submodules" id="how-is-monorepo-different-from-git-submodules">How is <code>monorepo</code> different from <code>git-submodules</code></h2>
<ul><li><code>monorepos</code> in git ~ <a href="https://www.atlassian.com/git/tutorials/monorepos">Atlassian Tutorials</a></li>
<li>Configuring <code>npm</code> for use with GitHub Package Registry ~ <a href="https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry">Github Articles</a></li>
<li>Why Babel Uses <code>monorepo</code> ~ <a href="https://github.com/babel/babel/blob/master/doc/design/monorepo.md#why-is-babel-a-monorepo">Github Babel Design Docs</a></li></ul>

<h2 id="tools-to-manage-monorepos" id="tools-to-manage-monorepos">Tools to manage <code>monorepos</code></h2>

<p><code>npm</code> is not well-positioned to manage <code>monorepos</code>, as we write this article. There are however other tools that help to achieve that. Here is a non exhaustive list:</p>
<ul><li><a href="https://lerna.js.org/"><code>learna</code></a> ~ community-backed</li>
<li><a href="https://rushjs.io/pages/intro/welcome/"><code>rush</code></a> ~ Microsoft backed</li>

<li><p><a href="https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/"><code>yarn</code></a> ~ Facebook backed. Uses workspaces, but in reality, they are <code>monorepo</code> components as well.</p></li>

<li><p>How to successfully manage a large scale JavaScript <code>monorepo</code> aka <code>megarepo</code> ~ <a href="https://www.jonathancreamer.com/how-to-successfully-manage-a-monorepo-aka-megarepo/">Jonathan Creamer Blog</a></p></li></ul>

<h2 id="sharing-code-between-repos-in-the-same-monorepos-without-needing-npm" id="sharing-code-between-repos-in-the-same-monorepos-without-needing-npm">Sharing code between repos in the same <code>monorepos</code>, without needing <code>npm</code></h2>

<p>The <code>package.json</code>&#39;s <code>private: true</code> property makes sure <code>npm</code> doesn&#39;t search <code>npm</code>, but relies on <code>git/github</code>. One extra mile when using <code>monorepos</code>, is to share the code using tar files.</p>

<p>It is possible to use tar files. That will require reach release to have its own tar file that is deployable and reachable for a particular endpoint.</p>

<pre><code class="language-json">{
    dependencies: {
      &#34;common-package&#34;: &#34;file:../common-package&#34;, //OR
      &#34;tar-common-package&#34;: &#34;github.com/../../common-package.tar.gz&#34;,
    }
  }
</code></pre>

<blockquote><p><code>github.com</code> makes it possible to run installations(packages) from its servers.</p></blockquote>
<ul><li><a href="https://blog.scottlogic.com/2018/02/23/javascript-monorepos.html">JavaScript <code>monorepo</code> ~ Using <code>learna</code></a></li></ul>

<h2 id="sharing-code-via-npm-without-opening-an-npmjs-com-account" id="sharing-code-via-npm-without-opening-an-npmjs-com-account">Sharing code via <code>npm</code> without opening an <code>npmjs.com</code> account</h2>

<p>This section introduces two concepts, with direct dependency on each other. The first concept deals with using <code>git/github</code> as an <code>npm</code> hub. This concept makes it possible to avoid opening an account on hosting services such as <code>npmjs</code>, while being able to keep private packages. The second concept makes sure private packages are installable using <code>npm install</code> just like regular packages.</p>

<p>Alternatively, there is a new infrastructure that <a href="github.com">github.com</a> rolled out. Those are packages that can be installed using <code>npm</code> installer. We will see how to operate these as well.</p>

<h2 id="how-to-manage-authentication-keys" id="how-to-manage-authentication-keys">How to manage authentication keys</h2>

<p>One of the problems sharing a large codebase relates to security. How is it possible to share authentication keys, such as database passwords, without compromising the overall security of the application?</p>
<ul><li><a href="https://softwareengineering.stackexchange.com/questions/220950/where-to-store-the-private-key">Where to store the private keys</a></li>
<li><a href="https://git-secret.io/">Using services such as <code>git-secret</code></a></li>
<li><a href="https://github.com/AGWA/git-crypt">Using services such as <code>git-crypt</code></a></li>
<li><a href="https://embeddedartistry.com/blog/2018/3/15/safely-storing-secrets-in-git">Safely Storing Secrets in Git</a></li>
<li><a href="https://embeddedartistry.com/blog/2018/3/15/safely-storing-secrets-in-git">Best practices for securely storing API keys</a></li></ul>

<h2 id="containerization-with-docker" id="containerization-with-docker">Containerization with Docker</h2>

<p>Docker makes it possible to run a stack of applications, regardless of the system the application is developed on. Docker makes it possible to simulate with success the application behavior once the application finally hits the production servers.</p>
<ul><li>Building Efficient Dockerfile ~ <a href="https://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/">BitJudo blog</a></li></ul>

<h2 id="container-orchestration-with-kubernetes" id="container-orchestration-with-kubernetes">Container Orchestration with <code>kubernetes</code></h2>

<p>If Docker symbolizes Containerization, <code>kubernetes</code> is aligning itself as the best container orchestration resource. This guide provides resources to get started, and the basic designs that are commonly used in the MEAN stack world.</p>

<blockquote><p>Installation can be done via MacPorts or Homebrew. It is always possible to use binaries as well.</p></blockquote>
<ul><li><a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-macos">How to install <code>kubernetes</code> on MacoOS</a></li></ul>

<h2 id="containerized-database" id="containerized-database">Containerized database</h2>

<p>This section is an exploration of the implementation of a clustered database. We will see what it takes to deploy a containerized database, how to add upgrade new engines, how to backup and migrate data, how to migrate to new models.</p>
<ul><li><a href="https://github.com/mongodb/mongodb-enterprise-kubernetes"><code>mongodb-enterprise-kubernetes</code></a></li></ul>

<h2 id="how-to-deploy-monorepo-apps" id="how-to-deploy-monorepo-apps">How to deploy <code>monorepo</code> apps</h2>

<p>In a multi-documents context, how to deploy one section to one platform and another section to another platform?</p>

<p>Every single build has to have a corresponding individual deploy script. Push to deploy would be a challenge, unless there is an alternative to selectively detect which part has to go were. Else, all servers running an instance of code, have to have a copy of the full <code>monorepo</code> code.</p>
<ul><li><a href="https://medium.com/inato/how-to-setup-heroku-with-yarn-workspaces-d8eac0db0256">How to deploy multiple apps in a <code>monorepo</code> with Heroku</a></li>
<li><a href="https://hackernoon.com/continuous-integration-in-projects-using-monorepo-9b828d7a8dfa">Continuous integration in projects using <code>monorepos</code></a></li>
<li><a href="https://docs.ansible.com/ansible/latest/user_guide/playbooks.html">DevOps ~ using <code>ansible</code></a></li>
<li>How to set up CI/CD Pipeline for a <code>node.js</code> app with Jenkins ~ <a href="https://medium.com/@mosheezderman/how-to-set-up-ci-cd-pipeline-for-a-node-js-app-with-jenkins-c51581cc783c">Moshe Ezderman – Medium</a></li></ul>

<h2 id="conclusion" id="conclusion">Conclusion</h2>

<p>In this article, we reviewed what it takes, and reasons to move to a <code>monorepo</code> architecture. We also revisited the <code>monorepo</code> coupled with the containerization technique to deliver a better developer experience. There are additional complimentary materials in the <strong><a href="https://bit.ly/2ZFJytb">“Testing <code>nodejs</code> applications”</a></strong> book.</p>

<h2 id="references" id="references">References</h2>
<ul><li><a href="https://bit.ly/2ZFJytb">Testing <code>nodejs</code> Applications book</a></li>
<li><code>monorepos</code> in the wild ~ <a href="https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9">@maoberlehner Medium</a></li>
<li>We went <code>monorepo</code> ~ <a href="https://medium.com/invisible-reports/report-we-went-monorepo-c0aadd144fb">Invisible Reports Medium</a></li></ul>

<p><a href="https://getsimple.works/tag:nodejs" class="hashtag"><span>#</span><span class="p-category">nodejs</span></a> <a href="https://getsimple.works/tag:monorepos" class="hashtag"><span>#</span><span class="p-category">monorepos</span></a> <a href="https://getsimple.works/tag:multirepos" class="hashtag"><span>#</span><span class="p-category">multirepos</span></a> <a href="https://getsimple.works/tag:monolyths" class="hashtag"><span>#</span><span class="p-category">monolyths</span></a> <a href="https://getsimple.works/tag:microservice" class="hashtag"><span>#</span><span class="p-category">microservice</span></a></p>
]]></content:encoded>
      <guid>https://getsimple.works/nodejs-monorepos</guid>
      <pubDate>Thu, 17 Jun 2021 04:52:24 +0000</pubDate>
    </item>
  </channel>
</rss>