Actually, my biggest project, SHPS was managed as one application with many sub-modules. The code base grew and it became harder and harder to maintain (even though I am just one developer pushing out updates). So last month I decided: It's time! I carved out all the modules and put them into separate NPM packages. This decision has a lot of advantages, for example:
- When working on the code, I do not have to worry about other branches and merging lots and lots of code
- I can have different versions of dependencies for each module which means I can adopt newer breaking versions faster where needed
- It is easier for external contributors to understand a module's code and modify it
- In certain cases, the different modules can be installed in a newer version than allowed by the main project to get early access to new features
- Developing new features becomes a lot easier with one installation of the project, as all I have to do is work in one module, commit&push the changes, then re-install the module to reset the features for working on the next issue or feature (instead of re-installing the whole application)
- It is easier to see the interfaces of each module
- Modules can be easily exchanged by other modules (even 3rd party ones) as long as the API remains the same.
All in all it makes for a nice decoupled feeling!