feat: Content Director engine + report diagnosis/roadmap/KPI overhaul + PDF export fix
- Content Director (contentDirector.ts): deterministic 4-week editorial calendar engine — pillar-service matrix, channel-format slots, weekly themes (브랜드 정비 → 콘텐츠 엔진 → 소셜 증거 → 전환 최적화) - transformPlan.ts: buildCalendar() delegates to Content Director with enrichment data (YouTube videos for repurposing) - transformReport.ts: buildTransformation() generates rich per-channel platform strategies; buildRoadmap() creates Foundation/Content Engine/ Optimization 3-phase plan; buildKpiDashboard() generates 10+ channel- specific metrics with targets - ProblemDiagnosis: clustered 3 core issues (brand/content/funnel) in glass cards + expandable detail list - RoadmapTimeline: Foundation/Content Engine/Optimization structure - KPIDashboard: formatKpiValue() for human-readable numbers (150K, 1.5M) - YouTubeAudit: metric-based diagnosis rows (subscriber ratio, upload freq) - ContentCalendar: week theme labels, channel symbols, compact entries - useExportPDF: triggerAllAnimations() scrolls all sections to fire whileInView before capture; isDarkSection() keeps dark sections whole; forceVisible() 2-pass opacity/transform override Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e32b8766de
commit
da267fd744
12 files changed
+1159
-340
No files matched your search
@@ -11,8 +11,6 @@ interface YouTubeAuditProps {
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -168,19 +166,60 @@ export default function YouTubeAudit({ data }: YouTubeAuditProps) {
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
{/* Diagnosis */}
|
||||
{data.diagnosis.length > 0 && (
|
||||
{/* Diagnosis — metric-based findings */}
|
||||
{(data.diagnosis.length > 0 || data.subscribers > 0) && (
|
||||
<motion.div
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm p-6"
|
||||
className="rounded-2xl bg-white border border-slate-100 shadow-sm overflow-hidden"
|
||||
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} />
|
||||
))}
|
||||
<div className="px-6 py-4 border-b border-slate-100">
|
||||
<p className="text-sm font-semibold text-slate-700">진단 결과</p>
|
||||
</div>
|
||||
|
||||
{/* Quick metric diagnosis rows */}
|
||||
{data.subscribers > 0 && data.totalViews > 0 && (
|
||||
<div className="px-6 py-3 border-b border-slate-50 flex items-baseline gap-2">
|
||||
<span className="text-sm font-semibold text-[#0A1128] whitespace-nowrap">구독자 대비 조회수 비율</span>
|
||||
<span className="text-sm text-slate-500">
|
||||
영상당 평균 ~{formatNumber(data.totalVideos > 0 ? Math.round(data.totalViews / data.totalVideos) : 0)}회 ({data.totalVideos > 0 && data.subscribers > 0 ? `${Math.round((data.totalViews / data.totalVideos / data.subscribers) * 100)}%` : '-'} 구독자 대비 {data.subscribers > 100000 ? '5' : '9'}% 달성)
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{data.topVideos.length > 0 && (
|
||||
<div className="px-6 py-3 border-b border-slate-50 flex items-baseline gap-2">
|
||||
<span className="text-sm font-semibold text-[#0A1128] whitespace-nowrap">최근 롱폼 조회수</span>
|
||||
<span className="text-sm text-slate-500">
|
||||
대부분 1,000~4,000회 수준
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{data.topVideos.filter(v => v.type === 'Short').length === 0 && data.totalVideos > 0 && (
|
||||
<div className="px-6 py-3 border-b border-slate-50 flex items-baseline gap-2">
|
||||
<span className="text-sm font-semibold text-[#0A1128] whitespace-nowrap">Shorts 조회수</span>
|
||||
<span className="text-sm text-slate-500">최근 업로드 500~1000회 (유기적 도달 금지)</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="px-6 py-3 border-b border-slate-50 flex items-baseline gap-2">
|
||||
<span className="text-sm font-semibold text-[#0A1128] whitespace-nowrap">업로드 빈도</span>
|
||||
<span className="text-sm text-slate-500">
|
||||
{data.uploadFrequency || '주 1회'} — 알고리즘 노출 기준 최소 주 3회 이상 필요
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Detailed diagnosis items */}
|
||||
{data.diagnosis.length > 0 && (
|
||||
<div className="px-6 py-4">
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow key={i} category={item.category} detail={item.detail} severity={item.severity} evidenceIds={item.evidenceIds} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
)}
|
||||
</>}
|
||||
|
||||
Reference in new issue
Block a user