We're building a complex system in NodeJS that will have a number of segments that are managed by separate teams, each of which represents a single feature of the system. Therefore, there will be one "master app" that includes each of these segments, or "modules", into a Web-based UI (using Express server, as of this writing).
Each segment may have one or more NodeJS module, and each team only has the authority to make changes to their respective segments, so there can be no unilateral cross-team interference, and each segment can be versioned, tested and released independently of other modules.
NodeJS is new to us, and we're struggling to understand how such an approach can be architected, as it seems like when you do a require() call to include a package, there is an underlying assumption that there is a single module. So, one of our fundamental questions is, how can you include a single package that allows for making require() calls for multiple modules from that package? Also, how to manage and version each segment/package, independently?
Also, from a Web server perspective, how are resources from the various packages (like CSS, images, etc.) combined to be accessible from the browser?
We're looking for suggestions, resources, knowledge - possibly even someone to come on-site to consult with us about architecting the development and deployment environments - to help kick-start us in the right direction. Any input is appreciated. :)