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,20 @@
|
||||
interface ComparisonRowProps {
|
||||
key?: string | number;
|
||||
area: string;
|
||||
asIs: string;
|
||||
toBe: string;
|
||||
}
|
||||
|
||||
export function ComparisonRow({ area, asIs, toBe }: ComparisonRowProps) {
|
||||
return (
|
||||
<div className="grid grid-cols-[120px_1fr_1fr] gap-3 items-start py-4 border-b border-slate-100 last:border-0">
|
||||
<span className="font-medium text-sm text-slate-700 pt-3">{area}</span>
|
||||
<div className="bg-[#FFF0F0]/50 rounded-lg p-3 text-sm text-slate-600">
|
||||
{asIs}
|
||||
</div>
|
||||
<div className="bg-[#F3F0FF]/50 rounded-lg p-3 text-sm text-slate-700 font-medium">
|
||||
{toBe}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Severity } from '../../../types/report';
|
||||
import { SeverityBadge } from './SeverityBadge';
|
||||
import { EvidenceGallery } from './EvidenceGallery';
|
||||
|
||||
interface DiagnosisRowProps {
|
||||
key?: string | number;
|
||||
category: string;
|
||||
detail: string;
|
||||
severity: Severity;
|
||||
evidenceIds?: string[];
|
||||
}
|
||||
|
||||
export function DiagnosisRow({ category, detail, severity, evidenceIds }: DiagnosisRowProps) {
|
||||
return (
|
||||
<div className="py-4 border-b border-slate-100 last:border-0">
|
||||
<div className="flex items-center gap-4">
|
||||
<span className="font-bold text-sm text-[#0A1128] shrink-0 w-28">
|
||||
{category}
|
||||
</span>
|
||||
<p className="flex-1 text-sm text-slate-600">{detail}</p>
|
||||
<div className="shrink-0">
|
||||
<SeverityBadge severity={severity} />
|
||||
</div>
|
||||
</div>
|
||||
<EvidenceGallery evidenceIds={evidenceIds} compact />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { useScreenshots } from '../../../contexts/ScreenshotContext';
|
||||
import { EvidenceScreenshot } from './EvidenceScreenshot';
|
||||
|
||||
interface EvidenceGalleryProps {
|
||||
evidenceIds?: string[];
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function EvidenceGallery({ evidenceIds, compact }: EvidenceGalleryProps) {
|
||||
const { getByIds } = useScreenshots();
|
||||
|
||||
if (!evidenceIds?.length) return null;
|
||||
|
||||
const items = getByIds(evidenceIds);
|
||||
if (!items.length) return null;
|
||||
|
||||
if (items.length === 1) {
|
||||
return (
|
||||
<div className="mt-3">
|
||||
<EvidenceScreenshot evidence={items[0]} compact={compact} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mt-3 flex gap-3 overflow-x-auto pb-2" style={{ scrollbarWidth: 'thin' }}>
|
||||
{items.map((item) => (
|
||||
<div key={item.id} className="shrink-0 w-[200px]">
|
||||
<EvidenceScreenshot evidence={item} compact />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import { useEffect, useCallback } from 'react';
|
||||
import { motion, AnimatePresence } from 'motion/react';
|
||||
import type { ScreenshotEvidence } from '../../../types/report';
|
||||
|
||||
interface EvidenceLightboxProps {
|
||||
evidence: ScreenshotEvidence | null;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export function EvidenceLightbox({ evidence, onClose }: EvidenceLightboxProps) {
|
||||
const handleKeyDown = useCallback(
|
||||
(e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') onClose();
|
||||
},
|
||||
[onClose],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (evidence) {
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
return () => {
|
||||
document.removeEventListener('keydown', handleKeyDown);
|
||||
document.body.style.overflow = '';
|
||||
};
|
||||
}, [evidence, handleKeyDown]);
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{evidence && (
|
||||
<motion.div
|
||||
data-no-print
|
||||
className="fixed inset-0 z-50 flex items-center justify-center p-6"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
>
|
||||
{/* Backdrop */}
|
||||
<div
|
||||
className="absolute inset-0 bg-black/60 backdrop-blur-sm"
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
{/* Content */}
|
||||
<motion.div
|
||||
className="relative max-w-5xl w-full max-h-[90vh] flex flex-col"
|
||||
initial={{ scale: 0.95, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
exit={{ scale: 0.95, opacity: 0 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
>
|
||||
{/* Close button */}
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute -top-3 -right-3 z-10 w-8 h-8 rounded-full bg-white shadow-md flex items-center justify-center hover:bg-slate-50 transition-colors"
|
||||
>
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M2 2L12 12M12 2L2 12" stroke="#0A1128" strokeWidth="2" strokeLinecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{/* Image container with annotations */}
|
||||
<div className="relative rounded-2xl overflow-hidden bg-white shadow-2xl">
|
||||
<img
|
||||
src={evidence.url}
|
||||
alt={evidence.caption}
|
||||
className="w-full h-auto max-h-[70vh] object-contain"
|
||||
/>
|
||||
|
||||
{/* Annotation overlays */}
|
||||
{evidence.annotations?.map((ann, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="absolute border-2 border-[#C084CF] rounded-lg pointer-events-none"
|
||||
style={{
|
||||
left: `${ann.x}%`,
|
||||
top: `${ann.y}%`,
|
||||
width: ann.width ? `${ann.width}%` : 'auto',
|
||||
height: ann.height ? `${ann.height}%` : 'auto',
|
||||
}}
|
||||
>
|
||||
{ann.label && (
|
||||
<span className="absolute -top-6 left-0 text-xs bg-[#C084CF] text-white px-2 py-1 rounded font-medium whitespace-nowrap">
|
||||
{ann.label}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Caption */}
|
||||
<div className="mt-3 bg-white rounded-xl px-4 py-3 shadow-sm">
|
||||
<p className="text-sm text-[#0A1128] font-medium">{evidence.caption}</p>
|
||||
{evidence.sourceUrl && (
|
||||
<p className="text-xs text-slate-400 mt-1">{evidence.sourceUrl}</p>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useState } from 'react';
|
||||
import type { ScreenshotEvidence } from '../../../types/report';
|
||||
import { EvidenceLightbox } from './EvidenceLightbox';
|
||||
|
||||
interface EvidenceScreenshotProps {
|
||||
evidence: ScreenshotEvidence;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function EvidenceScreenshot({ evidence, compact }: EvidenceScreenshotProps) {
|
||||
const [loaded, setLoaded] = useState(true);
|
||||
const [lightboxOpen, setLightboxOpen] = useState(false);
|
||||
|
||||
if (!loaded) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setLightboxOpen(true)}
|
||||
className={`group relative rounded-xl overflow-hidden border border-slate-100 bg-white shadow-[3px_4px_12px_rgba(0,0,0,0.06)] hover:shadow-[4px_6px_16px_rgba(0,0,0,0.09)] transition-all cursor-pointer ${
|
||||
compact ? 'w-full' : 'w-full max-w-[400px]'
|
||||
}`}
|
||||
>
|
||||
<div className="relative">
|
||||
<img
|
||||
src={evidence.url}
|
||||
alt={evidence.caption}
|
||||
className={`w-full object-cover ${compact ? 'h-24' : 'h-48'}`}
|
||||
onError={() => setLoaded(false)}
|
||||
/>
|
||||
|
||||
{/* Hover overlay */}
|
||||
<div className="absolute inset-0 bg-[#0A1128]/0 group-hover:bg-[#0A1128]/10 transition-colors flex items-center justify-center">
|
||||
<div className="w-8 h-8 rounded-full bg-white/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M15 3H21V9M21 3L13 11M10 5H5C3.9 5 3 5.9 3 7V19C3 20.1 3.9 21 5 21H17C18.1 21 19 20.1 19 19V14" stroke="#6C5CE7" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Channel badge */}
|
||||
<span className="absolute top-2 left-2 rounded-full bg-white/90 backdrop-blur-sm px-2 py-1 text-xs font-medium text-[#4A3A7C] shadow-sm">
|
||||
{evidence.channel}
|
||||
</span>
|
||||
|
||||
{/* Annotation indicators */}
|
||||
{evidence.annotations?.map((ann, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="absolute border-2 border-[#C084CF]/60 rounded-lg pointer-events-none"
|
||||
style={{
|
||||
left: `${ann.x}%`,
|
||||
top: `${ann.y}%`,
|
||||
width: ann.width ? `${ann.width}%` : 'auto',
|
||||
height: ann.height ? `${ann.height}%` : 'auto',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Caption */}
|
||||
{!compact && (
|
||||
<div className="px-3 py-2">
|
||||
<p className="text-xs text-slate-600 leading-relaxed line-clamp-2">
|
||||
{evidence.caption}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
|
||||
<EvidenceLightbox
|
||||
evidence={lightboxOpen ? evidence : null}
|
||||
onClose={() => setLightboxOpen(false)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { ArrowUp, ArrowDown, Minus } from 'lucide-react';
|
||||
|
||||
interface MetricCardProps {
|
||||
key?: string | number;
|
||||
label: string;
|
||||
value: string | number;
|
||||
subtext?: string;
|
||||
icon?: ReactNode;
|
||||
trend?: 'up' | 'down' | 'neutral';
|
||||
}
|
||||
|
||||
const trendConfig = {
|
||||
up: { icon: ArrowUp, color: 'text-emerald-500' },
|
||||
down: { icon: ArrowDown, color: 'text-red-500' },
|
||||
neutral: { icon: Minus, color: 'text-slate-400' },
|
||||
};
|
||||
|
||||
export function MetricCard({ label, value, subtext, icon, trend }: MetricCardProps) {
|
||||
return (
|
||||
<div className="rounded-2xl border border-slate-100 shadow-sm bg-white p-5 relative">
|
||||
{icon && (
|
||||
<div className="absolute top-4 right-4 text-slate-300">
|
||||
{icon}
|
||||
</div>
|
||||
)}
|
||||
<p className="text-sm text-slate-500 mb-1">{label}</p>
|
||||
<div className="flex items-end gap-2">
|
||||
<span className="text-3xl font-bold text-[#0A1128]">{value}</span>
|
||||
{trend && (
|
||||
<span className={`${trendConfig[trend].color} mb-1`}>
|
||||
{(() => {
|
||||
const TrendIcon = trendConfig[trend].icon;
|
||||
return <TrendIcon size={18} />;
|
||||
})()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{subtext && (
|
||||
<p className="text-xs text-slate-400 mt-1">{subtext}</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
interface ScoreRingProps {
|
||||
score: number;
|
||||
maxScore?: number;
|
||||
size?: number;
|
||||
label?: string;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
function getScoreColor(score: number, maxScore: number): string {
|
||||
const pct = (score / maxScore) * 100;
|
||||
if (pct <= 40) return '#C084CF'; // soft violet — critical
|
||||
if (pct <= 60) return '#8B9CF7'; // periwinkle blue — caution
|
||||
if (pct <= 80) return '#7C6DD8'; // medium purple — good
|
||||
return '#6C5CE7'; // Infinith primary purple — excellent
|
||||
}
|
||||
|
||||
export function ScoreRing({
|
||||
score,
|
||||
maxScore = 100,
|
||||
size = 120,
|
||||
label,
|
||||
color,
|
||||
}: ScoreRingProps) {
|
||||
const strokeWidth = 8;
|
||||
const radius = (size - strokeWidth) / 2;
|
||||
const circumference = 2 * Math.PI * radius;
|
||||
const progress = Math.min(score / maxScore, 1);
|
||||
const strokeDashoffset = circumference * (1 - progress);
|
||||
const resolvedColor = color ?? getScoreColor(score, maxScore);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<div className="relative" style={{ width: size, height: size }}>
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox={`0 0 ${size} ${size}`}
|
||||
className="-rotate-90"
|
||||
>
|
||||
<circle
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
r={radius}
|
||||
fill="none"
|
||||
stroke="#f1f5f9"
|
||||
strokeWidth={strokeWidth}
|
||||
/>
|
||||
<motion.circle
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
r={radius}
|
||||
fill="none"
|
||||
stroke={resolvedColor}
|
||||
strokeWidth={strokeWidth}
|
||||
strokeLinecap="round"
|
||||
strokeDasharray={circumference}
|
||||
initial={{ strokeDashoffset: circumference }}
|
||||
animate={{ strokeDashoffset }}
|
||||
transition={{ duration: 1, ease: 'easeOut' }}
|
||||
/>
|
||||
</svg>
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<span className="text-2xl font-bold text-[#0A1128]">{score}</span>
|
||||
</div>
|
||||
</div>
|
||||
{label && (
|
||||
<span className="text-sm text-slate-500 text-center">{label}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { motion } from 'motion/react';
|
||||
|
||||
interface SectionWrapperProps {
|
||||
id: string;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
children: ReactNode;
|
||||
dark?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function SectionWrapper({
|
||||
id,
|
||||
title,
|
||||
subtitle,
|
||||
children,
|
||||
dark = false,
|
||||
className = '',
|
||||
}: SectionWrapperProps) {
|
||||
return (
|
||||
<motion.section
|
||||
id={id}
|
||||
initial={{ opacity: 0, y: 40 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6, ease: 'easeOut' }}
|
||||
className={`
|
||||
${dark
|
||||
? 'bg-[#0A1128] text-white relative overflow-hidden'
|
||||
: 'bg-white'
|
||||
}
|
||||
py-16 md:py-20 px-6
|
||||
${className}
|
||||
`}
|
||||
>
|
||||
{dark && (
|
||||
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(108,92,231,0.15),transparent_60%)]" />
|
||||
)}
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="mb-10">
|
||||
<h2
|
||||
className={`
|
||||
font-serif font-bold text-3xl md:text-4xl mb-3
|
||||
${dark
|
||||
? 'bg-gradient-to-r from-purple-300 to-blue-300 bg-clip-text text-transparent'
|
||||
: 'text-gradient'
|
||||
}
|
||||
`}
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
{subtitle && (
|
||||
<p
|
||||
className={`text-lg ${dark ? 'text-purple-200' : 'text-slate-600'}`}
|
||||
>
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
{children}
|
||||
</div>
|
||||
</motion.section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
type SeverityLevel = 'critical' | 'warning' | 'good' | 'excellent' | 'unknown';
|
||||
|
||||
interface SeverityBadgeProps {
|
||||
severity: SeverityLevel;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
const config: Record<SeverityLevel, { className: string; defaultLabel: string }> = {
|
||||
critical: {
|
||||
className: 'bg-[#FFF0F0] text-[#7C3A4B] border-[#F5D5DC]',
|
||||
defaultLabel: '심각',
|
||||
},
|
||||
warning: {
|
||||
className: 'bg-[#FFF6ED] text-[#7C5C3A] border-[#F5E0C5]',
|
||||
defaultLabel: '주의',
|
||||
},
|
||||
good: {
|
||||
className: 'bg-[#F3F0FF] text-[#4A3A7C] border-[#D5CDF5]',
|
||||
defaultLabel: '양호',
|
||||
},
|
||||
excellent: {
|
||||
className: 'bg-[#EFF0FF] text-[#3A3F7C] border-[#C5CBF5]',
|
||||
defaultLabel: '우수',
|
||||
},
|
||||
unknown: {
|
||||
className: 'bg-slate-50 text-slate-700 border-slate-200',
|
||||
defaultLabel: '미확인',
|
||||
},
|
||||
};
|
||||
|
||||
export function SeverityBadge({ severity, label }: SeverityBadgeProps) {
|
||||
const { className, defaultLabel } = config[severity];
|
||||
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center rounded-full text-xs font-medium px-3 py-1 border ${className}`}
|
||||
>
|
||||
{label ?? defaultLabel}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user