50+ open-source generative AI apps you can clone, deploy, and monetize — image generators, video tools, virtual try-ons, AI SaaS templates, and platform integrations. One-click Vercel deploy on every template.
JavaScript ai-appsai-image-generatorai-saasai-toolsai-video-generatorawesomeawesome-listgenerative-aigenerative-ai-appsimage-generationnextjsnextjs-boilerplateopen-sourceopen-source-aisaas-boilerplatesaas-templateseedance2text-to-imagetext-to-videovideo-generation
feat: enhance composer and live device preview with channel sync and refined styling
jaiprasad049590f3494878
diff --git a/src/app/gallery/page.js b/src/app/gallery/page.jsindex e53ba29..a2175b9 100644--- a/src/app/gallery/page.js+++ b/src/app/gallery/page.js@@ -75,7 +75,7 @@ export default function GalleryPage() {{/* Guest Warning */}{!session?.user && (- <div className="bg-amber-500/5 border border-amber-500/20 rounded-xl p-4 flex items-center justify-between gap-4">+ <div className="bg-amber-500/5 border border-amber-500/20 rounded-lg p-4 flex items-center justify-between gap-4"><div className="flex items-center gap-3"><FaExclamationTriangle className="text-amber-500 text-lg shrink-0" /><div className="flex flex-col text-left">@@ -95,7 +95,7 @@ export default function GalleryPage() {{session?.user && (<>{/* Filters panel */}- <div className="flex flex-col sm:flex-row gap-4 justify-between items-center bg-zinc-900/30 p-4 rounded-xl border border-zinc-900">+ <div className="flex flex-col sm:flex-row gap-4 justify-between items-center bg-zinc-900/30 p-4 rounded-lg border border-zinc-900">{/* Search bar */}<div className="relative w-full sm:w-80"><FiSearch className="absolute left-3 top-3.5 text-zinc-500 text-sm" />@@ -151,7 +151,7 @@ export default function GalleryPage() {{loading ? (<div className="grid grid-cols-1 md:grid-cols-3 gap-6 w-full mt-4">{[...Array(6)].map((_, i) => (- <div key={i} className="card-premium h-80 bg-zinc-900/60 animate-pulse rounded-xl" />+ <div key={i} className="card-premium h-80 bg-zinc-900/60 animate-pulse rounded-lg" />))}</div>) : filteredPosts.length > 0 ? (@@ -240,7 +240,7 @@ export default function GalleryPage() {{(!searchQuery && platformFilter === "all") && (<Linkhref="/"- className="px-4 py-2 bg-gradient-to-r from-violet-500 to-fuchsia-500 hover:from-violet-600 hover:to-fuchsia-600 text-white font-bold text-xs rounded-xl shadow-lg transition-colors cursor-pointer"+ className="px-4 py-2 bg-gradient-to-r from-violet-500 to-fuchsia-500 hover:from-violet-600 hover:to-fuchsia-600 text-white font-bold text-xs rounded-lg shadow-lg transition-colors cursor-pointer">Go to Workspace</Link>diff --git a/src/app/integrations/page.js b/src/app/integrations/page.jsindex cee69db..a67bba3 100644--- a/src/app/integrations/page.js+++ b/src/app/integrations/page.js@@ -383,7 +383,7 @@ export default function IntegrationsPage() {{/* Guest Warning alert */}{!session?.user && (- <div className="bg-amber-500/5 border border-amber-500/20 rounded-xl p-4 flex items-center justify-between gap-4">+ <div className="bg-amber-500/5 border border-amber-500/20 rounded-lg p-4 flex items-center justify-between gap-4"><div className="flex items-center gap-3"><FiAlertTriangle className="text-amber-500 text-lg shrink-0" /><div className="flex flex-col gap-0.5">@@ -413,7 +413,7 @@ export default function IntegrationsPage() {{/* Platform main row */}<div className="flex items-center justify-between gap-4"><div className="flex items-center gap-3">- <div className="h-10 w-10 rounded-xl bg-zinc-900 border border-zinc-800 flex items-center justify-center shrink-0">+ <div className="h-10 w-10 rounded-lg bg-zinc-900 border border-zinc-800 flex items-center justify-center shrink-0"><Icon className={`text-xl ${iconColor}`} /></div><div className="flex flex-col">@@ -467,7 +467,7 @@ export default function IntegrationsPage() {<div className="h-10 w-full bg-zinc-900/60 rounded-lg animate-pulse" />) : connected.length > 0 ? (connected.map((acc) => (- <div key={acc.id} className="bg-zinc-900/50 rounded-xl px-4 py-3 border border-zinc-900 flex items-center justify-between gap-3">+ <div key={acc.id} className="bg-zinc-900/50 rounded-lg px-4 py-3 border border-zinc-900 flex items-center justify-between gap-3"><div className="flex items-center gap-2 truncate">{renamingId === acc.id ? (<inputdiff --git a/src/app/page.js b/src/app/page.jsindex a943a47..2d4c415 100644--- a/src/app/page.js+++ b/src/app/page.js@@ -160,8 +160,8 @@ export default function WorkspaceDashboard() {{/* Feature Highlights Grid */}<div className="grid grid-cols-1 sm:grid-cols-3 gap-3 pt-10 text-left">- <div className="p-4 rounded-xl bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">- <div className="w-8 h-8 rounded-lg bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs">+ <div className="p-4 rounded-lg bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">+ <div className="w-8 h-8 rounded-md bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs"><FaCalendarAlt /></div><h4 className="text-xs font-medium text-zinc-200">@@ -172,8 +172,8 @@ export default function WorkspaceDashboard() {</p></div>- <div className="p-4 rounded-xl bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">- <div className="w-8 h-8 rounded-lg bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs">+ <div className="p-4 rounded-lg bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">+ <div className="w-8 h-8 rounded-md bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs"><FaShareAlt /></div><h4 className="text-xs font-medium text-zinc-200">@@ -184,8 +184,8 @@ export default function WorkspaceDashboard() {</p></div>- <div className="p-4 rounded-xl bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">- <div className="w-8 h-8 rounded-lg bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs">+ <div className="p-4 rounded-lg bg-zinc-900/40 border border-zinc-800/80 space-y-1.5">+ <div className="w-8 h-8 rounded-md bg-zinc-800/60 text-zinc-300 flex items-center justify-center text-xs"><FaRocket /></div><h4 className="text-xs font-medium text-zinc-200">@@ -204,59 +204,113 @@ export default function WorkspaceDashboard() {return (<div className="min-h-screen bg-bg-page text-zinc-100 p-4 sm:p-6 lg:p-8 space-y-6 pb-20"><div className="max-w-7xl mx-auto space-y-6">- {/* Clean, Vibrant Header */}- <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-zinc-800/60">- <div>- <h1 className="text-xl sm:text-2xl font-bold tracking-tight text-transparent bg-clip-text bg-gradient-to-r from-white via-zinc-100 to-indigo-300">- Content Calendar- </h1>- <p className="text-xs text-zinc-400 mt-0.5">- Schedule, preview, and organize posts across all channels- </p>+ {/* Studio Active Status & Header */}+ <div className="space-y-4">+ <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">+ <div>+ <div className="flex items-center gap-2 mb-1.5">+ <span className="w-2 h-2 rounded-full bg-emerald-400 shadow-sm shadow-emerald-400/80 animate-pulse" />+ <span className="text-[11px] font-bold text-emerald-400 tracking-widest uppercase font-mono">+ CREATOR STUDIO ACTIVE+ </span>+ </div>+ <h1 className="text-2xl sm:text-3xl font-black tracking-tight text-white uppercase">+ SOCIAL MEDIA SCHEDULING CALENDAR+ </h1>+ </div>++ <div className="flex items-center gap-2">+ <button+ onClick={fetchPosts}+ className="w-9 h-9 rounded-lg bg-zinc-900/90 hover:bg-zinc-800 border border-zinc-800 text-zinc-400 hover:text-white transition-all cursor-pointer flex items-center justify-center shadow-sm"+ title="Refresh calendar"+ >+ <FiRefreshCw className={`text-xs ${loading ? "animate-spin text-white" : ""}`} />+ </button>++ <button+ onClick={handleWriteWithAi}+ className="px-3.5 py-1.5 rounded-lg text-xs font-semibold text-white bg-gradient-to-r from-violet-600 via-purple-600 to-indigo-600 hover:from-violet-500 hover:to-indigo-500 border border-violet-400/30 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-violet-600/25 active:scale-95"+ title="Compose post with AI"+ >+ <FaBolt className="text-[11px] text-amber-300" />+ <span>Write with AI</span>+ </button>++ <button+ onClick={handleNewPost}+ className="px-4 py-1.5 rounded-lg text-xs font-bold text-white bg-blue-600 hover:bg-blue-500 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-blue-600/30 active:scale-95"+ >+ <FiPlus className="text-xs font-bold" />+ <span>CREATE POST</span>+ </button>+ </div></div>- <div className="flex items-center gap-2.5 flex-wrap sm:flex-nowrap justify-between sm:justify-end">- {/* Vibrant Stats Pill */}- <div className="flex items-center gap-3 px-3 py-1.5 rounded-lg bg-zinc-900/80 border border-zinc-800 text-xs text-zinc-300 shadow-sm">- <span className="flex items-center gap-1.5">- <span className="w-2 h-2 rounded-full bg-blue-400 shadow-sm shadow-blue-400/50 animate-pulse" />- <strong className="text-blue-400 font-bold">{scheduledCount}</strong> scheduled- </span>- <span className="text-zinc-700">|</span>- <span className="flex items-center gap-1.5">- <span className="w-2 h-2 rounded-full bg-emerald-400 shadow-sm shadow-emerald-400/50" />- <strong className="text-emerald-400 font-bold">{publishedCount}</strong> published- </span>- <span className="text-zinc-700">|</span>- <span className="flex items-center gap-1.5">- <span className="w-2 h-2 rounded-full bg-purple-400 shadow-sm shadow-purple-400/50" />- <strong className="text-purple-400 font-bold">{uniqueChannels}</strong> channels- </span>+ {/* 4 Prominent Stat Cards Grid */}+ <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">+ {/* Card 1: Scheduled */}+ <div className="p-3.5 rounded-lg bg-zinc-900/70 border border-zinc-800/80 flex items-center justify-between shadow-sm">+ <div className="space-y-0.5">+ <span className="text-[11px] font-semibold text-zinc-400 tracking-wider uppercase">+ SCHEDULED+ </span>+ <p className="text-2xl font-bold text-blue-500 font-mono">+ {scheduledCount}+ </p>+ </div>+ <div className="w-8 h-8 rounded-lg bg-blue-500/15 border border-blue-500/30 text-blue-400 flex items-center justify-center text-xs shadow-sm shadow-blue-500/20">+ <FaClock />+ </div></div>- <button- onClick={fetchPosts}- className="p-2 rounded-lg bg-zinc-900 hover:bg-zinc-800 border border-zinc-800 text-zinc-400 hover:text-zinc-200 transition-colors cursor-pointer"- title="Refresh calendar"- >- <FiRefreshCw className={`text-xs ${loading ? "animate-spin text-zinc-200" : ""}`} />- </button>+ {/* Card 2: Published */}+ <div className="p-3.5 rounded-lg bg-zinc-900/70 border border-zinc-800/80 flex items-center justify-between shadow-sm">+ <div className="space-y-0.5">+ <span className="text-[11px] font-semibold text-zinc-400 tracking-wider uppercase">+ PUBLISHED+ </span>+ <p className="text-2xl font-bold text-emerald-500 font-mono">+ {publishedCount}+ </p>+ </div>+ <div className="w-8 h-8 rounded-lg bg-emerald-500/15 border border-emerald-500/30 text-emerald-400 flex items-center justify-center text-xs shadow-sm shadow-emerald-500/20">+ <FaCheckCircle />+ </div>+ </div>- <button- onClick={handleWriteWithAi}- className="px-3.5 py-1.5 rounded-lg text-xs font-semibold text-white bg-gradient-to-r from-violet-600 via-purple-600 to-indigo-600 hover:from-violet-500 hover:to-indigo-500 border border-violet-400/30 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-violet-600/25 active:scale-95"- >- <FaBolt className="text-[11px] text-amber-300" />- <span>Write with AI</span>- </button>+ {/* Card 3: Connected Channels */}+ <div className="p-3.5 rounded-lg bg-zinc-900/70 border border-zinc-800/80 flex items-center justify-between shadow-sm">+ <div className="space-y-0.5">+ <span className="text-[11px] font-semibold text-zinc-400 tracking-wider uppercase">+ CONNECTED CHANNELS+ </span>+ <p className="text-2xl font-bold text-purple-500 font-mono">+ {uniqueChannels}+ </p>+ </div>+ <div className="w-8 h-8 rounded-lg bg-purple-500/15 border border-purple-500/30 text-purple-400 flex items-center justify-center text-xs shadow-sm shadow-purple-500/20">+ <FaShareAlt />+ </div>+ </div>- <button- onClick={handleNewPost}- className="px-3.5 py-1.5 rounded-lg text-xs font-semibold text-white bg-indigo-600 hover:bg-indigo-500 border border-indigo-500/40 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-indigo-600/25 active:scale-95"- >- <FiPlus className="text-xs" />- <span>New Post</span>- </button>+ {/* Card 4: Credits Balance */}+ <div className="p-3.5 rounded-lg bg-zinc-900/70 border border-zinc-800/80 flex items-center justify-between shadow-sm">+ <div className="space-y-0.5">+ <span className="text-[11px] font-semibold text-zinc-400 tracking-wider uppercase">+ CREDITS BALANCE+ </span>+ <p className="text-2xl font-bold text-amber-400 font-mono">+ {userCredits}+ </p>+ </div>+ <Link+ href="/pricing"+ className="px-3 py-1 rounded-md text-xs font-semibold text-amber-300 bg-amber-500/15 hover:bg-amber-500/25 border border-amber-500/30 transition-all shadow-sm"+ >+ Top Up+ </Link>+ </div></div></div>@@ -276,7 +330,7 @@ export default function WorkspaceDashboard() {onClick={() => setViewingPost(null)}><div- className="w-full max-w-md bg-zinc-950 border border-zinc-800 rounded-xl p-5 shadow-xl space-y-4"+ className="w-full max-w-md bg-zinc-950 border border-zinc-800 rounded-lg p-5 shadow-xl space-y-4"onClick={(e) => e.stopPropagation()}>{/* Header */}diff --git a/src/components/Navbar.js b/src/components/Navbar.jsindex 73961d1..1dcb477 100644--- a/src/components/Navbar.js+++ b/src/components/Navbar.js@@ -39,7 +39,7 @@ export default function Navbar() {{/* Logo and Brand Title (Visible at all times) */}<Link href="/" className="flex items-center gap-2.5 transition-transform hover:scale-[1.02] active:scale-95">- <div className="flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-indigo-500 via-purple-600 to-pink-500 text-white font-extrabold text-lg shadow-md shadow-indigo-500/30">+ <div className="flex h-9 w-9 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500 via-purple-600 to-pink-500 text-white font-extrabold text-lg shadow-md shadow-indigo-500/30">{logoLetter}</div><span className="text-lg font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-r from-white via-zinc-100 to-indigo-300 text-nowrap">diff --git a/src/components/calendar/ContentCalendar.jsx b/src/components/calendar/ContentCalendar.jsxindex 9f46927..99d5220 100644--- a/src/components/calendar/ContentCalendar.jsx+++ b/src/components/calendar/ContentCalendar.jsx@@ -194,7 +194,7 @@ export default function ContentCalendar({};return (- <div className="flex flex-col bg-zinc-950 border border-zinc-800/80 rounded-xl overflow-hidden shadow-sm">+ <div className="flex flex-col bg-zinc-950 border border-zinc-800/80 rounded-lg overflow-hidden shadow-sm">{/* Calendar Header & Minimal Toolbar */}<div className="p-3.5 sm:p-4 border-b border-zinc-800/60 flex flex-col sm:flex-row sm:items-center justify-between gap-3 bg-zinc-900/30">{/* Left: Date Navigation */}@@ -225,7 +225,7 @@ export default function ContentCalendar({</button></div>- <h2 className="text-sm font-semibold text-zinc-100 tracking-tight">+ <h2 className="text-sm sm:text-base font-black text-white uppercase tracking-wider">{monthName}</h2></div>@@ -234,7 +234,7 @@ export default function ContentCalendar({<div className="flex items-center gap-2.5 flex-wrap sm:flex-nowrap justify-between sm:justify-end">{/* Platform Filter Pills */}<div className="flex items-center gap-1 bg-zinc-900/90 p-1 rounded-lg border border-zinc-800 text-xs">- {["all", "youtube", "tiktok", "instagram", "x_twitter", "linkedin", "threads"].map((platKey) => {+ {["all", "youtube", "tiktok", "instagram", "x_twitter", "linkedin"].map((platKey) => {const isActive = platformFilter === platKey;const plat = PLATFORM_CONFIG[platKey];const Icon = plat?.Icon;@@ -246,7 +246,7 @@ export default function ContentCalendar({className={`px-2 py-1 rounded-md text-[11px] font-medium transition-all cursor-pointer flex items-center gap-1.5 ${isActive? platKey === "all"- ? "bg-indigo-600 text-white shadow-sm shadow-indigo-500/30 font-semibold"+ ? "bg-zinc-800 text-white font-bold shadow-sm": plat?.activePill || "bg-zinc-800 text-white": "text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50"}`}@@ -263,9 +263,9 @@ export default function ContentCalendar({<buttontype="button"onClick={() => setViewMode("month")}- className={`px-2.5 py-1 rounded-md text-xs font-medium transition-all cursor-pointer ${+ className={`px-3 py-1 rounded-md text-xs font-bold transition-all cursor-pointer ${viewMode === "month"- ? "bg-indigo-600 text-white shadow-sm shadow-indigo-500/25 font-semibold"+ ? "bg-blue-600 text-white shadow-sm shadow-blue-600/30 font-bold": "text-zinc-400 hover:text-white"}`}>@@ -274,15 +274,27 @@ export default function ContentCalendar({<buttontype="button"onClick={() => setViewMode("week")}- className={`px-2.5 py-1 rounded-md text-xs font-medium transition-all cursor-pointer ${+ className={`px-3 py-1 rounded-md text-xs font-bold transition-all cursor-pointer ${viewMode === "week"- ? "bg-indigo-600 text-white shadow-sm shadow-indigo-500/25 font-semibold"+ ? "bg-blue-600 text-white shadow-sm shadow-blue-600/30 font-bold": "text-zinc-400 hover:text-white"}`}>Week</button></div>++ {/* New Post Button in Calendar Toolbar */}+ {onNewPostClick && (+ <button+ type="button"+ onClick={onNewPostClick}+ className="px-3.5 py-1.5 rounded-lg text-xs font-extrabold text-white bg-blue-600 hover:bg-blue-500 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-blue-600/40 active:scale-95"+ >+ <FaPlus className="text-[10px]" />+ <span>NEW POST</span>+ </button>+ )}</div></div>@@ -290,14 +302,14 @@ export default function ContentCalendar({{viewMode === "month" && (<div className="flex flex-col">{/* Day of Week Header */}- <div className="grid grid-cols-7 border-b border-zinc-800/60 bg-zinc-900/50 text-center py-2 text-xs font-semibold text-zinc-400">- <span>Mon</span>- <span>Tue</span>- <span>Wed</span>- <span>Thu</span>- <span>Fri</span>- <span>Sat</span>- <span>Sun</span>+ <div className="grid grid-cols-7 border-b border-zinc-800/60 bg-zinc-900/50 text-center py-2.5 text-[11px] font-bold text-zinc-400 uppercase tracking-wider">+ <span>MON</span>+ <span>TUE</span>+ <span>WED</span>+ <span>THU</span>+ <span>FRI</span>+ <span>SAT</span>+ <span>SUN</span></div>{/* Calendar Grid */}diff --git a/src/components/composer/AiPostWriter.jsx b/src/components/composer/AiPostWriter.jsxindex f0cfed5..2f8ea43 100644--- a/src/components/composer/AiPostWriter.jsx+++ b/src/components/composer/AiPostWriter.jsx@@ -65,15 +65,15 @@ export default function AiPostWriter({};return (- <div className="bg-gradient-to-b from-violet-950/20 via-zinc-900/70 to-zinc-900/90 border border-violet-500/30 rounded-xl p-4 space-y-3.5 text-xs text-zinc-100 shadow-xl shadow-violet-950/20 animate-fade-in">+ <div className="bg-gradient-to-b from-violet-950/20 via-zinc-900/70 to-zinc-900/90 border border-violet-500/30 rounded-lg p-4 space-y-3.5 text-xs text-zinc-100 shadow-xl shadow-violet-950/20 animate-fade-in">{/* Header */}<div className="flex items-center justify-between pb-2.5 border-b border-violet-500/20"><div className="flex items-center gap-2">- <div className="w-6 h-6 rounded-lg bg-gradient-to-br from-violet-500 via-purple-600 to-indigo-600 text-white flex items-center justify-center shadow-md shadow-violet-500/30">+ <div className="w-6 h-6 rounded-md bg-gradient-to-br from-violet-500 via-purple-600 to-indigo-600 text-white flex items-center justify-center shadow-md shadow-violet-500/30"><FaMagic className="text-[11px]" /></div><span className="font-semibold text-zinc-100">- Write with AI <span className="text-[10px] text-violet-300 font-mono font-normal">(gpt-5-mini)</span>+ Write with AI</span><span className={`px-2 py-0.5 rounded text-[10px] uppercase font-semibold ${platform === "youtube" ? "bg-red-500/20 text-red-400 border border-red-500/30" :@@ -100,7 +100,7 @@ export default function AiPostWriter({</div>{error && (- <div className="p-2.5 bg-red-500/10 border border-red-500/30 rounded-lg text-[11px] text-red-400 flex items-center gap-1.5">+ <div className="p-2.5 bg-red-500/10 border border-red-500/30 rounded-md text-[11px] text-red-400 flex items-center gap-1.5"><FiAlertCircle className="text-xs shrink-0" /><span>{error}</span></div>@@ -116,7 +116,7 @@ export default function AiPostWriter({onChange={(e) => setPrompt(e.target.value)}rows={2}placeholder="e.g. Announce our new AI scheduling tool with key benefits, or share 3 productivity tips for creators..."- className="w-full bg-zinc-950/80 border border-zinc-800 rounded-lg p-2.5 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-violet-500/60 focus:ring-1 focus:ring-violet-500/30 resize-none transition-all leading-relaxed"+ className="w-full bg-zinc-950/80 border border-zinc-800 rounded-md p-2.5 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-violet-500/60 focus:ring-1 focus:ring-violet-500/30 resize-none transition-all leading-relaxed"onKeyDown={(e) => {if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {handleGenerate();@@ -158,12 +158,12 @@ export default function AiPostWriter({type="button"disabled={loading}onClick={handleGenerate}- className="px-4 py-1.5 rounded-lg text-xs font-semibold text-white bg-gradient-to-r from-violet-600 via-purple-600 to-indigo-600 hover:from-violet-500 hover:to-indigo-500 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-violet-500/30 active:scale-95 disabled:opacity-50"+ className="px-4 py-1.5 rounded-md text-xs font-semibold text-white bg-gradient-to-r from-violet-600 via-purple-600 to-indigo-600 hover:from-violet-500 hover:to-indigo-500 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-violet-500/30 active:scale-95 disabled:opacity-50">{loading ? (<><div className="w-3 h-3 border-2 border-white border-t-transparent rounded-full animate-spin" />- <span>Generating with gpt-5-mini...</span>+ <span>Generating...</span></>) : (<>@@ -176,7 +176,7 @@ export default function AiPostWriter({{/* Generated Result Preview */}{generatedResult && (- <div className="mt-3 p-3.5 rounded-lg bg-zinc-950/90 border border-violet-500/30 space-y-2.5 animate-fade-in shadow-inner">+ <div className="mt-3 p-3.5 rounded-md bg-zinc-950/90 border border-violet-500/30 space-y-2.5 animate-fade-in shadow-inner"><div className="flex items-center justify-between border-b border-zinc-800/80 pb-2"><span className="text-[11px] font-semibold text-violet-300 flex items-center gap-1"><FaMagic className="text-[10px]" /> Generated Suggestion@@ -233,7 +233,7 @@ export default function AiPostWriter({<buttontype="button"onClick={handlePrefill}- className="px-4 py-1.5 rounded-lg text-xs font-semibold text-white bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-emerald-500/25 active:scale-95"+ className="px-4 py-1.5 rounded-md text-xs font-semibold text-white bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 transition-all flex items-center gap-1.5 cursor-pointer shadow-md shadow-emerald-500/25 active:scale-95"><FaCheck className="text-[10px]" /><span>Prefill into Composer</span>diff --git a/src/components/composer/LiveDevicePreview.jsx b/src/components/composer/LiveDevicePreview.jsxindex 92769df..db5fd16 100644--- a/src/components/composer/LiveDevicePreview.jsx+++ b/src/components/composer/LiveDevicePreview.jsx@@ -1,7 +1,7 @@"use client";-import { useState } from "react";-import { FaYoutube, FaInstagram, FaLinkedin } from "react-icons/fa";+import { useState, useEffect } from "react";+import { FaYoutube, FaInstagram, FaLinkedin, FaCheckCircle, FaGlobeAmericas } from "react-icons/fa";import { FaXTwitter, FaThreads } from "react-icons/fa6";import { SiTiktok } from "react-icons/si";import {@@ -14,7 +14,10 @@ import {FiPlay,FiThumbsUp,FiThumbsDown,- FiSend+ FiSend,+ FiPlus,+ FiMusic,+ FiBarChart2} from "react-icons/fi";export default function LiveDevicePreview({@@ -27,6 +30,13 @@ export default function LiveDevicePreview({}) {const [activePreviewTab, setActivePreviewTab] = useState(platform);+ // Synchronize active preview tab whenever the composer's selected platform changes+ useEffect(() => {+ if (platform) {+ setActivePreviewTab(platform);+ }+ }, [platform]);+const displayTitle = title || "Your engaging post title goes here...";const displayDescription = description || "Write an engaging description, hook your audience, and add hashtags to boost reach!";const displayMedia = mediaUrl || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=800&auto=format&fit=crop&q=60";@@ -43,16 +53,16 @@ export default function LiveDevicePreview({];return (- <div className="flex flex-col h-full bg-zinc-950/50 rounded-xl border border-zinc-800 p-3.5 sm:p-4 overflow-hidden">+ <div className="flex flex-col h-full bg-zinc-950/50 rounded-lg border border-zinc-800 p-3.5 sm:p-4 overflow-hidden">{/* Header & Platform Switcher Tabs */}- <div className="flex flex-col sm:flex-row sm:items-center justify-between pb-3 mb-3 border-b border-zinc-800/80 gap-2">+ <div className="flex flex-col justify-between pb-3 mb-3 border-b border-zinc-800/80 gap-2"><div className="flex items-center gap-2"><span className="w-2 h-2 rounded-full bg-emerald-400 shadow-sm shadow-emerald-400/50 animate-pulse" /><span className="text-[11px] font-semibold text-zinc-300">Live Feed Mockup</span></div>- <div className="flex items-center gap-1 bg-zinc-900/90 p-1 rounded-lg border border-zinc-800 flex-wrap">+ {/* <div className="flex items-center gap-1 bg-zinc-900/90 p-1 rounded-md border border-zinc-800 flex-wrap">{previewTabs.map((tab) => {const Icon = tab.Icon;const isActive = activePreviewTab === tab.key;@@ -73,14 +83,14 @@ export default function LiveDevicePreview({</button>);})}- </div>+ </div> */}</div>{/* Device Mockup Canvas */}- <div className="flex-1 flex items-center justify-center min-h-[400px] overflow-hidden w-full">+ <div className="flex-1 flex justify-center items-start overflow-y-auto w-full py-1">{/* YOUTUBE MOCKUP */}{activePreviewTab === "youtube" && (- <div className="w-full max-w-[320px] mx-auto bg-zinc-900/90 rounded-xl border border-zinc-800 overflow-hidden text-zinc-100">+ <div className="w-full max-w-[340px] mx-auto bg-zinc-900 border border-zinc-800 rounded-lg overflow-hidden text-zinc-100 shadow-xl animate-fade-in">{/* Video Thumbnail */}<div className="relative aspect-video bg-black overflow-hidden group"><img@@ -89,57 +99,76 @@ export default function LiveDevicePreview({className="w-full h-full object-cover"/><div className="absolute inset-0 bg-black/25 flex items-center justify-center">- <div className="w-10 h-10 rounded-full bg-red-600/90 text-white flex items-center justify-center">+ <div className="w-10 h-10 rounded-full bg-red-600/90 text-white flex items-center justify-center shadow-lg"><FiPlay className="text-base ml-0.5 fill-current" /></div></div>- <span className="absolute bottom-1.5 right-1.5 bg-black/80 text-white text-[9px] font-mono px-1 py-0.5 rounded">+ <span className="absolute bottom-1.5 right-1.5 bg-black/85 text-white text-[9px] font-mono px-1.5 py-0.5 rounded font-semibold">12:45</span></div>- {/* Video Metadata */}+ {/* Video Content & Metadata */}<div className="p-3 space-y-2.5">- <div className="flex items-start gap-2.5">- <div className="w-8 h-8 rounded-full bg-zinc-800 text-zinc-300 font-medium flex items-center justify-center shrink-0 text-xs border border-zinc-700">- {displayAccount.charAt(0).toUpperCase()}- </div>- <div className="flex-1 min-w-0">- <h4 className="text-xs font-medium text-zinc-100 line-clamp-2 leading-snug">- {displayTitle}- </h4>- <p className="text-[10px] text-zinc-500 mt-0.5 flex items-center gap-1.5">- <span className="text-zinc-400">{displayAccount}</span>- <span>•</span>- <span>1.2K views</span>- </p>+ <div className="space-y-1">+ <h4 className="text-xs font-semibold text-zinc-100 line-clamp-2 leading-snug">+ {displayTitle}+ </h4>+ <p className="text-[10px] text-zinc-400 flex items-center gap-1.5">+ <span>14K views</span>+ <span>•</span>+ <span>2 hours ago</span>+ </p>+ </div>++ {/* Channel Profile Row */}+ <div className="flex items-center justify-between pt-1 border-t border-zinc-800/60">+ <div className="flex items-center gap-2 min-w-0">+ <div className="w-7 h-7 rounded-full bg-gradient-to-tr from-red-600 to-rose-500 text-white font-bold flex items-center justify-center shrink-0 text-xs shadow-sm">+ {displayAccount.charAt(0).toUpperCase()}+ </div>+ <div className="min-w-0 truncate">+ <p className="text-xs font-medium text-zinc-200 truncate leading-tight">+ {displayAccount}+ </p>+ <p className="text-[9px] text-zinc-400 leading-tight">+ 24.5K subscribers+ </p>+ </div></div>+ <button+ type="button"+ className="px-2.5 py-1 rounded-full bg-white text-zinc-950 font-bold text-[10px] hover:bg-zinc-200 transition-colors shrink-0"+ >+ Subscribe+ </button></div>- {/* Description Preview */}- <div className="bg-zinc-950/60 p-2 rounded-lg text-[11px] text-zinc-400 border border-zinc-800/60 leading-relaxed line-clamp-3">- {displayDescription}+ {/* Description Preview Box */}+ <div className="bg-zinc-950/70 p-2.5 rounded-md text-[11px] text-zinc-300 border border-zinc-800/70 leading-relaxed">+ <p className="line-clamp-2">{displayDescription}</p>{tags && (- <p className="text-zinc-500 font-mono mt-1 text-[10px]">+ <p className="text-sky-400 font-mono mt-1 text-[10px] truncate">{tags.split(",").map(t => `#${t.trim()}`).join(" ")}</p>)}</div>- {/* Engagement Bar */}- <div className="flex items-center justify-between pt-0.5 text-zinc-400 text-xs">- <div className="flex items-center gap-1 bg-zinc-800/60 px-2 py-0.5 rounded-md text-[11px]">+ {/* YouTube Pill Action Bar */}+ <div className="flex items-center gap-1.5 pt-0.5 text-zinc-300 text-xs overflow-x-auto">+ <div className="flex items-center bg-zinc-800/80 rounded-full px-2.5 py-1 text-[11px] gap-1.5 shrink-0"><FiThumbsUp className="text-[10px]" />- <span>248</span>- <span className="mx-1 text-zinc-600">|</span>+ <span>1.2K</span>+ <span className="text-zinc-600">|</span><FiThumbsDown className="text-[10px]" /></div>- <div className="flex items-center gap-1 bg-zinc-800/60 px-2 py-0.5 rounded-md text-[11px]">+ <div className="flex items-center bg-zinc-800/80 rounded-full px-2.5 py-1 text-[11px] gap-1 shrink-0"><FiShare2 className="text-[10px]" /><span>Share</span></div>- <div className="flex items-center gap-1 bg-zinc-800/60 px-2 py-0.5 rounded-md text-[11px]">+ <div className="flex items-center bg-zinc-800/80 rounded-full px-2.5 py-1 text-[11px] gap-1 shrink-0"><FiBookmark className="text-[10px]" />+ <span>Save</span></div></div></div>@@ -148,68 +177,90 @@ export default function LiveDevicePreview({{/* TIKTOK MOCKUP */}{activePreviewTab === "tiktok" && (- <div className="relative w-[250px] h-[420px] mx-auto bg-black rounded-2xl border border-zinc-800 overflow-hidden flex flex-col justify-between p-3">+ <div className="relative w-[260px] h-[450px] mx-auto bg-black rounded-lg border border-zinc-800 overflow-hidden flex flex-col justify-between p-3.5 shadow-2xl animate-fade-in text-white">{/* Background Media */}<imgsrc={displayMedia}alt="TikTok Media"className="absolute inset-0 w-full h-full object-cover"/>- <div className="absolute inset-0 bg-gradient-to-b from-black/40 via-transparent to-black/90" />+ <div className="absolute inset-0 bg-gradient-to-b from-black/50 via-transparent to-black/95 pointer-events-none" />{/* Top Navigation */}<div className="relative z-10 flex items-center justify-center gap-4 text-[11px] font-medium text-white/70 pt-1">- <span>Following</span>- <span className="text-white border-b-2 border-white pb-0.5">For You</span>+ <span className="hover:text-white cursor-pointer">Following</span>+ <span className="text-white border-b-2 border-white pb-0.5 font-bold">For You</span></div>- {/* Right Action Icons */}- <div className="absolute right-2.5 bottom-14 z-10 flex flex-col items-center gap-3 text-white">+ {/* Right Action Sidebar */}+ <div className="absolute right-2.5 bottom-12 z-10 flex flex-col items-center gap-3">+ {/* Creator Avatar with Follow Plus Badge */}<div className="relative mb-1">- <div className="w-7 h-7 rounded-full bg-zinc-800 border border-white overflow-hidden flex items-center justify-center font-bold text-xs">- {displayAccount.charAt(0).toUpperCase()}+ <div className="w-8 h-8 rounded-full bg-gradient-to-tr from-cyan-400 to-fuchsia-500 p-0.5">+ <div className="w-full h-full rounded-full bg-zinc-900 flex items-center justify-center font-bold text-xs">+ {displayAccount.charAt(0).toUpperCase()}+ </div>+ </div>+ <div className="absolute -bottom-1 left-1/2 -translate-x-1/2 w-3.5 h-3.5 rounded-full bg-rose-500 text-white flex items-center justify-center text-[9px] font-black shadow">+ <FiPlus /></div></div>++ {/* Heart */}<div className="flex flex-col items-center gap-0.5">- <div className="w-6 h-6 rounded-full bg-black/40 flex items-center justify-center">- <FiHeart className="text-xs text-red-500 fill-red-500" />+ <div className="w-7 h-7 rounded-full bg-black/40 flex items-center justify-center backdrop-blur-sm">+ <FiHeart className="text-sm text-red-500 fill-red-500" /></div>- <span className="text-[9px] font-mono">14.2K</span>+ <span className="text-[9px] font-mono font-medium">28.4K</span></div>++ {/* Comment */}<div className="flex flex-col items-center gap-0.5">- <div className="w-6 h-6 rounded-full bg-black/40 flex items-center justify-center">- <FiMessageCircle className="text-xs" />+ <div className="w-7 h-7 rounded-full bg-black/40 flex items-center justify-center backdrop-blur-sm">+ <FiMessageCircle className="text-sm" /></div>- <span className="text-[9px] font-mono">892</span>+ <span className="text-[9px] font-mono font-medium">1,240</span></div>++ {/* Bookmark */}<div className="flex flex-col items-center gap-0.5">- <div className="w-6 h-6 rounded-full bg-black/40 flex items-center justify-center">- <FiBookmark className="text-xs" />+ <div className="w-7 h-7 rounded-full bg-black/40 flex items-center justify-center backdrop-blur-sm">+ <FiBookmark className="text-sm" /></div>- <span className="text-[9px] font-mono">4.1K</span>+ <span className="text-[9px] font-mono font-medium">3,820</span></div>++ {/* Share */}<div className="flex flex-col items-center gap-0.5">- <div className="w-6 h-6 rounded-full bg-black/40 flex items-center justify-center">- <FiShare2 className="text-xs" />+ <div className="w-7 h-7 rounded-full bg-black/40 flex items-center justify-center backdrop-blur-sm">+ <FiShare2 className="text-sm" /></div>- <span className="text-[9px] font-mono">340</span>+ <span className="text-[9px] font-mono font-medium">840</span>+ </div>++ {/* Spinning Vinyl Record */}+ <div className="relative mt-1">+ <div className="w-7 h-7 rounded-full bg-zinc-900 border-2 border-zinc-700 flex items-center justify-center animate-spin" style={{ animationDuration: "4s" }}>+ <div className="w-2.5 h-2.5 rounded-full bg-zinc-800 border border-zinc-600" />+ </div>+ <span className="absolute -top-1 -right-1 text-[8px]">🎵</span></div></div>- {/* Bottom Caption & Audio */}- <div className="relative z-10 text-white space-y-1 pr-10 pb-1">- <span className="text-[11px] font-medium">{handle}</span>- <p className="text-[10px] leading-snug line-clamp-2 text-zinc-200">+ {/* Bottom Caption & Audio Info */}+ <div className="relative z-10 space-y-1.5 pr-12 pb-1">+ <span className="text-xs font-bold block drop-shadow-md">{handle}</span>+ <p className="text-[11px] leading-snug line-clamp-2 text-zinc-100 drop-shadow-md">{displayTitle} - {displayDescription}</p>{tags && (- <p className="text-[10px] text-cyan-300 font-mono">+ <p className="text-[10px] text-cyan-300 font-mono drop-shadow">{tags.split(",").map(t => `#${t.trim()}`).join(" ")}</p>)}- <div className="flex items-center gap-1 text-[9px] text-zinc-400 pt-0.5">- <span>🎵</span>- <span className="truncate">{displayAccount} • Original Sound</span>+ <div className="flex items-center gap-1.5 text-[9px] text-zinc-300 pt-0.5 drop-shadow">+ <FiMusic className="text-[10px]" />+ <span className="truncate">{displayAccount} • Original Audio</span></div></div></div>@@ -217,19 +268,21 @@ export default function LiveDevicePreview({{/* INSTAGRAM MOCKUP */}{activePreviewTab === "instagram" && (- <div className="w-full max-w-[320px] mx-auto bg-zinc-900/90 rounded-xl border border-zinc-800 overflow-hidden text-zinc-100">- {/* Post Header */}- <div className="flex items-center justify-between p-2.5 border-b border-zinc-800">+ <div className="w-full max-w-[340px] mx-auto bg-zinc-900 border border-zinc-800 rounded-lg overflow-hidden text-zinc-100 shadow-xl animate-fade-in">+ {/* Post Header with Story Ring */}+ <div className="flex items-center justify-between p-2.5 border-b border-zinc-800/80"><div className="flex items-center gap-2">- <div className="w-6 h-6 rounded-full bg-zinc-800 border border-zinc-700 flex items-center justify-center font-medium text-[10px]">- {displayAccount.charAt(0).toUpperCase()}+ <div className="p-[1.5px] bg-gradient-to-tr from-amber-500 via-rose-500 to-fuchsia-600 rounded-full">+ <div className="w-6 h-6 rounded-full bg-zinc-950 border border-zinc-900 flex items-center justify-center font-bold text-[10px] text-white">+ {displayAccount.charAt(0).toUpperCase()}+ </div></div><div>- <span className="text-[11px] font-medium block">{handle.replace("@", "")}</span>- <span className="text-[9px] text-zinc-500">Original Audio</span>+ <span className="text-xs font-semibold block leading-tight">{handle.replace("@", "")}</span>+ <span className="text-[9px] text-zinc-400 leading-tight">Original Audio</span></div></div>- <FiMoreHorizontal className="text-zinc-500 text-xs" />+ <FiMoreHorizontal className="text-zinc-400 text-xs cursor-pointer hover:text-white" /></div>{/* Media Canvas */}@@ -241,62 +294,82 @@ export default function LiveDevicePreview({/></div>- {/* Engagement Icons */}- <div className="p-2.5 space-y-1">- <div className="flex items-center justify-between text-sm">- <div className="flex items-center gap-3">- <FiHeart className="hover:text-red-400 cursor-pointer" />- <FiMessageCircle className="cursor-pointer" />- <FiSend className="cursor-pointer" />+ {/* Engagement Action Row */}+ <div className="p-3 space-y-1.5">+ <div className="flex items-center justify-between text-base">+ <div className="flex items-center gap-3 text-zinc-200">+ <FiHeart className="hover:text-red-500 transition-colors cursor-pointer" />+ <FiMessageCircle className="hover:text-zinc-400 transition-colors cursor-pointer" />+ <FiSend className="hover:text-zinc-400 transition-colors cursor-pointer" /></div>- <FiBookmark className="cursor-pointer" />+ <FiBookmark className="text-zinc-200 hover:text-zinc-400 transition-colors cursor-pointer" /></div>- <span className="text-[11px] font-medium block text-zinc-300">1,842 likes</span>- <p className="text-[11px] text-zinc-300 leading-snug line-clamp-2">- <span className="font-medium mr-1.5 text-zinc-100">{handle.replace("@", "")}</span>++ {/* Likes Count */}+ <p className="text-xs font-semibold text-zinc-200">+ Liked by <span className="font-bold">creator_hub</span> and <span className="font-bold">3,429 others</span>+ </p>++ {/* Post Caption */}+ <p className="text-xs text-zinc-300 leading-snug line-clamp-2">+ <span className="font-bold mr-1.5 text-zinc-100">{handle.replace("@", "")}</span>{displayTitle} - {displayDescription}</p>++ {/* Tags */}{tags && (- <p className="text-[10px] text-zinc-500 font-mono">+ <p className="text-[10px] text-indigo-400 font-mono">{tags.split(",").map(t => `#${t.trim()}`).join(" ")}</p>)}++ {/* Comment Link & Timestamp */}+ <p className="text-[10px] text-zinc-500 cursor-pointer hover:text-zinc-400 pt-0.5">+ View all 48 comments+ </p>+ <p className="text-[9px] text-zinc-500 uppercase tracking-wider font-medium">+ 2 HOURS AGO+ </p></div></div>)}{/* X / TWITTER MOCKUP */}{activePreviewTab === "x_twitter" && (- <div className="w-full max-w-[320px] mx-auto bg-zinc-950 rounded-xl border border-zinc-800 p-3.5 text-zinc-100 space-y-2">+ <div className="w-full max-w-[340px] mx-auto bg-zinc-950 border border-zinc-800 rounded-lg p-3.5 text-zinc-100 space-y-2.5 shadow-xl animate-fade-in"><div className="flex items-start gap-2.5">- <div className="w-7 h-7 rounded-full bg-zinc-800 flex items-center justify-center font-medium text-xs shrink-0 border border-zinc-700">+ <div className="w-8 h-8 rounded-full bg-zinc-800 flex items-center justify-center font-bold text-xs shrink-0 border border-zinc-700">{displayAccount.charAt(0).toUpperCase()}</div>+<div className="flex-1 min-w-0">+ {/* Author row */}<div className="flex items-center justify-between"><div className="flex items-center gap-1 truncate">- <span className="text-[11px] font-medium truncate">{displayAccount}</span>- <span className="text-[10px] text-zinc-500 truncate">{handle}</span>+ <span className="text-xs font-bold text-zinc-100 truncate">{displayAccount}</span>+ <FaCheckCircle className="text-sky-400 text-[11px] shrink-0" />+ <span className="text-[11px] text-zinc-500 truncate">{handle}</span>+ <span className="text-[11px] text-zinc-500">· 2h</span></div>- <FiMoreHorizontal className="text-zinc-500 shrink-0 text-xs" />+ <FiMoreHorizontal className="text-zinc-500 shrink-0 text-xs cursor-pointer hover:text-zinc-300" /></div>{/* Tweet Body */}- <p className="text-[11px] text-zinc-200 mt-1 leading-relaxed whitespace-pre-line line-clamp-3">+ <p className="text-xs text-zinc-200 mt-1 leading-relaxed whitespace-pre-line line-clamp-4">{displayTitle}{"\n"}{displayDescription}</p>{tags && (- <p className="text-[10px] text-zinc-500 font-mono mt-1">+ <p className="text-[11px] text-sky-400 font-mono mt-1">{tags.split(",").map(t => `#${t.trim()}`).join(" ")}</p>)}- {/* Media Embed */}+ {/* Media Attachment */}{displayMedia && (- <div className="mt-2 rounded-lg overflow-hidden border border-zinc-800 aspect-video bg-zinc-900">+ <div className="mt-2 rounded-md overflow-hidden border border-zinc-800/90 aspect-video bg-zinc-900"><imgsrc={displayMedia}alt="Tweet Media"@@ -305,21 +378,25 @@ export default function LiveDevicePreview({</div>)}- {/* Action Bar */}- <div className="flex items-center justify-between mt-2 text-zinc-500 text-[11px] max-w-[220px]">- <div className="flex items-center gap-1 hover:text-zinc-300 cursor-pointer">+ {/* X Engagement Metrics Bar */}+ <div className="flex items-center justify-between mt-2.5 text-zinc-500 text-[11px]">+ <div className="flex items-center gap-1 hover:text-sky-400 transition-colors cursor-pointer"><FiMessageCircle className="text-xs" />- <span>32</span>+ <span>34</span></div>- <div className="flex items-center gap-1 hover:text-zinc-300 cursor-pointer">+ <div className="flex items-center gap-1 hover:text-emerald-400 transition-colors cursor-pointer"><FiRepeat className="text-xs" />- <span>18</span>+ <span>56</span></div>- <div className="flex items-center gap-1 hover:text-zinc-300 cursor-pointer">+ <div className="flex items-center gap-1 hover:text-rose-500 transition-colors cursor-pointer"><FiHeart className="text-xs" />- <span>142</span>+ <span>412</span>+ </div>+ <div className="flex items-center gap-1 hover:text-sky-400 transition-colors cursor-pointer">+ <FiBarChart2 className="text-xs" />+ <span>12.8K</span></div>- <div className="flex items-center gap-1 hover:text-zinc-300 cursor-pointer">+ <div className="flex items-center gap-1 hover:text-zinc-300 transition-colors cursor-pointer"><FiBookmark className="text-xs" /></div></div>@@ -330,37 +407,50 @@ export default function LiveDevicePreview({{/* LINKEDIN MOCKUP */}{activePreviewTab === "linkedin" && (- <div className="w-full max-w-[320px] mx-auto bg-zinc-900/90 rounded-xl border border-zinc-800 p-3.5 text-zinc-100 space-y-2">+ <div className="w-full max-w-[340px] mx-auto bg-zinc-900 border border-zinc-800 rounded-lg p-3.5 text-zinc-100 space-y-2.5 shadow-xl animate-fade-in">{/* Header */}<div className="flex items-start justify-between">- <div className="flex items-center gap-2">- <div className="w-7 h-7 rounded-full bg-zinc-800 text-zinc-300 flex items-center justify-center font-medium text-xs border border-zinc-700">+ <div className="flex items-center gap-2.5">+ <div className="w-8 h-8 rounded-full bg-blue-600 text-white flex items-center justify-center font-bold text-xs border border-blue-500/40 shrink-0">{displayAccount.charAt(0).toUpperCase()}</div><div>- <h5 className="text-[11px] font-medium leading-tight">{displayAccount}</h5>- <p className="text-[9px] text-zinc-500 leading-tight">Creator</p>+ <div className="flex items-center gap-1">+ <h5 className="text-xs font-bold leading-tight text-zinc-100">{displayAccount}</h5>+ <span className="text-[10px] text-zinc-500 font-medium">• 1st</span>+ </div>+ <p className="text-[10px] text-zinc-400 leading-tight">Creator & AI Strategist</p>+ <p className="text-[9px] text-zinc-500 leading-tight flex items-center gap-1 mt-0.5">+ <span>2h</span>+ <span>•</span>+ <FaGlobeAmericas className="text-[8px]" />+ </p></div></div>- <FiMoreHorizontal className="text-zinc-500 text-xs" />+ <button+ type="button"+ className="text-blue-400 hover:text-blue-300 font-semibold text-xs flex items-center gap-0.5"+ >+ <FiPlus className="text-xs" /> Follow+ </button></div>{/* Post Content */}- <p className="text-[11px] text-zinc-300 leading-relaxed line-clamp-3">- <span className="font-medium text-zinc-100">{displayTitle}</span>+ <p className="text-xs text-zinc-300 leading-relaxed line-clamp-3">+ <span className="font-semibold text-zinc-100">{displayTitle}</span>{" "}{displayDescription}</p>{tags && (- <p className="text-[10px] text-zinc-500 font-mono">+ <p className="text-[10px] text-blue-400 font-mono">{tags.split(",").map(t => `#${t.trim()}`).join(" ")}</p>)}{/* Media */}{displayMedia && (- <div className="rounded-lg overflow-hidden border border-zinc-800 aspect-video bg-black">+ <div className="rounded-md overflow-hidden border border-zinc-800 aspect-video bg-black"><imgsrc={displayMedia}alt="LinkedIn Media"@@ -369,27 +459,112 @@ export default function LiveDevicePreview({</div>)}- {/* Engagement */}- <div className="pt-2 border-t border-zinc-800 flex items-center justify-around text-zinc-400 text-[10px]">- <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-0.5">+ {/* LinkedIn Reactions Counter */}+ <div className="flex items-center justify-between text-[10px] text-zinc-400 pt-1 border-b border-zinc-800/80 pb-2">+ <div className="flex items-center gap-1">+ <div className="flex items-center -space-x-1">+ <span className="w-4 h-4 rounded-full bg-blue-600 text-white flex items-center justify-center text-[8px]">👍</span>+ <span className="w-4 h-4 rounded-full bg-red-600 text-white flex items-center justify-center text-[8px]">❤️</span>+ <span className="w-4 h-4 rounded-full bg-amber-500 text-white flex items-center justify-center text-[8px]">💡</span>+ </div>+ <span className="ml-1">482</span>+ </div>+ <span>38 comments • 12 reposts</span>+ </div>++ {/* LinkedIn Action Bar */}+ <div className="flex items-center justify-around text-zinc-400 text-[11px] pt-0.5">+ <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-1"><FiThumbsUp className="text-xs" /><span>Like</span></div>- <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-0.5">+ <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-1"><FiMessageCircle className="text-xs" /><span>Comment</span></div>- <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-0.5">+ <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-1"><FiRepeat className="text-xs" /><span>Repost</span></div>- <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-0.5">+ <div className="flex items-center gap-1 hover:text-zinc-200 cursor-pointer py-1"><FiSend className="text-xs" /><span>Send</span></div></div></div>)}++ {/* THREADS MOCKUP */}+ {activePreviewTab === "threads" && (+ <div className="w-full max-w-[340px] mx-auto bg-zinc-950 border border-zinc-800 rounded-lg p-3.5 text-zinc-100 shadow-xl animate-fade-in">+ <div className="flex items-start gap-3">+ {/* Left Column: Avatar + Thread Connector Line */}+ <div className="flex flex-col items-center shrink-0 self-stretch">+ <div className="w-8 h-8 rounded-full bg-zinc-800 border border-zinc-700 flex items-center justify-center font-bold text-xs text-zinc-200">+ {displayAccount.charAt(0).toUpperCase()}+ </div>+ {/* Vertical thread connection line */}+ <div className="w-0.5 flex-1 bg-zinc-800 my-1.5 min-h-[36px]" />+ {/* Second mini reply avatar indicator */}+ <div className="w-4 h-4 rounded-full bg-zinc-800 border border-zinc-700 flex items-center justify-center text-[8px] text-zinc-400 font-bold">+ ++ </div>+ </div>++ {/* Right Column: Thread Content */}+ <div className="flex-1 min-w-0 space-y-2">+ {/* Author & Timestamp */}+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-1.5 truncate">+ <span className="text-xs font-bold text-zinc-100 truncate">+ {handle.replace("@", "")}+ </span>+ <span className="text-[10px] text-zinc-500">1h</span>+ </div>+ <FiMoreHorizontal className="text-zinc-500 text-xs shrink-0 cursor-pointer hover:text-zinc-300" />+ </div>++ {/* Thread Body */}+ <p className="text-xs text-zinc-200 leading-relaxed whitespace-pre-line">+ {displayTitle ? `${displayTitle}\n\n` : ""}{displayDescription}+ </p>++ {/* Tags */}+ {tags && (+ <p className="text-[11px] text-purple-400 font-mono">+ {tags.split(",").map(t => `#${t.trim()}`).join(" ")}+ </p>+ )}++ {/* Media Attachment */}+ {displayMedia && (+ <div className="rounded-md overflow-hidden border border-zinc-850 aspect-video bg-zinc-900 mt-2">+ <img+ src={displayMedia}+ alt="Threads Media"+ className="w-full h-full object-cover"+ />+ </div>+ )}++ {/* Threads Action Row */}+ <div className="flex items-center gap-4 pt-1 text-zinc-300 text-sm">+ <FiHeart className="hover:text-rose-500 transition-colors cursor-pointer" />+ <FiMessageCircle className="hover:text-zinc-100 transition-colors cursor-pointer" />+ <FiRepeat className="hover:text-emerald-400 transition-colors cursor-pointer" />+ <FiSend className="hover:text-zinc-100 transition-colors cursor-pointer" />+ </div>++ {/* Thread Replies & Likes Summary */}+ <div className="flex items-center gap-1.5 pt-0.5 text-[10px] text-zinc-500">+ <span>18 replies</span>+ <span>•</span>+ <span>142 likes</span>+ </div>+ </div>+ </div>+ </div>+ )}</div></div>);diff --git a/src/components/composer/PostComposerModal.jsx b/src/components/composer/PostComposerModal.jsxindex 849054f..c4568f7 100644--- a/src/components/composer/PostComposerModal.jsx+++ b/src/components/composer/PostComposerModal.jsx@@ -235,24 +235,29 @@ export default function PostComposerModal({return (<div className="fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 bg-black/70 backdrop-blur-sm overflow-hidden"><div- className="relative w-full max-w-5xl bg-zinc-950 border border-zinc-800 rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[88vh]"+ className="relative w-full max-w-5xl bg-zinc-950 border border-zinc-800 rounded-lg shadow-2xl overflow-hidden flex flex-col max-h-[88vh]"onClick={(e) => e.stopPropagation()}>{/* Modal Top Bar */}<div className="flex items-center justify-between px-5 py-3 border-b border-zinc-800 bg-zinc-950">- <div>- <h3 className="text-sm font-semibold text-zinc-100 tracking-tight">- {initialPost ? "Edit Scheduled Post" : "Create Post"}- </h3>- <p className="text-xs text-zinc-400">- Multi-channel scheduling with live preview- </p>+ <div className="flex items-center gap-3">+ <div className="w-8 h-8 rounded-md bg-blue-600 text-white font-black text-sm flex items-center justify-center shadow-md shadow-blue-600/30">+ P+ </div>+ <div>+ <h3 className="text-sm sm:text-base font-black text-white tracking-wide uppercase">+ {initialPost ? "EDIT SCHEDULED POST" : "COMPOSE & SCHEDULE POST"}+ </h3>+ <p className="text-xs text-zinc-400">+ Multi-channel scheduling with real-time feed preview+ </p>+ </div></div><div className="flex items-center gap-2"><buttontype="button"onClick={() => setAiWriterOpen(!aiWriterOpen)}- className={`px-3 py-1 rounded-lg text-xs font-semibold transition-all flex items-center gap-1.5 cursor-pointer border ${+ className={`px-3 py-1 rounded-md text-xs font-semibold transition-all flex items-center gap-1.5 cursor-pointer border ${aiWriterOpen? "bg-gradient-to-r from-violet-600 to-indigo-600 text-white border-violet-400/40 shadow-md shadow-violet-500/30": "bg-gradient-to-r from-violet-600/15 to-indigo-600/15 text-violet-300 border-violet-500/30 hover:border-violet-500/60 hover:text-white"@@ -285,18 +290,18 @@ export default function PostComposerModal({)}{errorMsg && (- <div className="p-2.5 bg-red-500/10 border border-red-500/20 rounded-lg text-xs text-red-400 flex items-center gap-2">+ <div className="p-2.5 bg-red-500/10 border border-red-500/20 rounded-md text-xs text-red-400 flex items-center gap-2"><FiInfo className="text-sm shrink-0" /><span>{errorMsg}</span></div>)}- {/* Channel Selector */}- <div className="space-y-1.5">- <label className="text-xs font-medium text-zinc-400 block">- Channel+ {/* 1. Channel Selector */}+ <div className="space-y-2">+ <label className="text-xs font-bold text-zinc-300 tracking-wider uppercase block">+ 1. SELECT PUBLISHING CHANNEL</label>- <div className="grid grid-cols-3 sm:grid-cols-6 gap-1.5">+ <div className="grid grid-cols-3 sm:grid-cols-6 gap-2">{PLATFORMS.map((plat) => {const Icon = plat.Icon;const isSelected = selectedPlatform === plat.key;@@ -305,7 +310,7 @@ export default function PostComposerModal({key={plat.key}type="button"onClick={() => setSelectedPlatform(plat.key)}- className={`p-1.5 px-2 rounded-lg border flex items-center justify-center gap-1.5 transition-all cursor-pointer ${+ className={`p-1.5 px-2 rounded-md border flex items-center justify-center gap-1.5 transition-all cursor-pointer ${isSelected? plat.activeStyle: "border-zinc-800/80 bg-zinc-900/40 text-zinc-400 hover:border-zinc-700 hover:text-zinc-200"@@ -321,26 +326,26 @@ export default function PostComposerModal({</div></div>- {/* Post Title */}- <div className="space-y-1">- <label className="text-xs font-medium text-zinc-400 block">- Title+ {/* 2. Post Title */}+ <div className="space-y-1.5">+ <label className="text-xs font-bold text-zinc-300 tracking-wider uppercase block">+ 2. POST TITLE / HEADLINE</label><inputtype="text"value={title}onChange={(e) => setTitle(e.target.value)}- placeholder="Post title or headline..."- className="w-full bg-zinc-900/40 border border-zinc-800 rounded-lg px-3 py-2 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors"+ placeholder="Give your post a strong, clickable title..."+ className="w-full bg-zinc-900/60 border border-zinc-800 rounded-md px-3.5 py-2 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors"/></div>- {/* Caption & Content */}- <div className="space-y-1.5">+ {/* 3. Caption & Content */}+ <div className="space-y-2"><div className="flex items-center justify-between"><div className="flex items-center gap-2">- <label className="text-xs font-medium text-zinc-400">- Caption & Details+ <label className="text-xs font-bold text-zinc-300 tracking-wider uppercase">+ 3. CAPTION & DETAILS</label>{!aiWriterOpen && (<button@@ -362,8 +367,8 @@ export default function PostComposerModal({value={description}onChange={(e) => setDescription(e.target.value)}rows={4}- placeholder="Write your caption, hook, and hashtags..."- className="w-full bg-zinc-900/40 border border-zinc-800 rounded-lg p-3 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors resize-none leading-relaxed"+ placeholder="Write your caption, hook, call to action, and hashtags..."+ className="w-full bg-zinc-900/60 border border-zinc-800 rounded-md p-3 text-xs text-zinc-100 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors resize-none leading-relaxed"/>{/* Hashtag Quick Chips */}@@ -384,14 +389,14 @@ export default function PostComposerModal({</div></div>- {/* Media Attachment */}- <div className="space-y-1.5">- <label className="text-xs font-medium text-zinc-400 block">- Media Attachment (Video / Image)+ {/* 4. Media Attachment */}+ <div className="space-y-2">+ <label className="text-xs font-bold text-zinc-300 tracking-wider uppercase block">+ 4. MEDIA ATTACHMENT (VIDEO / IMAGE)</label>{mediaUrl ? (- <div className="relative rounded-lg overflow-hidden border border-zinc-800 bg-black aspect-video max-h-44 group">+ <div className="relative rounded-md overflow-hidden border border-zinc-800 bg-black aspect-video max-h-44 group"><imgsrc={mediaUrl}alt="Media preview"@@ -411,7 +416,7 @@ export default function PostComposerModal({<div className="space-y-2"><divonClick={() => fileInputRef.current?.click()}- className="border border-dashed border-zinc-800 hover:border-zinc-700 bg-zinc-900/20 hover:bg-zinc-900/40 rounded-lg p-4 text-center cursor-pointer transition-colors flex flex-col items-center justify-center gap-1.5"+ className="border border-dashed border-zinc-800 hover:border-zinc-700 bg-zinc-900/20 hover:bg-zinc-900/40 rounded-md p-4 text-center cursor-pointer transition-colors flex flex-col items-center justify-center gap-1.5"><div className="w-8 h-8 rounded-full bg-zinc-800/80 text-zinc-400 flex items-center justify-center"><FiUploadCloud className="text-base" />@@ -440,7 +445,7 @@ export default function PostComposerModal({value={mediaUrl}onChange={(e) => setMediaUrl(e.target.value)}placeholder="Or paste media URL directly (https://...)"- className="w-full bg-zinc-900/40 border border-zinc-800 rounded-lg pl-8 pr-3 py-1.5 text-xs text-zinc-200 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors"+ className="w-full bg-zinc-900/40 border border-zinc-800 rounded-md pl-8 pr-3 py-1.5 text-xs text-zinc-200 placeholder-zinc-500 focus:outline-none focus:border-zinc-600 transition-colors"/></div></div>@@ -448,7 +453,7 @@ export default function PostComposerModal({</div>{/* Platform Specific Settings Accordion */}- <div className="border border-zinc-800 rounded-lg overflow-hidden bg-zinc-900/20">+ <div className="border border-zinc-800 rounded-md overflow-hidden bg-zinc-900/20"><buttontype="button"onClick={() => setAdvancedOpen(!advancedOpen)}@@ -546,16 +551,16 @@ export default function PostComposerModal({)}</div>- {/* Scheduling Controls */}- <div className="p-3 bg-zinc-900/30 border border-zinc-800 rounded-lg space-y-2.5">+ {/* 5. Scheduling Controls */}+ <div className="p-3.5 bg-zinc-900/40 border border-zinc-800 rounded-md space-y-2.5"><div className="flex items-center justify-between"><div className="flex items-center gap-1.5"><FiCalendar className="text-zinc-400 text-xs" />- <span className="text-xs font-medium text-zinc-300">- Schedule Publishing+ <span className="text-xs font-bold text-zinc-300 tracking-wider uppercase">+ 5. SCHEDULE & PUBLISH OPTIONS</span></div>- <div className="flex items-center bg-zinc-900 p-0.5 rounded-lg border border-zinc-800 text-xs">+ <div className="flex items-center bg-zinc-900 p-0.5 rounded-md border border-zinc-800 text-xs"><buttontype="button"onClick={() => setIsScheduled(false)}@@ -620,7 +625,7 @@ export default function PostComposerModal({<buttontype="button"onClick={onClose}- className="px-3.5 py-1.5 rounded-lg text-xs font-medium text-zinc-400 hover:text-zinc-200 hover:bg-zinc-900 transition-colors cursor-pointer"+ className="px-3.5 py-1.5 rounded-md text-xs font-bold text-zinc-400 hover:text-white hover:bg-zinc-900 transition-colors cursor-pointer">Cancel</button>@@ -630,7 +635,7 @@ export default function PostComposerModal({type="button"disabled={submitting}onClick={() => handleSubmit("draft")}- className="px-3.5 py-1.5 rounded-lg text-xs font-medium text-zinc-300 bg-zinc-900 hover:bg-zinc-800 border border-zinc-800 transition-colors cursor-pointer"+ className="px-3.5 py-1.5 rounded-md text-xs font-bold text-zinc-300 bg-zinc-900 hover:bg-zinc-800 border border-zinc-800 transition-colors cursor-pointer">Save as Draft</button>@@ -639,11 +644,11 @@ export default function PostComposerModal({type="button"disabled={submitting}onClick={() => handleSubmit()}- className="px-4 py-1.5 rounded-lg text-xs font-semibold text-white bg-gradient-to-r from-indigo-600 to-blue-600 hover:from-indigo-500 hover:to-blue-500 transition-all cursor-pointer flex items-center gap-1.5 shadow-md shadow-indigo-500/25 active:scale-95 disabled:opacity-50"+ className="px-4 py-1.5 rounded-md text-xs font-bold text-white bg-blue-600 hover:bg-blue-500 transition-all cursor-pointer flex items-center gap-2 shadow-md shadow-blue-600/30 active:scale-95 disabled:opacity-50">{submitting ? (<>- <div className="w-3 h-3 border-2 border-white border-t-transparent rounded-full animate-spin" />+ <div className="w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin" /><span>Saving...</span></>) : (diff --git a/src/lib/auth.js b/src/lib/auth.jsindex c1f46f4..8772391 100644--- a/src/lib/auth.js+++ b/src/lib/auth.js@@ -16,11 +16,11 @@ export const authOptions = {CredentialsProvider({name: "Demo / Admin Account",credentials: {- email: { label: "Email", type: "email", placeholder: "[email protected]" },+ email: { label: "Email", type: "email", placeholder: "[email protected]" },password: { label: "Password", type: "password" },},async authorize(credentials) {- const email = credentials?.email?.trim().toLowerCase() || "[email protected]";+ const email = credentials?.email?.trim().toLowerCase() || "[email protected]";const name = email.split("@")[0].toUpperCase();try {