3 ms·
I got hired about a year ago at my current company. There are currently 20 teams sharing a monorepo based on NX and using angular as the dev framework, the prob
by stillbourne 5y ago
I got hired about a year ago at my current company. There are currently 20 teams sharing a monorepo based on NX and using angular as the dev framework, the problem though was that while they were using a monorepo to commit their code they were not using any of the nx features to build and deploy the application. The entire code base for the application was written as a monolith, there was one external lib that they were just using as a bucket for random shit. The problem was that each team was in charge of a product and each product had its own dead line and deployment schedule. The issue became that when one team needed to publish its work at the same time as another team and Team A had no issues but Team B's code resulted in a production issue both Team A and Team B had to have their deployment reverted to the previous version. Everyone was upset, they were talking about abandoning angular and switching to react. Like that would have changed anything, a monolith is a monolith however you write it. So I told them y'all doing this all wrong. I broke down the application into discreet layers: Styles, Atomic Components, Features, Kernel, Data Access, and Infrastructure. I showed them how to build a module and package each one as an npm package, demoed module federation and micro front ends. Upgraded the existing repo to consume federated modules and made a new repo for the new code. All components are not written in Storybook, each "product" is broken down into the correct layers, the layers all have defined documentation talking about the artifacts that are produced at each layer, every module has its own cypress suite, everything is modular and can be installed via npm. It's been a year since I started and we just deployed the first test module remote that has everything bundled as individual packages. I've never been so happy to reorg a project. I feel like I've obtained developer nirvana. I'm now a mad prophet bringing enlightenment to the unwashed masses.
- dkyu0510 5y agoAny suggested resources for doing this besides the nx docs?