As an AI and Software Engineer, I love contributing to the community. However, sharing even a "simple" code snippet from a client project can lead to a breach of NDA.
1. The 'Trade Secret' Definition
Most freelance contracts define "Trade Secrets" broadly. If you share a specific algorithm or a database schema that gives your client a competitive edge, you are in high-risk territory.
2. Derivative Works
Even if you rewrite the code from scratch, if it’s based on the specific logic you built for a client, it may be considered a "Derivative Work" that the client legally owns.
3. Privacy-First Coding
When documenting your work or preparing case studies, use local tools to avoid accidental data leaks.
💡 Secure Your Documentation with DocuFix
If you need to include screenshots of your UI or code but need to resize them for a portfolio, don't use cloud editors. Use DocuFix.in—a Zero-Upload application where everything is processed locally.
Frequently Asked Questions (FAQ)
Can I share 'General Knowledge'?
Yes. You cannot be sued for using general coding patterns or standard libraries. The risk is in sharing the business logic that is unique to that client.
Is code on GitHub Public by default?
If you push client code to a public repo, you have almost certainly violated your contract. Always use private repos and verify who has access.
Should I use a 'Code Redaction' tool?
Yes. Before sharing anything, ensure you've removed all client-specific names, URLs, and API keys.