I have looked at many related/similar questions, but could not find any sufficient answer to my question.
I have a Gatsby/React project, for which I have one private git repository which is hosted on github. I want to be able to let freelancers work on parts of the project, but I don't want them to be able to see the source code for some parts of the project (at least certain modules and components, perhaps even the main setup of the Gatsby project). They do need to be able to run and test the functionality they create or work on though, which means they need to somehow still get access to the modules/components/config/etc for which I don't want them to see the original code (minified/uglified would be ok).
I know about submodules, but these seem to have a lot of issues which make them unusable for this, mainly:
- if I only give a freelancer access to a submodule repository, they can't test integration with the system locally in order to develop with ease and speed. I could probably let them push/merge the submodule into a test branch and have them see the result in a test CI/CD setup. But this means it would take ages to get feedback on every small change.
- I have tried out submodules before, and ran into several issues which I couldn't find the solution for easily. Submodules seem to be a bit hard to use, and easy to make mistakes with. Not many developers are experienced with them, and I may end up wasting a lot of time fixing issues with them. I think the use of subtrees instead of submodules can take away a lot of the issues in this point, but it wouldn't help with nr 1, so submodules or subtrees don't seem to be a solution to my problem
Is there some kind of setup I can use to fix my problem and hopefully avoid these issues?