title: How do I white label a SaaS solution?
body: <p>I'm building a SaaS product, and one of the top customer requirements is that they be allowed to white label it.</p>
  
  <ul>
  <li>Customer domain</li>
  <li>Include customer logo in UI</li>
  <li>Change color schemes to match customer branding</li>
  </ul>
  
  <p>Of everything that needs to be done, I think the easiest part for me to grasp is setting up the custom subdomain (I'm running on AppEngine, but it's pretty straightforward on any server setup).</p>
  
  <p>My main questions revolve around best practices on the front end styling. My setup requires for me to define colors both to overwrite CSS rules and to overwrite Javascript variables. The assumptions I'm making are that I am storing any image assets / paths and color information in the database. These are the two paths that I'm considering, but both seem to have pretty serious flaws.</p>
  
  <ol>
  <li>Deployment task - Before deployment, run a Grunt (or other automation) task that pulls customer styling information from the database and creates custom CSS / JS files per </li>
  <li>Runtime - During application bootstrapping, pull customer info from db and overwrite styling dynamically (inline styles, JS overrides, etc)</li>
  </ol>
  
  <p>I've looked a lot for recommendations or other experiences and have come up empty. What are best practices for white labelling? Should I continue down one of these two paths or is there a better option? What pitfalls should I be aware of? Are there performance implications for the different options?</p>
  
  <p><em>This question is purposefully language and framework agnostic, as the basic principles should be the same, no matter how it is implemented.</em> </p>