I’ve been showing certain parts of my app to freelancers to see what they would charge to build new features and generally improve the app as a whole. Is this a mistake on my part to offer all of this information to coders?
You should always exercise control over your IP. If you are showing them underlying code and asking them for a proposal, you should ask for an NDA. If you contract them, you should ask for a PIIA.
I agree with @Dane. Also, expose as little of your code, as possible to contractors. Or anyone, for that matter.
Access to source code should be on a need-to-know basis.
IP isolation is one reason for a modular system. There are many others, from technical, to legal...
We have a highly modular system that allows us to freely expose the API and the source for most plugins, but access to the system core is on a need-to-know basis (if you designed the core and the API well, there shouldn't be a need to know...).
Agree with Dane. Also the issue is the location of these freelancers. If they are in a foreign country, an NDA probably won't help much. If you are connected with these freelancer through a reliable third party such as biz partner, etc., that may help in terms of their being faithful.