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
+41
View File
@@ -0,0 +1,41 @@
import { Plan } from "@prisma/client";
import type { LayoutSettings } from "./layout";
import {
PREMIUM_REQUIRED_CODE,
type WatermarkSettings,
} from "./watermark";
export class PremiumRequiredError extends Error {
readonly code = PREMIUM_REQUIRED_CODE;
readonly status = 403;
constructor(message: string) {
super(message);
this.name = "PremiumRequiredError";
}
}
/** OSS: all watermark / typography features unlocked. */
export function assertCustomWatermarkAllowed(_plan: Plan, _settings: WatermarkSettings) {
return;
}
/** OSS: all art-track layout features unlocked. */
export function assertArtTrackLayoutAllowed(_plan: Plan, _settings: LayoutSettings) {
return;
}
/** OSS: per-track cover images always allowed. */
export function assertPerItemImagesAllowed(
_plan: Plan,
_sharedImagePath: string,
_itemImagePaths: Array<string | null | undefined>,
) {
return;
}
export function premiumRequiredResponse(message: string) {
return {
error: message,
code: PREMIUM_REQUIRED_CODE,
};
}