Introducing a monorepo for desk and cloud using nrwl

Discover the world of IT

Introducing a monorepo for desk and cloud using nrwl

My master thesis provided a process to follow to migrate a desktop application to a cloud based system. With the possibility of using the cloud enabled code in the cloud as well as on the desktop.

When the first wrote my thesis it was to develop this working process to migrate an application called the INTO-CPS application. The desktop application of the INTO-CPS application was build using web technologies, which seemed easy at first as it uses web based technologies it should be able to be moved to the cloud and executed out of the box. However, this was not the case based on many design differences between a desktop design for the single user and a cloud design introducing multi-user and additional complexities.

This post I will introduce a new technology named nrwl (nx), which allows for is building a repository that allows multiple application to be build in the same repository reusing blocks of code. In the next post we will take a look at how the structure of a nrwl repository allows the reuse and how to keep a good structured code when developing for multiple applications at once.

This allows for a cloud application frontend to be developed using Angular and be build and deployed as an individual component. Additionally, this also becomes possible using nrwl for the many microservices that you might have using Angular or NodeJS.

Taking the nrwl a step further and use the nstudio xplat, which is a nrwl tool that allow further technologies to be included to a repository such as ElectronJS.

This makes it possible to develop an ElectronJS application that reuses the frontend and backend code blocks to rebuild an unique desktop application that can be developed to run on moth Mac, Windows and Linux distributions. Thereby, allowing us to develop for both cloud and desktop and even reuse the code more efficiently compared to having multiple repositories.

This post is part of a longer series that my blog will continue to explore and build upon. The next post will include a proper guide to create an monorepo with a small video illustrating the creation of a monorepo using xplat and nrwl to create a repository containing 2 Angular frontends one for the desktop another for the Cloud, and a backend application which components can be used by the desktop frontend instead of using the internet to call remote functions.

Leave a Reply

Your email address will not be published. Required fields are marked *