videogen/apps/web/app/layout.tsx
caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

152 lines
5.9 KiB
TypeScript

import type { Metadata, Viewport } from "next";
import Script from "next/script";
import { ClerkProvider } from "@clerk/nextjs";
import { clerkProxyUrl, hasRealClerkKey } from "@/lib/clerk";
import { clerkAppearance, clerkLocalization } from "@/lib/clerk-appearance";
import { I18nProvider } from "@/lib/i18n/context";
import { ApiSessionBridge } from "@/src/shared/api/ApiSessionBridge";
import { AttributionCapture } from "@/src/shared/attribution/AttributionCapture";
import { ClerkLoadGuard } from "@/src/shared/auth/ClerkLoadGuard";
import { GlitchTipInit } from "@/src/shared/observability";
import { StaffToolGuard } from "@/components/app-shell/StaffToolGuard";
import { getLocale } from "@/lib/i18n/server";
import { siteEntityGraph } from "@/lib/seo/entity";
import "./globals.css";
const SITE_URL = "https://menivor.com";
export const metadata: Metadata = {
metadataBase: new URL(SITE_URL),
title: {
default: "Menivor: paste your App Store link, get a TikTok-ready demo video",
template: "%s | Menivor",
},
description:
"Paste your App Store or Google Play link and get three vertical demo reels with different hooks, an AI voiceover and word-by-word captions — ready to post.",
keywords: [
"AI short video generator",
"faceless video generator",
"link to video ad",
"AI story video maker",
"screen recording to video",
"product link to video",
"AI reels from a URL",
"add captions to video",
"AI video ads",
"TikTok ad maker",
"YouTube Shorts maker",
],
applicationName: "Menivor",
// Search Console and Bing Webmaster tokens come from the environment only;
// when unset, no verification tag is rendered.
verification: {
google:
process.env.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION ||
process.env.GOOGLE_SITE_VERIFICATION ||
undefined,
other: process.env.NEXT_PUBLIC_BING_SITE_VERIFICATION
? { "msvalidate.01": process.env.NEXT_PUBLIC_BING_SITE_VERIFICATION }
: undefined,
},
alternates: {
canonical: "/",
},
openGraph: {
type: "website",
url: SITE_URL,
siteName: "Menivor",
title: "Menivor: paste your App Store link, get a TikTok-ready demo video",
description:
"Paste your App Store or Google Play link and get three vertical demo reels with different hooks, an AI voiceover and word-by-word captions — ready to post.",
},
twitter: {
card: "summary_large_image",
title: "Menivor: paste your App Store link, get a TikTok-ready demo video",
description:
"Paste your App Store or Google Play link and get three vertical demo reels with different hooks, an AI voiceover and word-by-word captions.",
},
};
// MB1: the entity graph (Organization, WebSite, SoftwareApplication) with
// offers read from plan config lives in lib/seo/entity.ts.
const STRUCTURED_DATA = siteEntityGraph();
export const viewport: Viewport = {
themeColor: "#0a0a0b",
width: "device-width",
initialScale: 1,
};
/**
* Render on-demand rather than statically prerendering at build time. When no
* real Clerk instance is configured we intentionally omit <ClerkProvider>
* (see below), so the authenticated app surface — which uses Clerk components
* directly — cannot be prerendered. The public marketing pages are Clerk-free
* (they use components/auth/clerk-safe) and render fine on-demand. Once a real
* Clerk key is added, this can be relaxed back to static where desired.
*/
export const dynamic = "force-dynamic";
export default async function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
const locale = await getLocale();
const shell = (
<html
lang={locale}
suppressHydrationWarning
className="scroll-smooth"
>
<head>
{/* Rendered directly rather than via the Metadata API's `alternates.types`: every
marketing page's own generateMetadata/metadata export replaces rather than
merges with a parent's `alternates`, so a root-level Metadata entry would be
lost on any page that sets its own canonical. Next.js hoists a manually
rendered <link> here into every route's <head> regardless. */}
<link rel="alternate" type="text/markdown" title="llms.txt" href="/llms.txt" />
</head>
<body className="min-h-dvh bg-background font-sans text-foreground antialiased">
{/* X conversion tracking base code */}
<Script id="x-conversion-tracking-base" strategy="afterInteractive">
{`!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',
a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
twq('config','rhhqi');`}
</Script>
{/* End X conversion tracking base code */}
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(STRUCTURED_DATA) }}
/>
<I18nProvider initialLocale={locale}>
<AttributionCapture />
<ApiSessionBridge />
<GlitchTipInit />
{hasRealClerkKey && <ClerkLoadGuard />}
<StaffToolGuard />
{children}
</I18nProvider>
</body>
</html>
);
// Only mount ClerkProvider when a real Clerk instance is configured. With a
// placeholder/absent key, mounting it would make the browser load a dead
// Frontend API (e.g. clerk.example.com) and break every page. The public
// marketing site renders fully without it; auth surfaces stay dormant until a
// real NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is provided. See lib/clerk.ts.
if (!hasRealClerkKey) {
return shell;
}
return (
<ClerkProvider
proxyUrl={clerkProxyUrl || undefined}
appearance={clerkAppearance}
localization={clerkLocalization}
>
{shell}
</ClerkProvider>
);
}