Skip to content

Open AI UGC — free, open-source alternative to Arcads and MakeUGC. Generate AI UGC video ads with realistic AI actors using Veo 3.1, Seedance 2, Grok Video, and Happy Horse 1. Self-host on Next.js + Stripe + MUAPI.

Rename dashboard route to gallery, update Stripe checkout success redirect URL, configure default root light mode variables in globals.css, remove duplicate Navbar from pricing page, and clean up hardcoded primary-500 classes

Jaya Prasad Kavuru2fec30d2112f
diff --git a/src/app/api/checkout/stripe/route.js b/src/app/api/checkout/stripe/route.js
index 34ad356..823d3ea 100644
--- a/src/app/api/checkout/stripe/route.js
+++ b/src/app/api/checkout/stripe/route.js
@@ -36,7 +36,7 @@ export async function POST(req) {
},
],
mode: "payment",
- success_url: `${process.env.NEXTAUTH_URL}/dashboard?status=success`,
+ success_url: `${process.env.NEXTAUTH_URL}/gallery?status=success`,
cancel_url: `${process.env.NEXTAUTH_URL}/pricing?status=cancelled`,
metadata: {
userId: session.user.id,
diff --git a/src/app/dashboard/page.js b/src/app/gallery/page.js
similarity index 95%
rename from src/app/dashboard/page.js
rename to src/app/gallery/page.js
index 99a6c2f..03e249a 100644
--- a/src/app/dashboard/page.js
+++ b/src/app/gallery/page.js
@@ -66,7 +66,7 @@ export default function Dashboard() {
<Button
onClick={() => router.push("/")}
size="lg"
- className="!rounded-full !bg-primary-500 !text-white hover:!bg-primary-600 px-6 py-4 font-bold text-sm shadow-xl shadow-primary-500/20"
+ className="!rounded-full !bg-primary !text-white hover:!bg-primary-hover px-6 py-4 font-bold text-sm shadow-xl shadow-primary/20"
>
<FiPlus className="mr-2" /> New Creation
</Button>
@@ -76,7 +76,7 @@ export default function Dashboard() {
<div className="max-w-7xl mx-auto">
{isLoading ? (
<div className="py-32 flex flex-col items-center justify-center gap-4">
- <FiClock className="text-4xl text-primary-200 animate-spin" />
+ <FiClock className="text-4xl text-primary animate-spin" />
<span className="text-xs font-medium text-muted animate-pulse">Syncing Archive...</span>
</div>
) : creations.length === 0 ? (
@@ -119,7 +119,7 @@ export default function Dashboard() {
</div>
) : (
<div className="w-full h-full flex flex-col items-center justify-center bg-glass-hover gap-4">
- <FiClock className="text-2xl text-primary-300 animate-spin" />
+ <FiClock className="text-2xl text-primary animate-spin" />
<span className="text-xs font-medium text-muted animate-pulse">Processing...</span>
</div>
)}
@@ -183,7 +183,7 @@ export default function Dashboard() {
</div>
) : (
<div className="w-full h-full flex flex-col items-center justify-center gap-6">
- <FiClock className="text-6xl text-primary-200 animate-spin" />
+ <FiClock className="text-6xl text-primary animate-spin" />
<span className="text-xs font-medium text-muted animate-pulse">Syncing manifesting...</span>
</div>
)}
@@ -242,7 +242,7 @@ export default function Dashboard() {
download
target="_blank"
rel="noopener noreferrer"
- className="w-full py-4 bg-primary-500 text-white rounded-full font-bold text-xs flex items-center justify-center gap-3 transition-all hover:bg-primary-600 active:scale-[0.98] shadow-xl shadow-primary-500/20"
+ className="w-full py-4 bg-primary text-white rounded-full font-bold text-xs flex items-center justify-center gap-3 transition-all hover:bg-primary-hover active:scale-[0.98] shadow-xl shadow-primary/20"
>
<FiDownload size={14} /> Download Asset
</a>
diff --git a/src/app/globals.css b/src/app/globals.css
index 1162605..e652cd4 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -16,6 +16,19 @@
--color-primary-btn-text: var(--primary-btn-text, #ffffff);
}
+:root {
+ --bg-page: #f9fafb;
+ --bg-card: #ffffff;
+ --bg-card-hover: #f3f4f6;
+ --bg-elevated: #ffffff;
+ --divider: #e5e7eb;
+ --primary: #8b5cf6;
+ --primary-hover: #7c3aed;
+ --primary-text: #111827;
+ --secondary-text: #4b5563;
+ --primary-btn-text: #ffffff;
+}
+
/* Premium Visual Themes Override Definitions */
[data-theme="cyberpunk"] {
--bg-page: #05010a;
diff --git a/src/app/page.js b/src/app/page.js
index 5f2a918..0df1c12 100644
--- a/src/app/page.js
+++ b/src/app/page.js
@@ -397,7 +397,7 @@ export default function Home() {
>
{['processing', 'pending', 'starting', 'queued'].includes(lastGeneration.status) ? (
<div className="flex flex-col items-center gap-4">
- <div className="w-12 h-12 border-4 border-primary-200 border-t-primary-500 rounded-full animate-spin" />
+ <div className="w-12 h-12 border-4 border-primary border-t-primary rounded-full animate-spin" />
<span className="text-[10px] font-black text-muted uppercase tracking-[0.3em] animate-pulse">
Manifesting ({lastGeneration.status})...
</span>
@@ -467,7 +467,7 @@ export default function Home() {
/>
{img.status === 'uploading' && (
<div className="absolute inset-0 flex items-center justify-center">
- <FiLoader className="text-primary-500 animate-spin text-sm" />
+ <FiLoader className="text-primary animate-spin text-sm" />
</div>
)}
<button
@@ -482,7 +482,7 @@ export default function Home() {
{uploadedImages.length < 7 && (
<button
onClick={() => fileInputRef.current?.click()}
- className="w-8 h-8 rounded border-2 border-dashed border-glass-border flex flex-col items-center justify-center text-muted hover:text-foreground hover:border-primary-500/50 transition-all group"
+ className="w-8 h-8 rounded border-2 border-dashed border-glass-border flex flex-col items-center justify-center text-muted hover:text-foreground hover:border-primary/50 transition-all group"
>
<FiPlus className="text-lg group-hover:scale-110 transition-transform" />
</button>
@@ -596,7 +596,7 @@ export default function Home() {
<button
onClick={handleGenerate}
disabled={isGenerating || !prompt.trim()}
- className="w-10 h-10 rounded-full bg-primary-500 text-white flex items-center justify-center shadow-lg shadow-primary-500/20 hover:bg-primary-600 transition-all disabled:opacity-50 disabled:cursor-not-allowed group relative overflow-hidden"
+ className="w-10 h-10 rounded-full bg-primary text-white flex items-center justify-center shadow-lg shadow-primary/20 hover:bg-primary-hover transition-all disabled:opacity-50 disabled:cursor-not-allowed group relative overflow-hidden"
>
{isGenerating ? (
<FiLoader className="text-lg animate-spin" />
diff --git a/src/app/pricing/page.js b/src/app/pricing/page.js
index 5847e99..b3a90c5 100644
--- a/src/app/pricing/page.js
+++ b/src/app/pricing/page.js
@@ -2,7 +2,6 @@
import { useSession } from "next-auth/react";
import { useState } from "react";
-import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";
import { FaCheck, FaInfoCircle } from "react-icons/fa";
import axios from "axios";
@@ -44,7 +43,6 @@ export default function Pricing() {
return (
<div className="flex min-h-dvh flex-col bg-bg-page select-none text-primary-text overflow-hidden">
<Toaster position="top-right" />
- <Navbar />
<main className="flex-1 max-w-7xl w-full mx-auto px-4 py-12 sm:px-6 lg:px-8 flex flex-col gap-10 overflow-y-auto scrollbar-subtle items-center">
<div className="text-center space-y-4">
diff --git a/src/components/Navbar.js b/src/components/Navbar.js
index e5aa792..4b69bc7 100644
--- a/src/components/Navbar.js
+++ b/src/components/Navbar.js
@@ -83,7 +83,7 @@ export default function Navbar() {
rel="noopener noreferrer"
className="flex items-center gap-2 rounded-full border border-divider px-4 py-1.5 text-xs font-bold text-secondary-text hover:text-primary-text hover:bg-bg-card transition-colors shadow-sm"
>
- <SiVercel className="text-xs text-white" />
+ <SiVercel className="text-xs text-current" />
<span>Deploy</span>
</a>
@@ -194,7 +194,7 @@ export default function Navbar() {
rel="noopener noreferrer"
className="flex w-full items-center justify-center gap-2 rounded-full border border-divider py-3 text-xs font-bold text-secondary-text hover:text-primary-text hover:bg-bg-card transition-all"
>
- <SiVercel className="text-xs text-white" />
+ <SiVercel className="text-xs text-current" />
<span>Clone & Deploy Template</span>
</a>
diff --git a/src/components/ui/Button.jsx b/src/components/ui/Button.jsx
index 3307fd6..ac17b79 100644
--- a/src/components/ui/Button.jsx
+++ b/src/components/ui/Button.jsx
@@ -12,14 +12,14 @@ export function Button({
isLoading = false,
...props
}) {
- const baseStyles = "inline-flex items-center justify-center rounded-full font-semibold transition-all focus:outline-none focus:ring-2 focus:ring-primary-500/50 disabled:opacity-50 disabled:pointer-events-none active:scale-95";
+ const baseStyles = "inline-flex items-center justify-center rounded-full font-semibold transition-all focus:outline-none focus:ring-2 focus:ring-primary/50 disabled:opacity-50 disabled:pointer-events-none active:scale-95";
const variants = {
- primary: "bg-primary-500 text-white shadow-lg shadow-primary-500/25 hover:bg-primary-600",
+ primary: "bg-primary text-white shadow-lg shadow-primary/25 hover:bg-primary-hover",
secondary: "bg-secondary-500 text-white shadow-lg shadow-secondary-500/25 hover:bg-secondary-600",
- outline: "border-2 border-primary-500 text-primary-500 hover:bg-primary-500/10",
+ outline: "border-2 border-primary text-primary hover:bg-primary/10",
glass: "glass-card hover:bg-glass-hover text-foreground",
- ghost: "hover:bg-primary-500/10 text-primary-500",
+ ghost: "hover:bg-primary/10 text-primary",
};
const sizes = {
diff --git a/src/components/ui/Card.jsx b/src/components/ui/Card.jsx
index 7774c95..d13f614 100644
--- a/src/components/ui/Card.jsx
+++ b/src/components/ui/Card.jsx
@@ -18,7 +18,7 @@ export function Card({ children, className, hover = true, ...props }) {
{...props}
>
{/* Subtle background glow */}
- <div className="absolute -top-24 -right-24 w-48 h-48 bg-primary-500/5 rounded-full blur-3xl pointer-events-none" />
+ <div className="absolute -top-24 -right-24 w-48 h-48 bg-primary/5 rounded-full blur-3xl pointer-events-none" />
<div className="relative z-10">
{children}
</div>