DEV Community

Discussion on: Open source + proprietary code structure

Collapse
 
gwutama profile image
Galuh Utama • Edited

Generally, regardless of tech stack, I would design a plugin based architecture. The essential parts of the software would be part of the "core", including the plugin host. New functionalities can be added by extending the software with plugins.

This way, the plugins source code does not necessary have to live in the same repository as the "core" source code. Proprietary plugins can be hosted, e.g. in private repositories.

The "core" parts can be licensed under open source license. You can license the plugins under your own terms, and depending on your business model, you could also let community develop open source plugins for your software. You could also ship plugins that fall under the same open source license as the "core".

Collapse
 
mohanarpit profile image
Arpit Mohan

Thanks a lot for your response Galuh. The problem with a plugin approach is that it's hard to make everything in the platform a plugin. There are large swathes of code that can be converted into a plugin, but making "everything" a plugin is hard. There will always be a corner case that doesn't fit this bill.

I'm considering this approach and over the last few months, we re-factored some parts of the codebase as a plugin-based architecture. But, increasingly I'm of the opinion, that this is not a 100% foolproof solution.