> I admittedly struggle with is knowing when to create a new Nest Module versus a new service in an already existing module
I use the same logic as where to put a font end component. If I'm creating a component for the first time, it sits in the same folder as the parent component. If I need to use it with another component, I refactor it into a common folder. If I create a string transformation function, it exists in the same file that is using it. If I need to use it somewhere else, it gets refactored into utils/strings.js which is a starting place for creating a library.
It solves the problem of 'where does this go?' and 'where did I put it?' 95% of code that I need to find will be physically next to the code that uses it in a file system. If not it will be neatly organized into a common use directory.
For the few times I need to refactor functionality, at that point, I will invest time to make a clear and adaptable API input and output contract.
I use the same logic as where to put a font end component. If I'm creating a component for the first time, it sits in the same folder as the parent component. If I need to use it with another component, I refactor it into a common folder. If I create a string transformation function, it exists in the same file that is using it. If I need to use it somewhere else, it gets refactored into utils/strings.js which is a starting place for creating a library.
It solves the problem of 'where does this go?' and 'where did I put it?' 95% of code that I need to find will be physically next to the code that uses it in a file system. If not it will be neatly organized into a common use directory.
For the few times I need to refactor functionality, at that point, I will invest time to make a clear and adaptable API input and output contract.