Sync layouts, typography, and watermark studio for self-hosted OSS.

Unlock features without credits/Stripe, point docs to docs.songs2vid.com, and drop leftover billing admin surfaces.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Songs2YT
2026-07-25 03:50:06 +02:00
co-authored by Cursor
parent bcca0a6e6f
commit d951ecb489
53 changed files with 3258 additions and 1977 deletions
+11 -3
View File
@@ -1,9 +1,17 @@
import { Plan } from "@prisma/client";
/**
* Self-hosted / OSS edition. Prefer S2VID_EDITION; S2YT_EDITION kept for older compose files.
*/
export function isSelfHostedEdition(): boolean {
return process.env.S2YT_EDITION === "selfhosted";
const edition =
process.env.S2VID_EDITION?.trim() || process.env.S2YT_EDITION?.trim() || "";
// Default to self-hosted for this OSS package when unset
if (!edition) return true;
return edition === "selfhosted";
}
export function hasProFeatures(plan: Plan): boolean {
return isSelfHostedEdition() || plan === "PREMIUM";
/** All Pro features are unlocked in the OSS / self-hosted edition. */
export function hasProFeatures(_plan?: Plan): boolean {
return true;
}