Live data from Hacker News

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

news.ycombinator.com

51–60 of 117 posts

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

#51
post #5
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…

Couple of questions: 1. You link to fair.io but it seems there isn't a latest license there only a legacy version. Do you know what the current status is on what seems like a pending version update? 2. Your project repro actually links to the elastic license. Is there some relation between the two? Do you prefer the fairsource license over the elastic license>

Fair Source seems to be pretty bleeding edge:

https://github.com/fairsource/fair.io/issues/14

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

#52
Not launched, but building open source components and mucroservices with a closed dashboard and overall backend.

For instance, a Git-like DAG for a config service [1] that supports history and eventually forking and merging on top of PostgreSQL. This was broken out of the larger Go codebase and is currently AGPL3 as a placeholder while I research better licenses to use.

The overall idea is the "nuts and bolts" of a small startup/SaaS app, including metrics, IAM/auth, and subscriptions via a single API and React/JS SDKs.

I hope to do a Show HN on one or both in the near future.

[1] https://github.com/tmzt/config-api

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

#53
post #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?

WordPress is a pretty good example (and all the problems that entails if it gets out of hand). They use a hook/filter model to change outputs of various systems via plugins, and allow plugins to reimplment low-level functionality.

I recommend checking out their approach, as it is pretty flexible.

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

#54
I feel like most people say plugin which is fair and easy to do on the backend but I'm always wondering how they are doing for the frontend. I never found an appropriate solution to modify the frontend (i.e: adding a billing page, a button in some page, etc)

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

#55
post #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…

Is the public repo the main branch? When you want develop something: you create a PR in the public repo, review, wait for CI, merge to main, wait for CI, finally merge to the fork, wait for CI?

I'm always unsatisfied with the number of steps to achieve that (and the total CI time required), but maybe it's unavoidable.

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

#56
post #42
post #29

My mental model for how we do it is the analogy of git/github: git is an open source project that is useful in its own right; github is the opinionated SaaS “glue” between git and an organization. Our “git” is Plane[1], which is by design fairly unopinionated and general. Our “github” is Jamsocket[2], which is more opinionated about deployment, observability, etc. We use the open source version of Plane in Jamsocket,…

Microsoft GitHub is fully proprietary & while Microsoft may or may not be pulling some strings, Git is independent. OP is asking if the free & paid software have the same owner.

OP is asking about codebase organization, and from that point of view the analogy works.

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

#57
In a previous well funded startup with a FOSS component that I worked for I designed a set up like this:

- 2 git repos, one public, one private

- Custom tooling inspired by other existing tools out there like copybara to move commits in a unidirectional flow from the private repo to the public one

The private repo had the contents of the OSS repo in a subfolder, and a unidirectional workflow where all commits flowed from the private to the public. The way the OSS repo accepted contributions was going through the normal pull request workflow on the OSS repo, then on approval the custom tooling copied the pull request into the private repository where it would go through a second round where it was tested against the private code. On merge in the private repo the commit sha of the original commit along with the original author would get injected into the new commit message and then the custom tooling would then automatically push commits in the private repo subfolder to the public OSS repo, which essentially served as a read only mirror on the main branch.

It actually worked quite well, though obviously this approach comes with some tradeoffs. Here are some of the benefits and drawbacks off the top of my head

Benefits:

- no mixing of free and proprietary code. Public users just check out the OSS repo and it’s completely free

- proprietary code is not visible to the public

Drawbacks:

- workflow slightly more complex for both end users and employees of the enterprise

- more work to mainline code by the enterprise: contributions essentially need to be reviewed twice

- it is not possible to have signed commits by OSS contributors with this workflow

Overall it ended up being a great solution for that organization but this kind of approach can only work for low traffic or easy to review repositories. Anything with a decent amount of traffic or lots of complex contributions has a risk of becoming too much overhead for the organization to double build and test pull requests

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

#58
I have two open-source projects where people can self-host for free, or use the cloud (SaaS) version. Although with Mapzy I stopped providing the cloud version for now. I have one codebase and then use an environment variable to activate features like Stripe that I need for the cloud version.

Mapzy: A simple storefinder (https://github.com/mapzy/mapzy)

Fugue: Privacy-friendly product analytics (https://github.com/shafy/fugu)

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

#59
For Tunnelmole (open source ngrok alternative) the service is identical to the open source project, but with this module https://github.com/robbie-cahill/tunnelmole-service/blob/mai... replaced with a custom version to add the billing logic. It has the same function signature so works seamlessly with the NodeJS module system.

It calls Stripe to check the plan for example.

I keep a copy of it in another folder to avoid accidentally committing it and use `rsync` to patch it in at deployment time.

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

#60

Earlier quoted context omitted.

Why

Because you'll end up with lots of "if (user.isPaidUser) {...}"

For me personally, I don't see the issue with this. It's an accurate representation of the app's behavior.
Post reply on HN