I need suggestions on building a codebase that serves atleast 50 plus different brand websites owned by a single brand website. Each website has its own styles and themes, but we would like to use a centralized codebase similar to AEM Core components that can serve to all businesses. Now the question is how do we maintain all the site specific clientlibraries, configuration, editable templates etc for each different brand website. Any suggestions are welcome.
As @Ankur_Khare said, templates policies and page designs are the best way to manage different looks-and-feels across several brands... so long as the actual component behaviors required used across each of the 50 sites are the same (or similar enough that they can be grouped into one component and tweaked using policies).
However, if you need different component behaviors, then you will need different code bases, but that doesn't mean that you need to throw re-usability out of the window!
Take my current project for example: 4 sites with similar branding but different functions. A public website, 2 private websites and a fund-management solution. After analysis we found that despite some crucial differences in components and other elements of each solution (link management, workflows, etc), a good 80% of the code was actually shared (did you know that humans and chimps share approx. 98% of their DNA?). We extracted that code into a 5th project we called the "Base" ("common" or "core" where runners-up 😉) and did the majority of the implementation there, creating a project similar to AEM Core Components but for our company.