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:
+35
-34
@@ -8,54 +8,55 @@ export type PlanLimits = {
|
||||
maxResolutionHeight: number;
|
||||
maxFileSizeBytes: number;
|
||||
watermarkOptional: boolean;
|
||||
customWatermark: boolean;
|
||||
perItemImages: boolean;
|
||||
artTrackLayouts: boolean;
|
||||
allowedAudioExtensions: readonly string[];
|
||||
id3TagSupport: boolean;
|
||||
};
|
||||
|
||||
export const PLAN_LIMITS: Record<Plan, PlanLimits> = {
|
||||
FREE: {
|
||||
monthlyQuota: 14,
|
||||
maxBatchSize: 3,
|
||||
maxResolutionHeight: 720,
|
||||
maxFileSizeBytes: 30 * 1024 * 1024,
|
||||
watermarkOptional: true,
|
||||
allowedAudioExtensions: [".mp3"],
|
||||
id3TagSupport: true,
|
||||
},
|
||||
PREMIUM: {
|
||||
monthlyQuota: 50,
|
||||
maxBatchSize: 5,
|
||||
maxResolutionHeight: 1080,
|
||||
maxFileSizeBytes: 30 * 1024 * 1024,
|
||||
watermarkOptional: true,
|
||||
allowedAudioExtensions: [".mp3", ".wav", ".flac"],
|
||||
id3TagSupport: true,
|
||||
},
|
||||
};
|
||||
|
||||
/** Unlimited self-hosted limits — used for every plan in this OSS build. */
|
||||
export const SELFHOSTED_LIMITS: PlanLimits = {
|
||||
monthlyQuota: 1_000_000,
|
||||
maxBatchSize: 100,
|
||||
maxBatchSize: 1_000,
|
||||
maxResolutionHeight: Math.max(...RESOLUTIONS.map((r) => r.height)),
|
||||
maxFileSizeBytes: 500 * 1024 * 1024,
|
||||
watermarkOptional: true,
|
||||
customWatermark: true,
|
||||
perItemImages: true,
|
||||
artTrackLayouts: true,
|
||||
allowedAudioExtensions: [".mp3", ".wav", ".flac"],
|
||||
id3TagSupport: true,
|
||||
};
|
||||
|
||||
export const SALES_EMAIL = "songs2yt@atakanozban.com";
|
||||
export const SUPPORT_EMAIL = "songs2yt@atakanozban.com";
|
||||
export const UPGRADE_URL = "/#pricing";
|
||||
export const GITEA_ISSUES_URL =
|
||||
process.env.NEXT_PUBLIC_GITEA_ISSUES_URL ?? "https://git.atakanozban.com/Songs2YT/issues";
|
||||
export const GITEA_URL =
|
||||
process.env.NEXT_PUBLIC_GITEA_URL ?? "https://git.atakanozban.com/Songs2YT";
|
||||
export const DOCKER_HUB_URL =
|
||||
process.env.NEXT_PUBLIC_DOCKER_HUB_URL ?? "https://hub.docker.com/r/atakanozban/songs2yt";
|
||||
/** Kept for type compatibility; OSS always returns SELFHOSTED_LIMITS. */
|
||||
export const PLAN_LIMITS: Record<Plan, PlanLimits> = {
|
||||
FREE: { ...SELFHOSTED_LIMITS },
|
||||
PREMIUM: { ...SELFHOSTED_LIMITS },
|
||||
};
|
||||
|
||||
export function getPlanLimits(plan: Plan): PlanLimits {
|
||||
if (isSelfHostedEdition()) return SELFHOSTED_LIMITS;
|
||||
return PLAN_LIMITS[plan];
|
||||
export const SALES_EMAIL = "songs2vid@atakanozban.com";
|
||||
export const SUPPORT_EMAIL = "songs2vid@atakanozban.com";
|
||||
export const QUOTA_REQUEST_EMAIL = "songs2vid@atakanozban.com";
|
||||
export const UPGRADE_URL = "https://songs2vid.com";
|
||||
export const WEBSITE_URL = "https://songs2vid.com";
|
||||
export const GITEA_ISSUES_URL =
|
||||
process.env.NEXT_PUBLIC_GITEA_ISSUES_URL ??
|
||||
"https://git.atakanozban.com/Songs2VID/songs2vid/issues";
|
||||
export const GITEA_URL =
|
||||
process.env.NEXT_PUBLIC_GITEA_URL ?? "https://git.atakanozban.com/Songs2VID/songs2vid";
|
||||
export const DOCKER_HUB_URL =
|
||||
process.env.NEXT_PUBLIC_DOCKER_HUB_URL ?? "https://hub.docker.com/r/atakanozban/songs2vid";
|
||||
|
||||
/** Public docs (Docusaurus). Override with NEXT_PUBLIC_DOCS_URL if needed. */
|
||||
export const DOCS_URL = (
|
||||
process.env.NEXT_PUBLIC_DOCS_URL?.trim() || "https://docs.songs2vid.com"
|
||||
).replace(/\/$/, "");
|
||||
export const API_DOCS_URL = `${DOCS_URL}/docs/api/overview`;
|
||||
|
||||
export function getPlanLimits(_plan?: Plan): PlanLimits {
|
||||
void isSelfHostedEdition();
|
||||
return SELFHOSTED_LIMITS;
|
||||
}
|
||||
|
||||
export function getResolutionsForPlan(plan: Plan) {
|
||||
|
||||
Reference in New Issue
Block a user