4 ms·
Monorepo with NPM workspace right for me?
For my startup, I have a project which has TypeScript server and client app. Workflow is much better while using mono repo with npm workspaces. Right now I am the only developer, thats fine. I am paranoid about the situation when I have multiple developer working on this project. With monorepo developers will have access to all code. Isn't it risky when one of developer go rouge and use the code to deploy it in his own server and market it? Isn't it especially risky for startup which less legal resource.
Sometime, I feel it is good approach to have server and client in different repo and have 2 different team dealing with it and have common code in git submodules. With this approach at least 2 developer have to go rouge, which is less probable.
What do you thing about this situation. Am I overthinking about situation? Is this the common problem, if so how organisations deal with it?
- verdverm 5y agoOver thinking this. It is highly unlikely that a dev would do this, and additionally successfully market it. There is benefit to devs having access to all the code, like better being able to debug errors and report bugs. This is orthogonal to mone/poly-repo. You'll want to think about build times, what has changed, integration testing, and releasing. This is more where the pros/cons come in.
- al2o3cr 5y agoand have 2 different team dealing with it So the ONLY time the two parts will be tested together is in production? Good luck with that. Isn't it especially risky for startup which less legal resource. If your startup can't afford litigation against someone who's literally _stolen_ the entire product, it's not much of a business. Final thought: the front-end side of the app is compiled and served to clients. Technically, a very malicious actor could acquire just the server code and run against the compiled assets.
- pavanputhra 5y agoNever thought that client side code is readily available. Thanks for insight.