HACKER Q&A
📣 hecklr

What's the best way to split SaaS code between commercial and free?


How do you manage your SaaS codebase when you have both a free and a commercial offering? Are there tools/frameworks that manage this? Do you use two repositories or two branches? I'd like to minimize copy-pasted code, but in the commercial offering the code is interspersed with the appropriate stripe calls, etc., and in the self-hosted (free) code, these paywall restrictions are limited.


  👤 gerardnico Accepted Answer ✓
If private package present, run otherwise do nothing.