Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat: Launch week day 5, self hosting
Richie McIlroydd63cad079a2
diff --git a/.gitignore b/.gitignoreindex 6a709dd5e..0f412d2f3 100644--- a/.gitignore+++ b/.gitignore@@ -39,3 +39,4 @@ apps/storybook/storybook-static*.tsbuildinfo.cargo/config.tomltauri.windows.conf.json+.verceldiff --git a/apps/web/app/[slug]/page.tsx b/apps/web/app/[slug]/page.tsxindex 937eba291..7905c9f90 100644--- a/apps/web/app/[slug]/page.tsx+++ b/apps/web/app/[slug]/page.tsx@@ -14,7 +14,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {return {title: "Cap — Beautiful screen recordings, owned by you.",description:- "Cap is the open source alternative to Loom. Lightweight, powerful, and stunning. Record and share in seconds.",+ "Cap is the open source alternative to Loom. Lightweight, powerful, and cross-platform. Record and share in seconds.",};}diff --git a/apps/web/app/api/selfhosted/checkout/route.ts b/apps/web/app/api/selfhosted/checkout/route.tsnew file mode 100644index 000000000..fb3dfea53--- /dev/null+++ b/apps/web/app/api/selfhosted/checkout/route.ts@@ -0,0 +1,55 @@+import { NextResponse } from "next/server";++export async function POST(request: Request) {+ try {+ const body = await request.json();+ console.log("Self-hosted checkout request body:", body);++ // Forward the request to the external service+ console.log("Forwarding request to external service...");+ const response = await fetch("https://l.cap.so/api/selfhost/checkout", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify(body),+ });++ console.log("External service response status:", response.status);++ // Get the raw response text first+ const responseText = await response.text();+ console.log("External service raw response:", responseText);++ // Then try to parse it as JSON+ let data;+ try {+ data = JSON.parse(responseText);+ console.log("External service parsed response:", data);+ } catch (parseError) {+ console.error("Error parsing external service response:", parseError);+ return NextResponse.json(+ { message: "Invalid response from external service" },+ { status: 500 }+ );+ }++ if (!response.ok) {+ return NextResponse.json(+ { message: data.message || "Failed to process checkout" },+ { status: response.status }+ );+ }++ return NextResponse.json(data);+ } catch (error) {+ console.error("Error in self-hosted checkout:", error);+ if (error instanceof Error) {+ console.error("Error details:", error.message, error.stack);+ }+ return NextResponse.json(+ { message: "Internal server error" },+ { status: 500 }+ );+ }+}\ No newline at end of filediff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsxindex d941851c1..724ac87ac 100644--- a/apps/web/app/layout.tsx+++ b/apps/web/app/layout.tsx@@ -13,11 +13,11 @@ import { PostHogProvider, Providers } from "./providers";export const metadata: Metadata = {title: "Cap — Beautiful screen recordings, owned by you.",description:- "Cap is the open source alternative to Loom. Lightweight, powerful, and stunning. Record and share in seconds.",+ "Cap is the open source alternative to Loom. Lightweight, powerful, and cross-platform. Record and share in seconds.",openGraph: {title: "Cap — Beautiful screen recordings, owned by you.",description:- "Cap is the open source alternative to Loom. Lightweight, powerful, and stunning. Record and share in seconds.",+ "Cap is the open source alternative to Loom. Lightweight, powerful, and cross-platform. Record and share in seconds.",type: "website",url: "https://cap.so",images: ["https://cap.so/og.png"],diff --git a/apps/web/app/self-hosting/page.tsx b/apps/web/app/self-hosting/page.tsxnew file mode 100644index 000000000..4d86ec5d4--- /dev/null+++ b/apps/web/app/self-hosting/page.tsx@@ -0,0 +1,5 @@+import { SelfHostingPage } from "@/components/pages/SelfHostingPage";++export default async function SelfHosting() {+ return <SelfHostingPage />;+}diff --git a/apps/web/components/CommercialGetStarted.tsx b/apps/web/components/CommercialGetStarted.tsxnew file mode 100644index 000000000..eaa87f459--- /dev/null+++ b/apps/web/components/CommercialGetStarted.tsx@@ -0,0 +1,78 @@+"use client";++import { Button } from "@cap/ui";++export function CommercialGetStarted() {+ const handleSmoothScroll = (+ e: React.MouseEvent<HTMLButtonElement>,+ targetId: string+ ) => {+ e.preventDefault();+ const targetElement = document.getElementById(targetId);+ if (targetElement) {+ window.scrollTo({+ top: targetElement.offsetTop,+ behavior: "smooth",+ });+ }+ };++ return (+ <div+ className="custom-bg max-w-[1000px] mx-auto rounded-[20px] overflow-hidden relative flex flex-col justify-center p-8"+ style={{ minHeight: "264px" }}+ >+ <div+ id="cloud-4"+ className="absolute top-0 -right-20 opacity-50 z-0 pointer-events-none"+ >+ <img+ className="max-w-[40vw] h-auto"+ src="/illustrations/cloud-1.png"+ alt="Footer Cloud One"+ />+ </div>+ <div+ id="cloud-5"+ className="absolute bottom-0 left-0 opacity-50 z-0 pointer-events-none"+ >+ <img+ className="max-w-[40vw] h-auto"+ src="/illustrations/cloud-2.png"+ alt="Footer Cloud Two"+ />+ </div>+ <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">+ <div className="text-center max-w-[800px] mx-auto mb-8">+ <h2 className="text-xl sm:text-3xl text-white mb-3">+ Enterprise-grade screen recording, on your infrastructure.+ </h2>+ <p className="text-[1rem] sm:text-lg text-white">+ Deploy Cap on your own servers with complete data sovereignty.+ Maintain full control over your sensitive information while enabling+ seamless team collaboration.+ </p>+ </div>+ <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2">+ <Button+ variant="white"+ href="#features"+ size="lg"+ className="w-full sm:w-auto"+ onClick={(e) => handleSmoothScroll(e, "features")}+ >+ Learn More+ </Button>+ <Button+ variant="secondary"+ href="/pricing?type=selfhosted"+ size="lg"+ className="w-full sm:w-auto"+ >+ Pricing+ </Button>+ </div>+ </div>+ </div>+ );+}diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsxindex fb1c46700..615d2f03a 100644--- a/apps/web/components/Footer.tsx+++ b/apps/web/components/Footer.tsx@@ -30,7 +30,7 @@ export const Footer = () => {<div className="w-full"><p className="text-gray-500 max-w-md">Cap is the open source alternative to Loom. Lightweight,- powerful, and stunning. Record and share in seconds.+ powerful, and cross-platform. Record and share in seconds.</p></div><p className="text-gray-400">@@ -65,6 +65,9 @@ export const Footer = () => {Open Source</a></li>+ <li>+ <a href="/self-hosting">Self-hosting</a>+ </li><li><a href="https://discord.gg/y8gdQ3WRN3" target="_blank">Join the communitydiff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsxindex eb6c021f2..1867f0d5d 100644--- a/apps/web/components/Navbar.tsx+++ b/apps/web/components/Navbar.tsx@@ -35,6 +35,11 @@ const Links = [sub: "Cap is open source and available on GitHub",href: "https://github.com/CapSoftware/Cap",},+ {+ label: "Self-host Cap",+ sub: "Self-host Cap on your own infrastructure",+ href: "/self-hosting",+ },{label: "Join the community",sub: "Join the Cap community on Discord",diff --git a/apps/web/components/ReadyToGetStarted.tsx b/apps/web/components/ReadyToGetStarted.tsxindex bc4747525..8d287f34e 100644--- a/apps/web/components/ReadyToGetStarted.tsx+++ b/apps/web/components/ReadyToGetStarted.tsx@@ -35,8 +35,8 @@ export function ReadyToGetStarted() {</h2><p className="text-[1rem] sm:text-lg text-white">Cap is the open source alternative to Loom. Lightweight, powerful,- and stunning. Record and share securely in seconds with custom S3- bucket support.+ and cross-platform. Record and share securely in seconds with custom+ S3 bucket support.</p></div><div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2">diff --git a/apps/web/components/pages/HomePage/index.tsx b/apps/web/components/pages/HomePage/index.tsxindex 685ef34fa..b5c2e6a9e 100644--- a/apps/web/components/pages/HomePage/index.tsx+++ b/apps/web/components/pages/HomePage/index.tsx@@ -58,9 +58,9 @@ export const HomePage = () => {mx-auto bg-[#2e2e2e] rounded-full border w-fit border-zinc-200"><p className="text-xs text-white sm:text-sm">- Launch Week Day 4:{" "}+ Launch Week Day 5:{" "}<span className="text-xs font-bold text-blue-100 sm:text-sm">- Instant Mode+ Self-host Cap</span></p><FontAwesomeIcon@@ -79,8 +79,8 @@ export const HomePage = () => {</h1><p className="mx-auto mb-8 max-w-3xl text-md sm:text-xl text-zinc-500 fade-in-down animate-delay-1">Cap is the open source alternative to Loom. Lightweight, powerful,- and stunning. Record and share securely in seconds with custom S3- bucket support.+ and cross-platform. Record and share securely in seconds with+ custom S3 bucket support.</p></div><div className="flex flex-col justify-center items-center mb-5 space-y-2 fade-in-up animate-delay-2 sm:flex-row sm:space-y-0 sm:space-x-2">diff --git a/apps/web/components/pages/PricingPage.tsx b/apps/web/components/pages/PricingPage.tsxindex b19cdc58c..021d6da67 100644--- a/apps/web/components/pages/PricingPage.tsx+++ b/apps/web/components/pages/PricingPage.tsx@@ -17,16 +17,21 @@ import { getProPlanId } from "@cap/utils";import toast from "react-hot-toast";import { useRouter, useSearchParams } from "next/navigation";import { SimplePlans } from "../text/SimplePlans";-import { LogoSection } from "./_components/LogoSection";export const PricingPage = () => {const [proLoading, setProLoading] = useState(false);const [commercialLoading, setCommercialLoading] = useState(false);+ const [selfHostedLoading, setSelfHostedLoading] = useState(false);const [isAnnual, setIsAnnual] = useState(true);const [isCommercialAnnual, setIsCommercialAnnual] = useState(false);+ const [isSelfHostedAnnual, setIsSelfHostedAnnual] = useState(true);const [proQuantity, setProQuantity] = useState(1);const [licenseQuantity, setLicenseQuantity] = useState(1);+ const [selfHostedQuantity, setSelfHostedQuantity] = useState(10);const [initialRender, setInitialRender] = useState(true);+ const [deploymentType, setDeploymentType] = useState<"cloud" | "selfhosted">(+ "cloud"+ );const { push } = useRouter();const searchParams = useSearchParams();@@ -35,9 +40,15 @@ export const PricingPage = () => {setInitialRender(false);const planFromUrl = searchParams.get("plan");const next = searchParams.get("next");+ const typeFromUrl = searchParams.get("type");const pendingPriceId = localStorage.getItem("pendingPriceId");const pendingProQuantity = localStorage.getItem("pendingQuantity");+ // Set deployment type based on URL parameter+ if (typeFromUrl === "selfhosted") {+ setDeploymentType("selfhosted");+ }+if (pendingPriceId && pendingProQuantity) {localStorage.removeItem("pendingPriceId");localStorage.removeItem("pendingQuantity");@@ -128,6 +139,61 @@ export const PricingPage = () => {}};+ const openSelfHostedCheckout = async () => {+ setSelfHostedLoading(true);+ try {+ const requestData = {+ type: isSelfHostedAnnual ? "yearly" : "monthly",+ quantity: selfHostedQuantity,+ };++ console.log("Self-hosted checkout request data:", requestData);+ console.log(+ "Self-hosted checkout JSON payload:",+ JSON.stringify(requestData)+ );++ const response = await fetch(`/api/selfhosted/checkout`, {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify(requestData),+ });++ console.log("Self-hosted checkout response status:", response.status);++ // Try to get the raw response text first+ const responseText = await response.text();+ console.log("Self-hosted checkout raw response:", responseText);++ // Then parse it as JSON if possible+ let data;+ try {+ data = JSON.parse(responseText);+ console.log("Self-hosted checkout parsed response data:", data);+ } catch (parseError) {+ console.error("Error parsing response JSON:", parseError);+ toast.error("Invalid response format from server");+ setSelfHostedLoading(false);+ return;+ }++ if (response.status === 200) {+ console.log("Redirecting to:", data.url);+ window.location.href = data.url;+ } else {+ console.error("Error response from server:", data.message);+ window.alert(data.message);+ }+ } catch (error) {+ console.error("Error during self-hosted checkout:", error);+ toast.error("Failed to start checkout process");+ } finally {+ setSelfHostedLoading(false);+ }+ };+const proList = [{text: "Connect your own domain to Cap",@@ -186,10 +252,49 @@ export const PricingPage = () => {},];+ const selfHostedList = [+ {+ text: "Self-hosted on your own infrastructure",+ available: true,+ },+ {+ text: "Full control over your data",+ available: true,+ },+ {+ text: "White labeling with custom branding",+ available: true,+ },+ {+ text: "Customizable UI and domain",+ available: true,+ },+ {+ text: "Desktop app commercial license included",+ available: true,+ },+ {+ text: "Advanced teams features",+ available: true,+ },+ {+ text: "Custom branding options",+ available: true,+ },+ {+ text: "Priority support",+ available: true,+ },+ {+ text: "Dedicated onboarding",+ available: true,+ },+ ];+return (<div><div className="py-12 mt-16 space-y-24 wrapper">- <div className="space-y-12">+ <div><div className="text-center"><div className={`mb-4 ${initialRender ? "fade-in-down" : ""}`}><SimplePlans />@@ -210,246 +315,404 @@ export const PricingPage = () => {adopter pricing to our first users. This pricing will be locked infor the lifetime of your subscription.</p>++ <div className="flex justify-center mt-5 mb-8">+ <div className="inline-flex bg-gray-100 p-1 rounded-full border border-blue-300">+ <div+ className={`rounded-full z-10 relative transition-all duration-300 min-w-[120px] py-2 px-6 mx-0.5 text-center cursor-pointer border ${+ deploymentType === "cloud"+ ? "bg-white text-blue-600 font-medium shadow-sm border-blue-300"+ : "bg-transparent text-gray-700 border-transparent"+ }`}+ onClick={() => setDeploymentType("cloud")}+ >+ Cloud+ </div>+ <div+ className={`rounded-full z-10 relative transition-all duration-300 min-w-[120px] py-2 px-6 mx-0.5 text-center cursor-pointer border ${+ deploymentType === "selfhosted"+ ? "bg-white text-blue-600 font-medium shadow-sm border-blue-300"+ : "bg-transparent text-gray-700 border-transparent"+ }`}+ onClick={() => setDeploymentType("selfhosted")}+ >+ Self-hosted+ </div>+ </div>+ </div></div>- <div className="grid grid-cols-1 gap-3 items-stretch md:grid-cols-2">- <Card- className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow ${- initialRender ? "fade-in-down animate-delay-2" : ""- }`}- >- <div className="space-y-4">- <CardHeader>- <CardTitle className="text-2xl">- App + Commercial License- </CardTitle>- <CardDescription className="text-lg">- For professional use of the desktop app, without cloud- features.- </CardDescription>- <div>- <div className="flex items-center space-x-3">- <h3 className="text-4xl">- {isCommercialAnnual- ? `$${29 * licenseQuantity}`- : `$${58 * licenseQuantity}`}- </h3>- <div>- <p className="text-sm font-medium">++ {deploymentType === "cloud" ? (+ <div className="grid grid-cols-1 gap-3 items-stretch md:grid-cols-2">+ <Card+ className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow ${+ initialRender ? "fade-in-down animate-delay-2" : ""+ }`}+ >+ <div className="space-y-4">+ <CardHeader>+ <CardTitle className="text-2xl">+ App + Commercial License+ </CardTitle>+ <CardDescription className="text-lg">+ For professional use of the desktop app, without cloud+ features.+ </CardDescription>+ <div>+ <div className="flex items-center space-x-3">+ <h3 className="text-4xl">{isCommercialAnnual- ? licenseQuantity === 1- ? "billed annually"- : `for ${licenseQuantity} licenses, billed annually`- : licenseQuantity === 1- ? "one-time payment"- : `for ${licenseQuantity} licenses, one-time payment`}- </p>- {isCommercialAnnual && (- <p className="text-sm">- or, ${58 * licenseQuantity} one-time payment+ ? `$${29 * licenseQuantity}`+ : `$${58 * licenseQuantity}`}+ </h3>+ <div>+ <p className="text-sm font-medium">+ {isCommercialAnnual+ ? licenseQuantity === 1+ ? "billed annually"+ : `for ${licenseQuantity} licenses, billed annually`+ : licenseQuantity === 1+ ? "one-time payment"+ : `for ${licenseQuantity} licenses, one-time payment`}</p>- )}- </div>- </div>- <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">- <div className="flex items-center">- <span className="mr-2 text-xs">- Switch to {isCommercialAnnual ? "lifetime" : "yearly"}- </span>- <Switch- checked={!isCommercialAnnual}- onCheckedChange={() =>- setIsCommercialAnnual(!isCommercialAnnual)- }- />+ {isCommercialAnnual && (+ <p className="text-sm">+ or, ${58 * licenseQuantity} one-time payment+ </p>+ )}+ </div></div>- <div className="flex items-center">- <span className="mr-2 text-xs">Licenses:</span>- <div className="flex gap-2 items-center">- <Button- variant="secondary"- size="sm"- onClick={() =>- licenseQuantity > 1 &&- setLicenseQuantity(licenseQuantity - 1)- }- className="px-2 py-0 h-6"- >- -- </Button>- <span className="w-4 text-center">- {licenseQuantity}+ <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex items-center">+ <span className="mr-2 text-xs">+ Switch to{" "}+ {isCommercialAnnual ? "lifetime" : "yearly"}</span>- <Button- variant="secondary"- size="sm"- onClick={() =>- setLicenseQuantity(licenseQuantity + 1)+ <Switch+ checked={!isCommercialAnnual}+ onCheckedChange={() =>+ setIsCommercialAnnual(!isCommercialAnnual)}- className="px-2 py-0 h-6"- >- +- </Button>+ />+ </div>+ <div className="flex items-center">+ <span className="mr-2 text-xs">Licenses:</span>+ <div className="flex gap-2 items-center">+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ licenseQuantity > 1 &&+ setLicenseQuantity(licenseQuantity - 1)+ }+ className="px-2 py-0 h-6"+ >+ -+ </Button>+ <span className="w-4 text-center">+ {licenseQuantity}+ </span>+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ setLicenseQuantity(licenseQuantity + 1)+ }+ className="px-2 py-0 h-6"+ >+ ++ </Button>+ </div></div></div></div>- </div>- </CardHeader>- <CardContent>- <Button- onClick={openCommercialCheckout}- className="w-full"- size="lg"- disabled={commercialLoading}- >- {commercialLoading- ? "Loading..."- : licenseQuantity > 1- ? "Purchase Licenses"- : "Purchase License"}- </Button>- </CardContent>- <CardFooter>- <div className="space-y-8">- <div>- <ul className="p-0 space-y-3 list-none">- {commercialList.map((item, index) => (- <li- key={index}- className="flex justify-start items-center"- >- <div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">- <Check className="w-3 h-3 stroke-[4px] stroke-green-500" />- </div>- <span className="ml-1.5 font-bold text-gray-500">- {item.text}- </span>- </li>- ))}- </ul>+ </CardHeader>+ <CardContent>+ <Button+ onClick={openCommercialCheckout}+ className="w-full"+ size="lg"+ disabled={commercialLoading}+ >+ {commercialLoading+ ? "Loading..."+ : licenseQuantity > 1+ ? "Purchase Licenses"+ : "Purchase License"}+ </Button>+ </CardContent>+ <CardFooter>+ <div className="space-y-8">+ <div>+ <ul className="p-0 space-y-3 list-none">+ {commercialList.map((item, index) => (+ <li+ key={index}+ className="flex justify-start items-center"+ >+ <div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">+ <Check className="w-3 h-3 stroke-[4px] stroke-green-500" />+ </div>+ <span className="ml-1.5 font-bold text-gray-500">+ {item.text}+ </span>+ </li>+ ))}+ </ul>+ </div></div>- </div>- </CardFooter>- </div>- </Card>+ </CardFooter>+ </div>+ </Card>- <Card- className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${- initialRender ? "fade-in-up animate-delay-2" : ""- }`}- >- <div className="space-y-3">- <CardHeader>- <CardTitle className="text-2xl font-medium">- App + Commercial License +{" "}- <span className="text-blue-500 text-2xl font-bold">- Cap Pro- </span>- </CardTitle>- <CardDescription className="text-lg">- For professional use + cloud features like shareable links,- transcriptions, comments, & more. Perfect for teams or- sharing with clients.- </CardDescription>- <div>- <div className="flex items-center space-x-3">- <h3 className="text-4xl">- {isAnnual- ? `$${6 * proQuantity}/mo`- : `$${9 * proQuantity}/mo`}- </h3>- <div>- <p className="text-sm font-medium">+ <Card+ className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${+ initialRender ? "fade-in-up animate-delay-2" : ""+ }`}+ >+ <div className="space-y-3">+ <CardHeader>+ <CardTitle className="text-2xl font-medium">+ App + Commercial License +{" "}+ <span className="text-blue-500 text-2xl font-bold">+ Cap Pro+ </span>+ </CardTitle>+ <CardDescription className="text-lg">+ For professional use + cloud features like shareable+ links, transcriptions, comments, & more. Perfect for teams+ or sharing with clients.+ </CardDescription>+ <div>+ <div className="flex items-center space-x-3">+ <h3 className="text-4xl">{isAnnual- ? proQuantity === 1- ? "per user, billed annually."- : `for ${proQuantity} users, billed annually.`- : proQuantity === 1- ? "per user, billed monthly."- : `for ${proQuantity} users, billed monthly.`}- </p>- {isAnnual && (- <p className="text-sm">- or, ${9 * proQuantity}/month,{" "}- {proQuantity === 1- ? "per user, "- : `for ${proQuantity} users, `}- billed monthly.+ ? `$${6 * proQuantity}/mo`+ : `$${9 * proQuantity}/mo`}+ </h3>+ <div>+ <p className="text-sm font-medium">+ {isAnnual+ ? proQuantity === 1+ ? "per user, billed annually."+ : `for ${proQuantity} users, billed annually.`+ : proQuantity === 1+ ? "per user, billed monthly."+ : `for ${proQuantity} users, billed monthly.`}</p>- )}+ {isAnnual && (+ <p className="text-sm">+ or, ${9 * proQuantity}/month,{" "}+ {proQuantity === 1+ ? "per user, "+ : `for ${proQuantity} users, `}+ billed monthly.+ </p>+ )}+ </div>+ </div>+ <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex items-center">+ <span className="mr-2 text-xs">+ Switch to {isAnnual ? "monthly" : "annually"}+ </span>+ <Switch+ checked={!isAnnual}+ onCheckedChange={() => setIsAnnual(!isAnnual)}+ />+ </div>+ <div className="flex items-center">+ <span className="mr-2 text-xs">Users:</span>+ <div className="flex gap-2 items-center">+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ proQuantity > 1 &&+ setProQuantity(proQuantity - 1)+ }+ className="px-2 py-0 h-6"+ >+ -+ </Button>+ <span className="w-4 text-center">+ {proQuantity}+ </span>+ <Button+ variant="secondary"+ size="sm"+ onClick={() => setProQuantity(proQuantity + 1)}+ className="px-2 py-0 h-6"+ >+ ++ </Button>+ </div>+ </div>+ </div>+ </div>+ </CardHeader>+ <CardContent>+ <Button+ variant="primary"+ onClick={() => planCheckout()}+ className="w-full"+ size="lg"+ disabled={proLoading}+ >+ {proLoading ? "Loading..." : "Upgrade to Cap Pro"}+ </Button>+ </CardContent>+ <CardFooter>+ <div className="space-y-8">+ <div>+ <ul className="p-0 space-y-3 list-none">+ {proList.map((item, index) => (+ <li+ key={index}+ className="flex justify-start items-center"+ >+ <div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">+ <Check className="w-3 h-3 stroke-[4px] stroke-green-500" />+ </div>+ <span className="ml-1.5 text-gray-500 font-bold">+ {item.text}+ </span>+ </li>+ ))}+ </ul></div></div>- <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">- <div className="flex items-center">- <span className="mr-2 text-xs">- Switch to {isAnnual ? "monthly" : "annually"}- </span>- <Switch- checked={!isAnnual}- onCheckedChange={() => setIsAnnual(!isAnnual)}- />+ </CardFooter>+ </div>+ </Card>+ </div>+ ) : (+ <div className="flex justify-center">+ <Card+ className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 max-w-2xl ${+ initialRender ? "fade-in-up animate-delay-2" : ""+ }`}+ >+ <div className="space-y-3">+ <CardHeader>+ <CardTitle className="text-2xl font-medium">+ <span className="text-black text-2xl font-medium">+ Self-hosted+ </span>{" "}+ <span className="text-blue-500 text-2xl font-bold">+ Cap Pro+ </span>+ </CardTitle>+ <CardDescription className="text-lg">+ Deploy Cap on your own infrastructure with full control+ over your data. Ideal for enterprises and organizations+ with specific security requirements or those wanting to+ white label the platform.+ </CardDescription>+ <div>+ <div className="flex items-center space-x-3">+ <h3 className="text-4xl">+ {isSelfHostedAnnual+ ? `$${6 * selfHostedQuantity}/mo`+ : `$${9 * selfHostedQuantity}/mo`}+ </h3>+ <div>+ <p className="text-sm font-medium">+ {`for ${selfHostedQuantity} users, billed ${+ isSelfHostedAnnual ? "annually" : "monthly"+ }.`}+ </p>+ {isSelfHostedAnnual && (+ <p className="text-sm">+ or, ${9 * selfHostedQuantity}/month, for{" "}+ {selfHostedQuantity} users, billed monthly.+ </p>+ )}+ </div></div>- <div className="flex items-center">- <span className="mr-2 text-xs">Users:</span>- <div className="flex gap-2 items-center">- <Button- variant="secondary"- size="sm"- onClick={() =>- proQuantity > 1 && setProQuantity(proQuantity - 1)+ <div className="flex items-center justify-between pt-4 mt-2 border-t border-gray-200">+ <div className="flex items-center">+ <span className="mr-2 text-xs">+ Switch to{" "}+ {isSelfHostedAnnual ? "monthly" : "annually"}+ </span>+ <Switch+ checked={!isSelfHostedAnnual}+ onCheckedChange={() =>+ setIsSelfHostedAnnual(!isSelfHostedAnnual)}- className="px-2 py-0 h-6"- >- -- </Button>- <span className="w-4 text-center">{proQuantity}</span>- <Button- variant="secondary"- size="sm"- onClick={() => setProQuantity(proQuantity + 1)}- className="px-2 py-0 h-6"- >- +- </Button>+ />+ </div>+ <div className="flex items-center">+ <span className="mr-2 text-xs">Users:</span>+ <div className="flex gap-2 items-center">+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ selfHostedQuantity > 10 &&+ setSelfHostedQuantity(selfHostedQuantity - 1)+ }+ className="px-2 py-0 h-6"+ >+ -+ </Button>+ <span className="w-4 text-center">+ {selfHostedQuantity}+ </span>+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ setSelfHostedQuantity(selfHostedQuantity + 1)+ }+ className="px-2 py-0 h-6"+ >+ ++ </Button>+ </div></div></div></div>- </div>- </CardHeader>- <CardContent>- <Button- variant="primary"- onClick={() => planCheckout()}- className="w-full"- size="lg"- disabled={proLoading}- >- {proLoading ? "Loading..." : "Upgrade to Cap Pro"}- </Button>- </CardContent>- <CardFooter>- <div className="space-y-8">- <div>- <ul className="p-0 space-y-3 list-none">- {proList.map((item, index) => (- <li- key={index}- className="flex justify-start items-center"- >- <div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">- <Check className="w-3 h-3 stroke-[4px] stroke-green-500" />- </div>- <span className="ml-1.5 text-gray-500 font-bold">- {item.text}- </span>- </li>- ))}- </ul>+ </CardHeader>+ <CardContent>+ <Button+ variant="primary"+ onClick={openSelfHostedCheckout}+ className="w-full"+ size="lg"+ disabled={selfHostedLoading}+ >+ {selfHostedLoading+ ? "Loading..."+ : "Get Self-hosted Cap Pro"}+ </Button>+ </CardContent>+ <CardFooter>+ <div className="space-y-8">+ <div>+ <ul className="p-0 space-y-3 list-none">+ {selfHostedList.map((item, index) => (+ <li+ key={index}+ className="flex justify-start items-center"+ >+ <div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">+ <Check className="w-3 h-3 stroke-[4px] stroke-green-500" />+ </div>+ <span className="ml-1.5 text-gray-500 font-bold">+ {item.text}+ </span>+ </li>+ ))}+ </ul>+ </div></div>- </div>- </CardFooter>- </div>- </Card>- </div>+ </CardFooter>+ </div>+ </Card>+ </div>+ )}</div><div><imgdiff --git a/apps/web/components/pages/SelfHostingPage.tsx b/apps/web/components/pages/SelfHostingPage.tsxnew file mode 100644index 000000000..77a677750--- /dev/null+++ b/apps/web/components/pages/SelfHostingPage.tsx@@ -0,0 +1,165 @@+// million-ignore++"use client";++import { CommercialGetStarted } from "@/components/CommercialGetStarted";+import { Button } from "@cap/ui";+import { LogoSection } from "./_components/LogoSection";++interface FeatureCardProps {+ title: string;+ description: string;+ imagePath: string;+ imageAlt?: string;+ className?: string;+ imageHeight?: string;+}++const FeatureCard: React.FC<FeatureCardProps> = ({+ title,+ description,+ imagePath,+ imageAlt,+ className,+ imageHeight = "h-48",+}) => {+ return (+ <div+ className={`bg-[#FAFAFA] rounded-[12px] p-8 pt-0 h-full flex flex-col overflow-hidden ${className}`}+ >+ <img+ src={imagePath}+ alt={imageAlt || title}+ className={`w-full ${imageHeight} object-contain rounded-lg mb-6`}+ />+ <h3 className="text-[1.25rem] leading-[1.5rem] font-semibold mb-1">+ {title}+ </h3>+ <p className="text-[1rem] leading-[1.5rem] text-[#151515/60] mb-0 max-w-lg">+ {description}+ </p>+ </div>+ );+};++export const SelfHostingPage = () => {+ const handleSmoothScroll = (+ e: React.MouseEvent<HTMLButtonElement>,+ targetId: string+ ) => {+ e.preventDefault();+ const targetElement = document.getElementById(targetId);+ if (targetElement) {+ window.scrollTo({+ top: targetElement.offsetTop,+ behavior: "smooth",+ });+ }+ };++ return (+ <>+ <div className="mt-[120px]">+ <div className="relative z-10 px-5 w-full pt-24 pb-36">+ <div className="mx-auto text-center wrapper wrapper-sm">+ <h1 className="fade-in-down text-[2rem] font-bold leading-[2.5rem] md:text-[3.75rem] md:leading-[4rem] relative z-10 text-black mb-4">+ Self-host Cap+ </h1>+ <p className="mx-auto mb-8 max-w-3xl text-md sm:text-xl text-zinc-500 fade-in-down animate-delay-1">+ Deploy Cap on your own infrastructure with full control over your+ data. Ideal for enterprises and organizations with specific+ security requirements or those wanting to white label the+ platform.+ </p>+ </div>+ <div className="flex flex-col justify-center items-center mb-5 space-y-2 fade-in-up animate-delay-2 sm:flex-row sm:space-y-0 sm:space-x-2">+ <Button+ variant="white"+ href="#features"+ size="lg"+ className="flex justify-center items-center w-full font-medium text-md sm:w-auto"+ onClick={(e) => handleSmoothScroll(e, "features")}+ >+ Learn More+ </Button>+ <Button+ variant="radialblue"+ href="/pricing?type=selfhosted"+ size="lg"+ className="relative z-[20] w-full font-medium text-md sm:w-auto"+ >+ Pricing+ </Button>+ </div>+ <img+ src="/illustrations/mask-big-recorder.webp"+ alt="Self-hosting Background"+ className="w-full h-auto pointer-events-none z-0 absolute top-0 left-0 -mt-40"+ />+ </div>+ <LogoSection />+ <div className="pb-32 wrapper md:pb-40" id="features">+ <div className="space-y-3">+ {/* Section 1: 35% / 65% split */}+ <div className="grid grid-cols-1 md:grid-cols-12 gap-3">+ <div className="md:col-span-5">+ <FeatureCard+ title="Privacy-first"+ description="Host Cap on your own servers with complete data sovereignty. Maintain full control over your sensitive information and ensure compliance with your organization's security policies and regulatory requirements."+ imagePath="/illustrations/privacy.webp"+ imageAlt="Complete Control"+ imageHeight="h-[274px]"+ />+ </div>+ <div className="md:col-span-7">+ <FeatureCard+ title="Multi-Platform Support"+ description="Self-hosted Cap works seamlessly across macOS and Windows, giving your team the flexibility to collaborate regardless of their device preference. Deploy once and enable your entire organization to capture, share, and collaborate from any device."+ imagePath="/illustrations/multi-platform.webp"+ imageAlt="Enterprise-Ready"+ imageHeight="h-[274px]"+ />+ </div>+ </div>++ {/* Section 2: 65% / 35% split */}+ <div className="grid grid-cols-1 md:grid-cols-12 gap-3">+ <div className="md:col-span-8">+ <FeatureCard+ title="Unlimited Recording and Cloud Storage"+ description="Configure storage limits based on your infrastructure capacity. Self-hosting eliminates cloud storage fees and gives you complete control over retention policies, ideal for teams with high-volume recording needs or long-term archival requirements."+ imagePath="/illustrations/cloud-feature.webp"+ imageAlt="White Labeling"+ imageHeight="h-[215px]"+ />+ </div>+ <div className="md:col-span-4">+ <FeatureCard+ title="High-Quality Video Capture"+ description="Deliver crystal-clear recordings to your team with self-hosted infrastructure optimized for your network. Eliminate quality degradation from third-party services and ensure consistent performance across your organization."+ imagePath="/illustrations/video-capture.webp"+ imageAlt="Data Sovereignty"+ imageHeight="h-[224px]"+ />+ </div>+ </div>++ {/* Section 3: Full width */}+ <div className="grid grid-cols-1">+ <FeatureCard+ title="Advanced Team Collaboration"+ description="Enable seamless knowledge sharing across departments with customizable access controls and team workspaces. Self-hosted Cap provides enterprise-grade collaboration features that integrate with your existing authentication systems and team structure."+ imagePath="/illustrations/collaboration.webp"+ imageAlt="Dedicated Support"+ imageHeight="h-[285px]"+ />+ </div>+ </div>+ </div>+ <div className="mb-32 md:mb-40">+ <CommercialGetStarted />+ </div>+ </div>+ </>+ );+};diff --git a/apps/web/content/changelog/46.mdx b/apps/web/content/changelog/46.mdx.mdsimilarity index 100%rename from apps/web/content/changelog/46.mdxrename to apps/web/content/changelog/46.mdx.mddiff --git a/apps/web/public/illustrations/cloud-feature.webp b/apps/web/public/illustrations/cloud-feature.webpnew file mode 100644index 000000000..a1905963aBinary files /dev/null and b/apps/web/public/illustrations/cloud-feature.webp differdiff --git a/apps/web/public/illustrations/collaboration.webp b/apps/web/public/illustrations/collaboration.webpnew file mode 100644index 000000000..cb9b551f8Binary files /dev/null and b/apps/web/public/illustrations/collaboration.webp differdiff --git a/apps/web/public/illustrations/mask-big-recorder.webp b/apps/web/public/illustrations/mask-big-recorder.webpnew file mode 100644index 000000000..7dc5d7512Binary files /dev/null and b/apps/web/public/illustrations/mask-big-recorder.webp differdiff --git a/apps/web/public/illustrations/multi-platform.webp b/apps/web/public/illustrations/multi-platform.webpnew file mode 100644index 000000000..ac0ecc342Binary files /dev/null and b/apps/web/public/illustrations/multi-platform.webp differdiff --git a/apps/web/public/illustrations/privacy.webp b/apps/web/public/illustrations/privacy.webpnew file mode 100644index 000000000..d8029009bBinary files /dev/null and b/apps/web/public/illustrations/privacy.webp differdiff --git a/apps/web/public/illustrations/video-capture.webp b/apps/web/public/illustrations/video-capture.webpnew file mode 100644index 000000000..44ea73ee3Binary files /dev/null and b/apps/web/public/illustrations/video-capture.webp differ