I have a web project in Phoenix. It’s the main project, the bare minimum and let’s refer to it as P1. Say, it’s a blog, for simplicity. And there’re 100 customers that use P1 and every one wants to adjust, slightly, a copy of P1 to his needs.
I want to be able to replicate it thus creating, say, 100 copies of it. All the copies will be very similar to P1 in the terms of the code, yet each one will have around 10% of custom code, settings and unique features. These could be: additional fields in a database and model, additional route, modified html code on some pages or navidation menu or footer on the html pages, additional controller, css styles, js code, etc.
I’ll continue working on P1 and improve it. And it want to be able to incorporate the improvements into the projects-copies via git, into all the hundred, without having to deal with the hell of merging the code into each one. The code of P1 is the base and has the priority over the code of any child project.
Using branches for that, a branch per project, in git won’t work well.
Question: How should one go about building this type of architecture?
variant 1: adding new or modifying existing Elixir code in the child projects is optional because otherwise it’d be difficult to deal with.