Clavem

Open core

Open core is a business model in which the core of a product is released as open source and additional features, often for teams or businesses, are sold under a proprietary license.

This page is general information, not legal advice. Have a lawyer review the licenses you publish.

How it works

The product has two parts with two licenses.

  • The core is published under an open-source license that meets the Open Source Initiative’s definition. Anyone can use, change and share it.
  • The paid part is proprietary, usually a module, plugin or build the user adds to the core. Its license sets what the buyer may do.

Where to draw the line is the hard part. Features that matter most to one person tend to stay in the core, and features that matter to organizations, such as audit logs or central administration, tend to go in the paid part. Whatever you choose, moving a feature from paid to free is a friendly change, while moving one the other way tends to upset users.

Gating the paid module

The closed module checks a signed license token when it loads. The core stays free of any check. Below, verifyToken and isLicensed are the functions from the offline verification page, and the public key and product id are constants in the closed module:

const PRO_PRODUCT_ID = 75;      // from your product page
const PUBLIC_KEY = 'kq1…9fA';   // safe to ship

export async function loadProModule(token) {
  const claims = await verifyToken(token, PUBLIC_KEY);
  if (!isLicensed(claims, PRO_PRODUCT_ID)) return { audit: false };
  return { audit: true, who: claims.email };
}

This logic was run with Node against tokens signed locally with a test Ed25519 key. A valid token enabled the module. A token for another product, a token past its refresh_by, and a token with one changed character did not.

Open core versus source-available and dual licensing

Open core Source-available Dual licensing
Code readable by the public The core only All of it All of it
Open source by the OSI definition The core is No Yes, under the open-source option
What you sell Extra features Commercial use rights, or a hosted service A different license for the same code

See source-available and dual licensing. The three are often confused, and mixing them up in marketing causes arguments with the community.

How Clavem handles it

Clavem is a fit for the paid part only. Make the paid module its own product, which gives it its own device limit, validity and key pair. Map the paid Stripe price to it, and the purchase issues the key, as for any other app. The module verifies the signed token with the product’s public key and checks pid, as in the code above, and works offline until the token’s refresh_by, 14 days after issue.

The open core needs no Clavem at all. Free users never touch the License API. A check in the closed module is a speed bump for casual copying, not DRM, and the license text and your support are what keep the relationship honest. See open core licensing and licensing for open-core projects.

Questions

Can a license key stop someone using the paid features of an open core product?

Only in the closed module. The open core can be modified by anyone, so a check inside it can be removed. A check inside a proprietary, separately distributed module is the one that holds.

Is open core the same as dual licensing?

No. Open core sells extra features. Dual licensing sells different legal terms for the same code.