feat: INFINITH Marketing Platform — Phase 1 MVP
Complete frontend reference implementation: - Landing page (7 sections, responsive, animated) - Marketing Intelligence Report (11 sections, VIEW Plastic Surgery demo) - Marketing Execution Plan (8 sections, branding/channel/calendar) - Content Studio wizard (channel → strategy → sound → generate) - Channel Connect page (7 platform OAuth flows) - Distribution page (YouTube publish flow) - Performance Dashboard (KPI, funnel, heatmap, trends) - PDF export (section-based, no mid-content splits) - Design system (pastel palette, filled icons, Pretendard/Playfair) - Page navigator (landing ↔ report ↔ plan) - Asset upload (drag & drop, image/video/text) Docs: PRD v2.0, DESIGN_SYSTEM.md, API_CONNECTORS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
bbb7a0de60
90 files changed
+16754
No files matched your search
@@ -0,0 +1,192 @@
|
||||
import { useState } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube } from 'lucide-react';
|
||||
import { SectionWrapper } from '../report/ui/SectionWrapper';
|
||||
import type { AssetCollectionData, AssetSource, AssetStatus, AssetType } from '../../types/plan';
|
||||
|
||||
interface AssetCollectionProps {
|
||||
data: AssetCollectionData;
|
||||
}
|
||||
|
||||
const filterTabs = [
|
||||
{ key: 'all', label: '전체' },
|
||||
{ key: 'homepage', label: '홈페이지' },
|
||||
{ key: 'naver_place', label: '네이버' },
|
||||
{ key: 'blog', label: '블로그' },
|
||||
{ key: 'social', label: '소셜미디어' },
|
||||
{ key: 'youtube', label: 'YouTube' },
|
||||
] as const;
|
||||
|
||||
type FilterKey = (typeof filterTabs)[number]['key'];
|
||||
|
||||
const sourceBadgeColors: Record<AssetSource, string> = {
|
||||
homepage: 'bg-slate-100 text-slate-700',
|
||||
naver_place: 'bg-[#F3F0FF] text-[#4A3A7C]',
|
||||
blog: 'bg-[#EFF0FF] text-[#3A3F7C]',
|
||||
social: 'bg-pink-100 text-pink-700',
|
||||
youtube: 'bg-[#FFF0F0] text-[#7C3A4B]',
|
||||
};
|
||||
|
||||
const typeBadgeColors: Record<AssetType, string> = {
|
||||
photo: 'bg-indigo-50 text-indigo-700',
|
||||
video: 'bg-purple-50 text-purple-700',
|
||||
text: 'bg-[#FFF6ED] text-[#7C5C3A]',
|
||||
};
|
||||
|
||||
const statusConfig: Record<AssetStatus, { className: string; label: string }> = {
|
||||
collected: { className: 'bg-[#F3F0FF] text-[#4A3A7C]', label: '수집완료' },
|
||||
pending: { className: 'bg-[#FFF6ED] text-[#7C5C3A]', label: '수집 대기' },
|
||||
needs_creation: { className: 'bg-[#FFF0F0] text-[#7C3A4B]', label: '제작 필요' },
|
||||
};
|
||||
|
||||
function formatViews(views: number): string {
|
||||
if (views >= 1_000_000) return `${(views / 1_000_000).toFixed(1)}M`;
|
||||
if (views >= 1_000) return `${Math.round(views / 1_000)}K`;
|
||||
return String(views);
|
||||
}
|
||||
|
||||
export default function AssetCollection({ data }: AssetCollectionProps) {
|
||||
const [activeFilter, setActiveFilter] = useState<FilterKey>('all');
|
||||
|
||||
const filteredAssets =
|
||||
activeFilter === 'all'
|
||||
? data.assets
|
||||
: data.assets.filter((a) => a.source === activeFilter);
|
||||
|
||||
return (
|
||||
<SectionWrapper
|
||||
id="asset-collection"
|
||||
title="Asset Collection"
|
||||
subtitle="에셋 수집 & 리퍼포징 소스"
|
||||
>
|
||||
{/* Source Filter Tabs */}
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{filterTabs.map((tab) => (
|
||||
<button
|
||||
key={tab.key}
|
||||
onClick={() => setActiveFilter(tab.key)}
|
||||
className={`rounded-full px-4 py-2 text-sm font-medium transition-all ${
|
||||
activeFilter === tab.key
|
||||
? 'bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white shadow-lg'
|
||||
: 'bg-white border border-slate-200 text-slate-600 hover:bg-slate-50'
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Asset Cards Grid */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-12">
|
||||
{filteredAssets.map((asset, i) => {
|
||||
const statusInfo = statusConfig[asset.status];
|
||||
return (
|
||||
<motion.div
|
||||
key={asset.id}
|
||||
className="rounded-2xl border border-slate-100 bg-white shadow-sm p-5"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.05 }}
|
||||
>
|
||||
{/* Top badges row */}
|
||||
<div className="flex items-center gap-2 mb-3 flex-wrap">
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${sourceBadgeColors[asset.source]}`}
|
||||
>
|
||||
{asset.sourceLabel}
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${typeBadgeColors[asset.type]}`}
|
||||
>
|
||||
{asset.type}
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ml-auto ${statusInfo.className}`}
|
||||
>
|
||||
{statusInfo.label}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Title & Description */}
|
||||
<h4 className="font-semibold text-[#0A1128] mb-1">{asset.title}</h4>
|
||||
<p className="text-sm text-slate-600 mb-3">{asset.description}</p>
|
||||
|
||||
{/* Repurposing suggestions */}
|
||||
{asset.repurposingSuggestions.length > 0 && (
|
||||
<div>
|
||||
<p className="text-xs font-semibold text-slate-500 uppercase mb-2">
|
||||
Repurposing →
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{asset.repurposingSuggestions.map((suggestion, j) => (
|
||||
<span
|
||||
key={j}
|
||||
className="rounded-full bg-purple-50 text-purple-700 text-xs px-2 py-1"
|
||||
>
|
||||
{suggestion}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{/* YouTube Repurpose Section */}
|
||||
{data.youtubeRepurpose.length > 0 && (
|
||||
<div>
|
||||
<h3 className="font-serif text-2xl font-bold text-[#0A1128] mb-4">
|
||||
YouTube Top Videos for Repurposing
|
||||
</h3>
|
||||
<div className="flex overflow-x-auto gap-4 pb-4 scrollbar-hide" style={{ scrollbarWidth: 'none' }}>
|
||||
{data.youtubeRepurpose.map((video, i) => (
|
||||
<motion.div
|
||||
key={video.title}
|
||||
className="min-w-[280px] rounded-2xl border border-slate-100 bg-white shadow-sm p-5 shrink-0"
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.1 }}
|
||||
>
|
||||
<div className="flex items-start gap-2 mb-3">
|
||||
<Youtube size={18} className="text-[#D4889A] shrink-0 mt-1" />
|
||||
<h4 className="font-semibold text-sm text-[#0A1128]">{video.title}</h4>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<span className="rounded-full bg-slate-100 text-slate-700 px-3 py-1 text-xs font-medium">
|
||||
{formatViews(video.views)} views
|
||||
</span>
|
||||
<span
|
||||
className={`rounded-full px-3 py-1 text-xs font-medium ${
|
||||
video.type === 'Short'
|
||||
? 'bg-purple-50 text-purple-700'
|
||||
: 'bg-[#EFF0FF] text-[#3A3F7C]'
|
||||
}`}
|
||||
>
|
||||
{video.type}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs font-semibold text-slate-500 uppercase mb-2">
|
||||
Repurpose As:
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{video.repurposeAs.map((suggestion, j) => (
|
||||
<span
|
||||
key={j}
|
||||
className="rounded-full bg-purple-50 text-purple-700 text-xs px-2 py-1"
|
||||
>
|
||||
{suggestion}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user