I have two application running that share the same base code but with different css styling/logo. One version is a stripped down version of the other. The stripped down version is a branch but I don’t think that’s the best way to do it and recently I was thinking about creating a new repo but I’m not sure if it’s going to be better.
What are the best practices in this particular case?
I would run the same codebase, but use an environment variable to specify which CSS file you load. I did this for a client who had a system that was exactly the same except for CSS.
We actually used subdomain because it was one app running on many domains, but if it’s actually different servers then just specify the CSS file by environment variable.
I will look into Rails Engines. One example I can give you is Spree. They are an open source ecommerce platform that is widely use however each company has a different UI/css styling/logo/etc. I attached a link. It will probably have an upstart cost (time to learn how to properly extract the code base) but you will essentially have three code base, but two of them will be dependent on the engine. The core part of the app will be abstracted out.
I’m using a Rails Engine for this as well.
We had two online shops for two different categories of product, with branding and content tailored specifically to those products - but similar shopping cart and product selection functionality. After building the first site in a straightforward manner, I then migrated the reusable parts of it to an Engine, and set up the second site - in about a quarter of the time as the first - using the engine.
(Sadly, one of these sites went away due to a trademark dispute, but the other survives - still using the engine - and I hope to launch another someday).
The Rails Engine approach seems to be the right way. I will take a look into it. However, due to lack of time and man power, I think I will go with the env vars for now.