We are developing a Sitecore application and might need to install some Sitecore shared modules as we move forward. How best I should integrate the source code of these modules if needed? Do I create a separate project for each of these modules under Feature folder?
It depend on modules usage. For examples:
1) if you need to set up Wildcard module:
In this way if you have for example breadcrumb feature or for example some search feature should return wildcard specified url you might be able to add your module references to the feature. So in this case the good place would be the foundation layer. Because of direction of dependencies in Helix.
2) If you need to set up WFFM module:
This is the same like we have for wildcard module. You can have some feature which contain a big form. As well as for wilcard module the best place for WFFM would be the foundation layer.
The same for the EXM module.
So as you can see if you need to extend Sitecore Module functionality or use Sitecore Module in another Helix-modules the best way to put it to foundation layer. I think it makes sense because this is something stable and do not depend on another Helix-modules.
You can check it for Habitat here: Habitat foundation layer
I would say that modules by itself should follow Helix principles.
I would not try to make them Helix compatible without any reason. What is the profit of doing it in your case?
Personally, I don't see any value in moving items in content while the code is not respecting Helix principles. Messing with modules items/code will only make things harder when the time for an upgrade will come.