import React, { useMemo } from 'react'; import { ArrowLeft, Sparkles, MapPin, Target, Zap, LayoutGrid, Users, Crown, TrendingUp } from 'lucide-react'; import { LALA_CABIN_DATA } from './constants'; import { GeometricChart } from './components/GeometricChart'; import { KeywordBubble } from './components/KeywordBubble'; import { BrandData, USP } from './types'; // Logic to calculate scores based on ICP (Ideal Customer Profile) signals const calculateDynamicScores = (data: BrandData): USP[] => { // 1. Extract Demand Signals from Targets (Needs + Triggers) const marketSignals = data.targets.flatMap(t => [...t.needs, ...t.triggers]).map(s => s.replace(/\s+/g, '')); // High value keywords that represent the "Core Value" of this specific property type const coreKeywords = ['프라이빗', '감성', '독채', '캐빈', '조명', '불멍', 'Private', 'Mood']; return data.usps.map(usp => { let calculatedScore = 65; // Base score const contentStr = (usp.label + usp.subLabel + usp.description).replace(/\s+/g, ''); // 2. Cross-reference USP with Market Signals marketSignals.forEach(signal => { if (contentStr.includes(signal)) calculatedScore += 4; }); // 3. Boost based on Core Keywords (Weighted Importance) coreKeywords.forEach(keyword => { if (contentStr.includes(keyword)) calculatedScore += 6; }); // 4. Special Boost based on specific Marketing Pillars (checking English SubLabels) if (usp.subLabel === 'CONCEPT') calculatedScore += 10; if (usp.subLabel === 'PRIVACY') calculatedScore += 8; if (usp.subLabel === 'NIGHT MOOD') calculatedScore += 8; if (usp.subLabel === 'PHOTO SPOT') calculatedScore += 5; return { ...usp, score: Math.min(Math.round(calculatedScore), 99) // Cap at 99 }; }); }; export default function App() { const rawData = LALA_CABIN_DATA; // Calculate scores on mount (or when data changes) const scoredUSPs = useMemo(() => calculateDynamicScores(rawData), [rawData]); // Find the top selling point const topUSP = useMemo(() => [...scoredUSPs].sort((a, b) => b.score - a.score)[0], [scoredUSPs]); return (
AI 데이터 분석을 통해 도출된 라라캐빈의 핵심 전략입니다.
{rawData.address}
{rawData.subAddress}
{rawData.locationAnalysis}
{rawData.conceptAnalysis}
Trigger: {target.triggers.join(', ')}