Live data from Hacker News

Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

news.ycombinator.com

31–40 of 117 posts

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#31
post #4

I have a single code base [0] for the self-hosted editions and for the SaaS. I split features up across two editions: community edition (CE) and enterprise edition (EE), and then also two modes: singleplayer and multiplayer (single- vs multi-tenant). The switching is done via environment variables, KEYGEN_EDITION and KEYGEN_MODE. The SaaS offering actually runs the EE edition in multiplayer mode, and is right now the…

How do you actually protect the CE users from setting the environment variables to activate premium features?

If you are desperate enough to shim it out you're not worth pursuing as a customer

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#32
post #9

Plugins! My SaaS version of https://datasette.io is the open source version plus 76 plugins. Almost all of those plugins are themselves open source, with just a few that aren't for features that are unique to the SaaS product - things like showing how much disk space the user has used up already. Here's what that custom plugin looks like, it's pretty thin: https://gist.github.com/simonw/114131fd9c1826f3629cc3b3dcb84.…

Got an good pointers for writing pluggable code? How to make the app itself ready to get all these fancy plugins?

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#33
post #4

I have a single code base [0] for the self-hosted editions and for the SaaS. I split features up across two editions: community edition (CE) and enterprise edition (EE), and then also two modes: singleplayer and multiplayer (single- vs multi-tenant). The switching is done via environment variables, KEYGEN_EDITION and KEYGEN_MODE. The SaaS offering actually runs the EE edition in multiplayer mode, and is right now the…

How do you actually protect the CE users from setting the environment variables to activate premium features?

Keygen uses Keygen to license itself via license gates: https://github.com/keygen-sh/keygen-api/blob/e668dffbb90bd53... (the EE edition requires a license key with entitlements to access the EE features).

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#34
For our SaaS [1] we have a plug-in architecture.

And each plugin has a concept called install constraints. They consist of app, tier, and the role of the user provisioning the account.

Based on the right combination, certain plugins get auto installed and the user can enable/disable optional plugins/features.

Upon installation, the plug-in module has a “lifecycle” module with callbacks for install, uninstall, after_install, etc.

In those, we insert db metadata (pages, folders, menu items, etc) related to that plugin.

All is written in elixir.

1: https://simplyscholar.com

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#35
post #4

I have a single code base [0] for the self-hosted editions and for the SaaS. I split features up across two editions: community edition (CE) and enterprise edition (EE), and then also two modes: singleplayer and multiplayer (single- vs multi-tenant). The switching is done via environment variables, KEYGEN_EDITION and KEYGEN_MODE. The SaaS offering actually runs the EE edition in multiplayer mode, and is right now the…

Say if someone copied your codebase tomorrow, and rebranded it as a competing solution and started advertising on same places as you are, what do you do?

I'd handle it the same any other business would who had their intellectual property infringed upon.

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#36
post #18

Earlier quoted context omitted.

It'd be a violation of the license terms. Other than that, I may send Liam Neeson after them. :)

His very specific set of skills is hunting down license term violators

>...but what I do have are a very particular set of skills. Skills I have acquired over a very long career.

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#37
Like many other answers here, Outline [0] has eventually landed on a plugin architecture with a private fork for EE – the paid edition has many extra plugins providing functionality such as extra importers, auth methods, search functionality etc. The interface itself has evolved several times and we're still adding new hooks to enable plugins to integrate with different areas of the product.

This approach has really made the private fork much more maintanable.

[0] https://www.getoutline.com

[0] https://github.com/outline/outline

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#38

If I understand this is more of a coding question. I'd argue it would be best for most web based SaaS to have a single codebase, with a single branch that represents the production site. That code base would then be smart enough to enable the right features based on the current user and/or tenant and their subscription level and payment status. Pseudocode: public DoFoo(){ if(CurrentUser.IsFreeSku && CurrentUser.FoosT…

This is a nightmare

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#39
post #35

Earlier quoted context omitted.

Say if someone copied your codebase tomorrow, and rebranded it as a competing solution and started advertising on same places as you are, what do you do?

I'd handle it the same any other business would who had their intellectual property infringed upon.

How would you know?

Re: Ask HN: Founders who offer free/OS and paid SaaS, how do you manage your code?

#40
I am not such a founder, but as a user of and contributor to open source projects let me give a suggestion of how not to do it.

If you include open source and proprietary components in the same repo I will be annoyed. Especially if it is not very clear how the licensing is split, or if the proprietary stuff is split in multiple folders.

If you don't have instructions, or it is otherwise unreasonably difficult to build the open-source only version, I will be very annoyed.

If your "open source" code is directly linked to the proprietary parts, and it requires non-trivial changes to your code in order to build without the proprietary components, I don't consider your project open source, no matter how much you plaster "open source" on your marketing materials. And it's even worse if the license is unclear on what the licensing situation is if you use a release that includes all these proprietary components, but they are turned off because you don't have a license key.

Post reply on HN