Recently just built and deployed an enterprise (on-prem) offering for my startup https://commando.io.
The single biggest problem by far was ripping/replacing 3rd party SaaS services that we use/pay for with native code. While building a SaaS it is wonderful to use 3rd parties to save time and complexity. Examples include Stripe (payments), Rollbar (error tracking), Intercom (support/engagement), Iron.io (queue and async tasks), Gauthify (two factor auth)... Howerver, when you go to on-prem often times the servers don't have a public interface, so your entire application has to work offline.
2nd tip. While it may seem like a good idea to create a separate branch in your repo for on-prem (i.e. enterprise branch), this is bad idea. It ends up being much better to just if/else in the master branch all over the place:
if(enterprise) {
// do something
}
If/else in the master branch is what GitHub Enterprise does (at least was told so).
Everybody works on master, with feature flags! Yes!
Also, if you have proper dependency injection for testing and developer sandboxes, that's the right layer to vary your back end. If statements only needed when setting up the dependency environment.
In PHP we do this with polymorphic classes; in Haskell with type classes and the ReaderT monad.
Totally agree from experience that if/else flagging is vastly better than separate branches - you will get burned _hard_ if you take the wrong approach!
A lot of our internal architecture is driver based. So the calls and interfaces are generally the same and the enterprise logic for example is determined in the driver, also helps migrating 3rd party vendors because we just write a new driver to handle that system.
The single biggest problem by far was ripping/replacing 3rd party SaaS services that we use/pay for with native code. While building a SaaS it is wonderful to use 3rd parties to save time and complexity. Examples include Stripe (payments), Rollbar (error tracking), Intercom (support/engagement), Iron.io (queue and async tasks), Gauthify (two factor auth)... Howerver, when you go to on-prem often times the servers don't have a public interface, so your entire application has to work offline.
2nd tip. While it may seem like a good idea to create a separate branch in your repo for on-prem (i.e. enterprise branch), this is bad idea. It ends up being much better to just if/else in the master branch all over the place:
If/else in the master branch is what GitHub Enterprise does (at least was told so).