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,177 @@
|
||||
import { motion } from 'motion/react';
|
||||
import { Youtube, Users, Video, Eye, TrendingUp, ExternalLink } from 'lucide-react';
|
||||
import { SectionWrapper } from './ui/SectionWrapper';
|
||||
import { MetricCard } from './ui/MetricCard';
|
||||
import { DiagnosisRow } from './ui/DiagnosisRow';
|
||||
import type { YouTubeAudit as YouTubeAuditType } from '../../types/report';
|
||||
|
||||
interface YouTubeAuditProps {
|
||||
data: YouTubeAuditType;
|
||||
}
|
||||
|
||||
function formatNumber(n: number): string {
|
||||
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(2)}M`;
|
||||
if (n >= 1_000) return `${(n / 1_000).toFixed(0)}K`;
|
||||
return n.toLocaleString();
|
||||
}
|
||||
|
||||
export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
||||
return (
|
||||
<SectionWrapper id="youtube-audit" title="YouTube Analysis" subtitle="유튜브 채널 분석">
|
||||
{/* Metrics row */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
|
||||
<MetricCard
|
||||
label="구독자"
|
||||
value={formatNumber(data.subscribers)}
|
||||
icon={<Users size={20} />}
|
||||
subtext={data.subscriberRank}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 영상 수"
|
||||
value={formatNumber(data.totalVideos)}
|
||||
icon={<Video size={20} />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 조회수"
|
||||
value={formatNumber(data.totalViews)}
|
||||
icon={<Eye size={20} />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="주간 성장"
|
||||
value={`+${formatNumber(data.weeklyViewGrowth.absolute)}`}
|
||||
icon={<TrendingUp size={20} />}
|
||||
subtext={`${data.weeklyViewGrowth.percentage > 0 ? '+' : ''}${data.weeklyViewGrowth.percentage}%`}
|
||||
trend={data.weeklyViewGrowth.percentage > 0 ? 'up' : data.weeklyViewGrowth.percentage < 0 ? 'down' : 'neutral'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Channel info card */}
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6 mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-[#FFF0F0] flex items-center justify-center">
|
||||
<Youtube size={20} className="text-[#D4889A]" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-bold text-[#0A1128]">{data.channelName}</p>
|
||||
<p className="text-sm text-slate-500">{data.handle}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-sm text-slate-600 mb-4">{data.channelDescription}</p>
|
||||
<div className="flex flex-wrap gap-3 text-sm text-slate-500">
|
||||
<span>개설일: {data.channelCreatedDate}</span>
|
||||
<span>평균 영상 길이: {data.avgVideoLength}</span>
|
||||
<span>업로드 빈도: {data.uploadFrequency}</span>
|
||||
</div>
|
||||
|
||||
{/* Linked URLs */}
|
||||
{data.linkedUrls.length > 0 && (
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
{data.linkedUrls.map((link) => (
|
||||
<a
|
||||
key={link.url}
|
||||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 text-xs text-[#6C5CE7] hover:underline"
|
||||
>
|
||||
<ExternalLink size={12} />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
|
||||
{/* Playlists */}
|
||||
{data.playlists.length > 0 && (
|
||||
<motion.div
|
||||
className="mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.25 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-3">재생목록</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{data.playlists.map((pl) => (
|
||||
<span
|
||||
key={pl}
|
||||
className="rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 text-sm font-medium text-slate-700"
|
||||
>
|
||||
{pl}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Top Videos */}
|
||||
{data.topVideos.length > 0 && (
|
||||
<motion.div
|
||||
className="mb-8"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-4">인기 영상 TOP {data.topVideos.length}</p>
|
||||
<div className="flex gap-4 overflow-x-auto pb-4 scrollbar-thin scrollbar-thumb-slate-200">
|
||||
{data.topVideos.map((video, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="rounded-xl bg-white border border-slate-100 shadow-sm p-4 min-w-[250px] shrink-0"
|
||||
initial={{ opacity: 0, x: 20 }}
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.4, delay: i * 0.05 }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<span
|
||||
className={`text-xs font-medium px-2 py-1 rounded-full ${
|
||||
video.type === 'Short'
|
||||
? 'bg-purple-50 text-purple-700'
|
||||
: 'bg-[#EFF0FF] text-[#3A3F7C]'
|
||||
}`}
|
||||
>
|
||||
{video.type}
|
||||
</span>
|
||||
<span className="text-xs text-slate-400">{video.uploadedAgo}</span>
|
||||
</div>
|
||||
<p className="text-sm font-medium text-[#0A1128] line-clamp-2 mb-2">
|
||||
{video.title}
|
||||
</p>
|
||||
<div className="flex items-center gap-1 text-sm text-slate-600">
|
||||
<Eye size={14} className="text-slate-400" />
|
||||
<span className="font-semibold">{formatNumber(video.views)}</span>
|
||||
<span className="text-slate-400">views</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Diagnosis */}
|
||||
{data.diagnosis.length > 0 && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, delay: 0.35 }}
|
||||
>
|
||||
<p className="text-sm font-semibold text-slate-700 mb-4">진단 결과</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow key={i} category={item.category} detail={item.detail} severity={item.severity} evidenceIds={item.evidenceIds} />
|
||||
))}
|
||||
</motion.div>
|
||||
)}
|
||||
</SectionWrapper>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user