Changeset cb4eda5 in Klonkt


Ignore:
Timestamp:
06/25/2026 09:30:35 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
820bceb
Parents:
2acdbc5
Message:

feat(premium): gate premium extras by default (KLONKT_PREMIUM_ENABLED defaults on)

The premium layer was off by default, so a fresh self-host got the newsletter,
statistics and the other extras for free — mismatching the salespage ($16
unlocks them). Now premiumEnabled() defaults ON; set KLONKT_PREMIUM_ENABLED=off
to make everything free on an instance. Documented in .env.example.

Co-Authored-By: Claude <noreply@…>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • .env.example

    r2acdbc5 rcb4eda5  
    5252# External embeds (YouTube/SoundCloud/Spotify) keep working too.
    5353KLONKT_AUDIO=on
     54
     55# ── Premium extras (optional) ───────────────────────────────────────
     56# The core app + all updates + Cirkels are always free. A handful of extras
     57# (newsletter, download-for-email, statistics, EPK, link-in-bio, embeddable
     58# player, show agenda, release planning) ask for a one-time Patreon supporter
     59# link (klonkt.com / patreon.com/c/roboburr) to unlock — that's how the project
     60# is funded. ON by default. Set to "off" to make every feature free on your own
     61# instance (it runs on your server, so the gate is a soft nudge, not hard DRM).
     62KLONKT_PREMIUM_ENABLED=on
  • src/services/PatreonService.js

    r2acdbc5 rcb4eda5  
    1212// (deliberately accepted: $16 < effort to crack).
    1313//
    14 // Premium is OFF by default (KLONKT_PREMIUM_ENABLED != 'on'): no premium UI
    15 // is shown and nothing is gated. Self-hosters enable it once Patreon is set up.
     14// Premium gating is ON by default: the extras (newsletter, statistics, …)
     15// require a linked Patreon supporter ($16 lifetime). Set KLONKT_PREMIUM_ENABLED=off
     16// to make every feature free (e.g. an internal/demo instance, or a self-hoster who
     17// just wants the whole app). On self-host the flag is patchable — the gate is a soft
     18// nudge toward supporting the project, not hard DRM.
    1619
    1720import crypto from 'node:crypto';
     
    2225
    2326export function premiumEnabled() {
    24   return String(process.env.KLONKT_PREMIUM_ENABLED || '').toLowerCase() === 'on';
     27  // Default ON; only an explicit 'off' disables the premium layer.
     28  return String(process.env.KLONKT_PREMIUM_ENABLED || 'on').toLowerCase() !== 'off';
    2529}
    2630export function licenseBase() { return LICENSE_URL; }
Note: See TracChangeset for help on using the changeset viewer.