diff --git a/client/src/components/DECard.tsx b/client/src/components/DECard.tsx new file mode 100644 index 0000000..fc724da --- /dev/null +++ b/client/src/components/DECard.tsx @@ -0,0 +1,167 @@ +import { motion, useMotionValue, useTransform, PanInfo } from 'framer-motion'; +import { Monitor, Zap, Settings, Feather } from 'lucide-react'; + +interface DECardProps { + de: { + id: string; + name: string; + description: string; + style: string; + resourceUsage: string; + customization: string; + colorPalette: string[]; + }; + onSwipe: (direction: 'left' | 'right' | 'super') => void; + isTop: boolean; +} + +const styleIcons: Record = { + 'modern': Settings, + 'minimalist': Feather, + 'traditional': Monitor, + 'minimal': Feather, + 'mac-like': Monitor, + 'beautiful': Zap, + 'minimal-tiling': Settings, +}; + +const styleLabels: Record = { + 'modern': 'Modern', + 'minimalist': 'Minimalist', + 'traditional': 'Geleneksel', + 'minimal': 'Minimal', + 'mac-like': 'Mac Benzeri', + 'beautiful': 'Gösterişli', + 'minimal-tiling': 'Tiling WM', +}; + +const resourceLabels: Record = { + 'very-low': 'Çok Hafif', + 'low': 'Hafif', + 'low-medium': 'Hafif-Orta', + 'medium': 'Orta', + 'medium-high': 'Orta-Ağır', + 'high': 'Ağır', +}; + +export default function DECard({ de, onSwipe, isTop }: DECardProps) { + const x = useMotionValue(0); + const rotate = useTransform(x, [-300, 0, 300], [-15, 0, 15]); + const opacity = useTransform(x, [-300, -100, 0, 100, 300], [0.5, 1, 1, 1, 0.5]); + + const likeOpacity = useTransform(x, [0, 100, 200], [0, 0.5, 1]); + const dislikeOpacity = useTransform(x, [-200, -100, 0], [1, 0.5, 0]); + + const handleDragEnd = (_: any, info: PanInfo) => { + const threshold = 100; + if (info.offset.x > threshold) { + onSwipe('right'); + } else if (info.offset.x < -threshold) { + onSwipe('left'); + } + }; + + const StyleIcon = styleIcons[de.style] || Monitor; + const primaryColor = de.colorPalette[0]; + const secondaryColor = de.colorPalette[1]; + + return ( + +
+
+
+ + + SEVDİM + + + + GEÇ + + +
+
+ +
+ +

+ {de.name} +

+ +

+ {de.description} +

+ +
+ + {styleLabels[de.style] || de.style} + + + {resourceLabels[de.resourceUsage] || de.resourceUsage} + + + Özelleştirme: {de.customization} + +
+
+
+ + ); +} diff --git a/client/src/components/DistroMatch.tsx b/client/src/components/DistroMatch.tsx new file mode 100644 index 0000000..de4f051 --- /dev/null +++ b/client/src/components/DistroMatch.tsx @@ -0,0 +1,311 @@ +import { useState, useCallback, useEffect } from 'react'; +import { AnimatePresence, motion } from 'framer-motion'; +import DECard from './DECard'; +import QuestionCard from './QuestionCard'; +import ActionButtons from './ActionButtons'; +import ResultsScreen from './ResultsScreen'; +import DynamicBackground from './DynamicBackground'; +import distrosData from '@/data/distros.json'; +import { calculateDistroScores, type UserPreferences, type ScoredDistro } from '@/lib/scoring'; +import type { RoastContext } from '@/data/roasts'; + +type Stage = 'de' | 'questions' | 'results'; + +export default function DistroMatch() { + const [stage, setStage] = useState('de'); + const [deIndex, setDeIndex] = useState(0); + const [questionIndex, setQuestionIndex] = useState(0); + + const [likedDEs, setLikedDEs] = useState([]); + const [dislikedDEs, setDislikedDEs] = useState([]); + const [superLikedDEs, setSuperLikedDEs] = useState([]); + + const [answers, setAnswers] = useState>({}); + + const [topDistros, setTopDistros] = useState([]); + const [bgColors, setBgColors] = useState(distrosData.desktopEnvironments[0]?.colorPalette || ['#1a1a2e', '#16213e', '#0f3460']); + + const des = distrosData.desktopEnvironments; + const questions = distrosData.criticalQuestions; + + const visibleDEs = des.slice(deIndex, deIndex + 3); + const visibleQuestions = questions.slice(questionIndex, questionIndex + 3); + + const handleDESwipe = useCallback((direction: 'left' | 'right' | 'super') => { + const currentDE = des[deIndex]; + if (!currentDE) return; + + if (direction === 'right') { + setLikedDEs(prev => [...prev, currentDE.name]); + } else if (direction === 'super') { + setSuperLikedDEs(prev => [...prev, currentDE.name]); + setLikedDEs(prev => [...prev, currentDE.name]); + } else { + setDislikedDEs(prev => [...prev, currentDE.name]); + } + + const nextIndex = deIndex + 1; + setDeIndex(nextIndex); + + if (nextIndex >= des.length) { + setStage('questions'); + if (questions[0]) { + setBgColors(questions[0].colorPalette); + } + } else if (des[nextIndex]) { + setBgColors(des[nextIndex].colorPalette); + } + }, [deIndex, des, questions]); + + const handleQuestionSwipe = useCallback((direction: 'left' | 'right') => { + const currentQuestion = questions[questionIndex]; + if (!currentQuestion) return; + + const updatedAnswers = { + ...answers, + [currentQuestion.id]: direction === 'right' + }; + setAnswers(updatedAnswers); + + const nextIndex = questionIndex + 1; + setQuestionIndex(nextIndex); + + if (nextIndex >= questions.length) { + const preferences: UserPreferences = { + likedDEs, + dislikedDEs, + superLikedDEs, + nvidia: updatedAnswers.nvidia || false, + lowRam: updatedAnswers.ram_low || false, + gaming: updatedAnswers.gaming || false, + privacy: updatedAnswers.privacy || false, + systemdHate: updatedAnswers.systemd_hate || false, + beginner: updatedAnswers.beginner || false, + rolling: updatedAnswers.rolling || false, + oldHardware: updatedAnswers.old_hardware || false, + }; + + const results = calculateDistroScores(preferences); + setTopDistros(results); + setStage('results'); + + if (results[0]) { + setBgColors(results[0].colorPalette); + } + } else if (questions[nextIndex]) { + setBgColors(questions[nextIndex].colorPalette); + } + }, [questionIndex, questions, likedDEs, dislikedDEs, superLikedDEs, answers]); + + const handleReset = useCallback(() => { + setStage('de'); + setDeIndex(0); + setQuestionIndex(0); + setLikedDEs([]); + setDislikedDEs([]); + setSuperLikedDEs([]); + setAnswers({}); + setTopDistros([]); + if (des[0]) { + setBgColors(des[0].colorPalette); + } + }, [des]); + + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (stage === 'de' && deIndex < des.length) { + if (e.key === 'ArrowLeft') handleDESwipe('left'); + else if (e.key === 'ArrowRight') handleDESwipe('right'); + else if (e.key === 'ArrowUp') handleDESwipe('super'); + } else if (stage === 'questions' && questionIndex < questions.length) { + if (e.key === 'ArrowLeft') handleQuestionSwipe('left'); + else if (e.key === 'ArrowRight') handleQuestionSwipe('right'); + } + }; + + window.addEventListener('keydown', handleKeyDown); + return () => window.removeEventListener('keydown', handleKeyDown); + }, [stage, deIndex, questionIndex, des.length, questions.length, handleDESwipe, handleQuestionSwipe]); + + const getRoastContext = (): RoastContext => ({ + topDistro: topDistros[0]?.id || '', + nvidia: answers.nvidia || false, + lowRam: answers.ram_low || false, + gaming: answers.gaming || false, + privacy: answers.privacy || false, + systemdHate: answers.systemd_hate || false, + beginner: answers.beginner || false, + rolling: answers.rolling || false, + oldHardware: answers.old_hardware || false, + likedDEs, + }); + + return ( +
+ + +
+ {stage === 'de' && ( + <> + +

+ Masaüstü Ortamı Tercihlerin +

+

+ Beğendiğin DE'leri sağa, beğenmediklerini sola kaydır +

+
+ {deIndex + 1} / {des.length} +
+
+ +
+ + {visibleDEs.map((de, idx) => { + const isTop = idx === 0; + return ( + + + + ); + })} + +
+ + + handleDESwipe('right')} + onDislike={() => handleDESwipe('left')} + onSuperLike={() => handleDESwipe('super')} + onReset={handleReset} + showReset={deIndex > 0} + disabled={deIndex >= des.length} + /> + + + )} + + {stage === 'questions' && ( + <> + +

+ Kritik Sorular +

+

+ Evet için sağa, Hayır için sola kaydır +

+
+ +
+ + {visibleQuestions.map((question, idx) => { + const isTop = idx === 0; + return ( + + + + ); + })} + +
+ + + handleQuestionSwipe('right')} + onDislike={() => handleQuestionSwipe('left')} + onReset={handleReset} + showReset={true} + disabled={questionIndex >= questions.length} + /> + + + )} + + {stage === 'results' && ( + + )} + +
+
+ + Geç +
+
+ + Beğen +
+ {stage === 'de' && ( +
+ + Süper +
+ )} +
+
+
+ ); +} diff --git a/client/src/components/QuestionCard.tsx b/client/src/components/QuestionCard.tsx new file mode 100644 index 0000000..8d552fe --- /dev/null +++ b/client/src/components/QuestionCard.tsx @@ -0,0 +1,128 @@ +import { motion, useMotionValue, useTransform, PanInfo } from 'framer-motion'; +import { Check, X } from 'lucide-react'; + +interface QuestionCardProps { + question: { + id: string; + question: string; + type: string; + colorPalette: string[]; + }; + onSwipe: (direction: 'left' | 'right') => void; + isTop: boolean; + questionNumber: number; + totalQuestions: number; +} + +export default function QuestionCard({ question, onSwipe, isTop, questionNumber, totalQuestions }: QuestionCardProps) { + const x = useMotionValue(0); + const rotate = useTransform(x, [-300, 0, 300], [-15, 0, 15]); + const opacity = useTransform(x, [-300, -100, 0, 100, 300], [0.5, 1, 1, 1, 0.5]); + + const yesOpacity = useTransform(x, [0, 100, 200], [0, 0.5, 1]); + const noOpacity = useTransform(x, [-200, -100, 0], [1, 0.5, 0]); + + const handleDragEnd = (_: any, info: PanInfo) => { + const threshold = 100; + if (info.offset.x > threshold) { + onSwipe('right'); + } else if (info.offset.x < -threshold) { + onSwipe('left'); + } + }; + + const primaryColor = question.colorPalette[0]; + const secondaryColor = question.colorPalette[1]; + + return ( + +
+
+
+ + + + EVET + + + + + HAYIR + + +
+
+ Soru {questionNumber} / {totalQuestions} +
+ +
+ ? +
+ +

+ {question.question} +

+ +
+
+
+ +
+ Hayır +
+
+
+ Evet +
+ +
+
+
+
+
+ + ); +} diff --git a/client/src/components/ResultsScreen.tsx b/client/src/components/ResultsScreen.tsx new file mode 100644 index 0000000..1770ba9 --- /dev/null +++ b/client/src/components/ResultsScreen.tsx @@ -0,0 +1,217 @@ +import { motion } from 'framer-motion'; +import { Trophy, Medal, Award, ExternalLink, RotateCcw, Sparkles, Download } from 'lucide-react'; +import type { ScoredDistro } from '@/lib/scoring'; +import type { RoastContext } from '@/data/roasts'; +import { generateRoast } from '@/data/roasts'; + +interface ResultsScreenProps { + topDistros: ScoredDistro[]; + roastContext: RoastContext; + onReset: () => void; +} + +const rankIcons = [Trophy, Medal, Award]; +const rankColors = ['#FFD700', '#C0C0C0', '#CD7F32']; +const rankLabels = ['Birinci', 'İkinci', 'Üçüncü']; + +export default function ResultsScreen({ topDistros, roastContext, onReset }: ResultsScreenProps) { + const roastMessage = generateRoast(roastContext); + + if (!topDistros || topDistros.length === 0) { + return ( + +

Bir şeyler yanlış gitti

+

Lütfen tekrar deneyin.

+ +
+ ); + } + + return ( + + +
+ +

+ Senin İçin En Uygun Dağıtımlar +

+ +
+

+ Tercihlerine göre en uyumlu Linux dağıtımları +

+
+ +
+ {topDistros.map((distro, idx) => { + const RankIcon = rankIcons[idx]; + const isFirst = idx === 0; + const primaryColor = distro.colorPalette[0]; + + return ( + +
+
+ +
+
+
+ + + {rankLabels[idx]} + +
+
+ +{distro.score} puan +
+
+ +

+ {distro.name} +

+

{distro.tagline}

+ +
+

Varsayılan DE: {distro.defaultDE}

+
+ {distro.matchReasons.map((reason, i) => ( + + {reason} + + ))} +
+
+ + {isFirst && ( +
+
+

Artıları:

+
+ {distro.pros.slice(0, 2).map((pro, i) => ( + {pro} + ))} +
+
+
+ )} + + + + İndir + + +
+ + ); + })} +
+ + +
+
+
+ +
+
+

+ DistroMatch AI Diyor ki... +

+

+ {roastMessage} +

+
+
+
+
+ + + + Tekrar Dene + + + ); +} diff --git a/client/src/data/distros.json b/client/src/data/distros.json new file mode 100644 index 0000000..4a6e12e --- /dev/null +++ b/client/src/data/distros.json @@ -0,0 +1,839 @@ +{ + "distros": [ + { + "id": "cachyos", + "name": "CachyOS", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "Cinnamon", "Budgie", "i3", "Hyprland", "Sway", "LXQt", "MATE", "COSMIC"], + "base": "Arch", + "focus": ["performance", "gaming", "optimization"], + "nvidiaSupport": "excellent", + "minRAM": 2, + "recommendedRAM": 8, + "difficulty": "intermediate", + "rolling": true, + "systemd": true, + "downloadUrl": "https://cachyos.org/download/", + "colorPalette": ["#1793D1", "#00D4AA", "#0D47A1"], + "tagline": "Arch'ın performans canavarı", + "pros": ["Optimized kernels", "Gaming tweaks", "Easy Arch experience"], + "cons": ["Rolling release risks", "Arch complexity underneath"] + }, + { + "id": "mint", + "name": "Linux Mint", + "defaultDE": "Cinnamon", + "availableDEs": ["Cinnamon", "MATE", "Xfce"], + "base": "Ubuntu", + "focus": ["beginner-friendly", "stability", "traditional-desktop"], + "nvidiaSupport": "excellent", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://linuxmint.com/download.php", + "colorPalette": ["#87CF3E", "#5FAD56", "#3E8E41"], + "tagline": "Windows'tan kaçanların ilk durağı", + "pros": ["Extremely user-friendly", "Stable", "Great hardware support"], + "cons": ["Not cutting-edge", "Based on Ubuntu LTS"] + }, + { + "id": "mxlinux", + "name": "MX Linux", + "defaultDE": "Xfce", + "availableDEs": ["Xfce", "KDE Plasma", "Fluxbox"], + "base": "Debian", + "focus": ["lightweight", "stability", "traditional-desktop"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "beginner", + "rolling": false, + "systemd": false, + "downloadUrl": "https://mxlinux.org/download-links/", + "colorPalette": ["#4A90D9", "#2E5984", "#1A365D"], + "tagline": "Sistemdsiz Debian'ın en şık hali", + "pros": ["Lightweight", "Stable", "Great tools"], + "cons": ["Xfce can feel dated", "Not flashy"] + }, + { + "id": "debian", + "name": "Debian", + "defaultDE": "GNOME", + "availableDEs": ["GNOME", "KDE Plasma", "Xfce", "LXDE", "LXQt", "MATE", "Cinnamon"], + "base": "Independent", + "focus": ["stability", "server", "freedom"], + "nvidiaSupport": "moderate", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "intermediate", + "rolling": false, + "systemd": true, + "downloadUrl": "https://www.debian.org/distrib/", + "colorPalette": ["#A80030", "#D70A53", "#5E0018"], + "tagline": "Tüm dağıtımların dedesi", + "pros": ["Rock solid", "Huge repos", "Free software philosophy"], + "cons": ["Old packages", "NVIDIA can be painful"] + }, + { + "id": "endeavouros", + "name": "EndeavourOS", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "Cinnamon", "MATE", "Budgie", "LXQt", "i3", "Sway", "BSPWM", "Openbox"], + "base": "Arch", + "focus": ["arch-simplified", "customization", "community"], + "nvidiaSupport": "good", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": true, + "systemd": true, + "downloadUrl": "https://endeavouros.com/download/", + "colorPalette": ["#7F3FBF", "#5B2D8F", "#3D1F5F"], + "tagline": "Arch'ı seviyorum ama kurulum istemiyorum", + "pros": ["Real Arch experience", "Great community", "Choice of DEs"], + "cons": ["Rolling release", "Requires some knowledge"] + }, + { + "id": "popos", + "name": "Pop!_OS", + "defaultDE": "COSMIC/GNOME", + "availableDEs": ["COSMIC", "GNOME"], + "base": "Ubuntu", + "focus": ["gaming", "developer", "nvidia"], + "nvidiaSupport": "excellent", + "minRAM": 4, + "recommendedRAM": 8, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://pop.system76.com/", + "colorPalette": ["#FAA41A", "#48B9C7", "#574F4A"], + "tagline": "NVIDIA kullanıcılarının en yakın dostu", + "pros": ["Best NVIDIA support", "Great for devs", "Tiling extension"], + "cons": ["Tied to System76", "COSMIC still new"] + }, + { + "id": "zorin", + "name": "Zorin OS", + "defaultDE": "GNOME (modified)", + "availableDEs": ["GNOME (Zorin Desktop)"], + "base": "Ubuntu", + "focus": ["windows-like", "beginner-friendly", "beautiful"], + "nvidiaSupport": "excellent", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://zorin.com/os/download/", + "colorPalette": ["#15A6F0", "#0D7EBF", "#054A73"], + "tagline": "Windows'tan geçiş yapmak isteyenlerin rüyası", + "pros": ["Windows/Mac layouts", "Very polished", "Great for newbies"], + "cons": ["Pro features cost money", "Limited customization"] + }, + { + "id": "manjaro", + "name": "Manjaro", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "Cinnamon", "Budgie", "MATE", "i3"], + "base": "Arch", + "focus": ["user-friendly-arch", "gaming", "multimedia"], + "nvidiaSupport": "excellent", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "beginner", + "rolling": true, + "systemd": true, + "downloadUrl": "https://manjaro.org/download/", + "colorPalette": ["#35BF5C", "#2E9E4D", "#1A5C2D"], + "tagline": "Arch'ı herkes için erişilebilir kılan dağıtım", + "pros": ["User-friendly Arch", "Great hardware support", "mhwd tool"], + "cons": ["Delayed updates", "Some Arch purist criticism"] + }, + { + "id": "ubuntu", + "name": "Ubuntu", + "defaultDE": "GNOME", + "availableDEs": ["GNOME"], + "base": "Debian", + "focus": ["mainstream", "beginner-friendly", "enterprise"], + "nvidiaSupport": "excellent", + "minRAM": 4, + "recommendedRAM": 8, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://ubuntu.com/download/desktop", + "colorPalette": ["#E95420", "#77216F", "#5E2750"], + "tagline": "Linux dünyasının en popüler yüzü", + "pros": ["Massive community", "Great support", "Wide software availability"], + "cons": ["Snap controversy", "Canonical decisions"] + }, + { + "id": "fedora", + "name": "Fedora", + "defaultDE": "GNOME", + "availableDEs": ["GNOME", "KDE Plasma", "Xfce", "LXQt", "MATE", "Cinnamon", "i3", "Sway"], + "base": "Independent", + "focus": ["cutting-edge", "developer", "innovation"], + "nvidiaSupport": "moderate", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": false, + "systemd": true, + "downloadUrl": "https://fedoraproject.org/workstation/download", + "colorPalette": ["#51A2DA", "#294172", "#3C6EB4"], + "tagline": "Red Hat'in açık kaynak laboratuvarı", + "pros": ["Latest GNOME", "Great for devs", "SELinux security"], + "cons": ["No codecs out of box", "NVIDIA setup needed"] + }, + { + "id": "opensuse", + "name": "openSUSE Tumbleweed", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "LXDE", "LXQt", "MATE"], + "base": "Independent", + "focus": ["rolling-stable", "enterprise", "sysadmin"], + "nvidiaSupport": "good", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": true, + "systemd": true, + "downloadUrl": "https://get.opensuse.org/tumbleweed/", + "colorPalette": ["#73BA25", "#35A128", "#1A5012"], + "tagline": "Rolling release ama profesyonel kalitede", + "pros": ["YaST tool", "Btrfs snapshots", "Enterprise quality"], + "cons": ["Different package manager", "Learning curve"] + }, + { + "id": "nobara", + "name": "Nobara", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME"], + "base": "Fedora", + "focus": ["gaming", "content-creation", "nvidia"], + "nvidiaSupport": "excellent", + "minRAM": 4, + "recommendedRAM": 16, + "difficulty": "beginner", + "rolling": true, + "systemd": true, + "downloadUrl": "https://nobaraproject.org/download/", + "colorPalette": ["#FF6B35", "#E85D2F", "#C44D25"], + "tagline": "GloriousEggroll'un oyuncu rüyası", + "pros": ["Gaming optimized", "NVIDIA ready", "Proton-GE creator's distro"], + "cons": ["Fedora base learning", "Smaller community"] + }, + { + "id": "nixos", + "name": "NixOS", + "defaultDE": "None (configurable)", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "i3", "Sway", "Hyprland"], + "base": "Independent", + "focus": ["declarative", "reproducible", "developer"], + "nvidiaSupport": "moderate", + "minRAM": 2, + "recommendedRAM": 8, + "difficulty": "advanced", + "rolling": true, + "systemd": true, + "downloadUrl": "https://nixos.org/download/", + "colorPalette": ["#5277C3", "#7EBAE4", "#41516D"], + "tagline": "Sistemini kod olarak tanımla", + "pros": ["Reproducible builds", "Rollback heaven", "Nix packages"], + "cons": ["Steep learning curve", "Different from everything"] + }, + { + "id": "kdeneon", + "name": "KDE neon", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma"], + "base": "Ubuntu", + "focus": ["kde-showcase", "cutting-edge-kde", "developer"], + "nvidiaSupport": "good", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": false, + "systemd": true, + "downloadUrl": "https://neon.kde.org/download", + "colorPalette": ["#1D99F3", "#3DAEE9", "#0D5A8F"], + "tagline": "KDE'nin en taze hali", + "pros": ["Latest KDE always", "Ubuntu LTS base", "KDE team's own distro"], + "cons": ["KDE only", "Not for KDE haters"] + }, + { + "id": "arch", + "name": "Arch Linux", + "defaultDE": "None", + "availableDEs": ["Any"], + "base": "Independent", + "focus": ["minimal", "diy", "learning"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "advanced", + "rolling": true, + "systemd": true, + "downloadUrl": "https://archlinux.org/download/", + "colorPalette": ["#1793D1", "#333333", "#0D47A1"], + "tagline": "btw I use Arch", + "pros": ["Total control", "AUR", "Great wiki"], + "cons": ["Manual everything", "Can break"] + }, + { + "id": "elementary", + "name": "elementary OS", + "defaultDE": "Pantheon", + "availableDEs": ["Pantheon"], + "base": "Ubuntu", + "focus": ["mac-like", "beautiful", "curated"], + "nvidiaSupport": "good", + "minRAM": 4, + "recommendedRAM": 8, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://elementary.io/", + "colorPalette": ["#64BAFF", "#3689E6", "#0D52BF"], + "tagline": "macOS'a en yakın Linux deneyimi", + "pros": ["Beautiful UI", "Curated apps", "Consistent design"], + "cons": ["Limited customization", "Fewer apps"] + }, + { + "id": "antix", + "name": "antiX", + "defaultDE": "IceWM/Fluxbox", + "availableDEs": ["IceWM", "Fluxbox", "JWM", "herbstluftwm"], + "base": "Debian", + "focus": ["lightweight", "old-hardware", "systemd-free"], + "nvidiaSupport": "poor", + "minRAM": 0.25, + "recommendedRAM": 1, + "difficulty": "intermediate", + "rolling": false, + "systemd": false, + "downloadUrl": "https://antixlinux.com/download/", + "colorPalette": ["#FF5722", "#E64A19", "#BF360C"], + "tagline": "Eski bilgisayarların kurtarıcısı", + "pros": ["Runs on anything", "No systemd", "Very light"], + "cons": ["Not pretty", "Limited features"] + }, + { + "id": "bazzite", + "name": "Bazzite", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma", "GNOME"], + "base": "Fedora Atomic", + "focus": ["gaming", "steam-deck", "immutable"], + "nvidiaSupport": "excellent", + "minRAM": 4, + "recommendedRAM": 16, + "difficulty": "beginner", + "rolling": true, + "systemd": true, + "downloadUrl": "https://bazzite.gg/", + "colorPalette": ["#8B5CF6", "#6D28D9", "#4C1D95"], + "tagline": "SteamOS ama PC için", + "pros": ["Gaming mode", "Immutable safety", "Steam Deck vibes"], + "cons": ["Immutable learning curve", "Flatpak dependent"] + }, + { + "id": "garuda", + "name": "Garuda Linux", + "defaultDE": "KDE Plasma (Dr460nized)", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "Cinnamon", "MATE", "LXQt", "i3", "Sway", "Hyprland", "BSPWM", "Wayfire", "Qtile"], + "base": "Arch", + "focus": ["gaming", "eye-candy", "performance"], + "nvidiaSupport": "excellent", + "minRAM": 4, + "recommendedRAM": 8, + "difficulty": "beginner", + "rolling": true, + "systemd": true, + "downloadUrl": "https://garudalinux.org/downloads", + "colorPalette": ["#E040FB", "#AA00FF", "#7C4DFF"], + "tagline": "Göz zevkine önem verenler için Arch", + "pros": ["Beautiful themes", "Gaming ready", "Btrfs snapshots"], + "cons": ["Heavy", "Bloated for some"] + }, + { + "id": "kali", + "name": "Kali Linux", + "defaultDE": "Xfce", + "availableDEs": ["Xfce", "GNOME", "KDE Plasma", "i3"], + "base": "Debian", + "focus": ["security", "pentesting", "hacking"], + "nvidiaSupport": "good", + "minRAM": 2, + "recommendedRAM": 8, + "difficulty": "advanced", + "rolling": true, + "systemd": true, + "downloadUrl": "https://www.kali.org/get-kali/", + "colorPalette": ["#367BF0", "#2962FF", "#1A237E"], + "tagline": "Hackerların vazgeçilmez arkadaşı", + "pros": ["600+ security tools", "Great for learning", "Industry standard"], + "cons": ["Not for daily use", "Overkill for most"] + }, + { + "id": "puppy", + "name": "Puppy Linux", + "defaultDE": "JWM/Openbox", + "availableDEs": ["JWM", "Openbox"], + "base": "Various", + "focus": ["ultra-lightweight", "portable", "old-hardware"], + "nvidiaSupport": "poor", + "minRAM": 0.3, + "recommendedRAM": 1, + "difficulty": "intermediate", + "rolling": false, + "systemd": false, + "downloadUrl": "https://puppylinux.com/", + "colorPalette": ["#8D6E63", "#6D4C41", "#4E342E"], + "tagline": "USB'den çalışan minik dev", + "pros": ["Runs from RAM", "Portable", "Tiny"], + "cons": ["Unusual workflow", "Limited apps"] + }, + { + "id": "alpine", + "name": "Alpine Linux", + "defaultDE": "None", + "availableDEs": ["Xfce", "GNOME", "KDE Plasma", "Sway"], + "base": "Independent", + "focus": ["minimal", "security", "containers"], + "nvidiaSupport": "poor", + "minRAM": 0.1, + "recommendedRAM": 0.5, + "difficulty": "advanced", + "rolling": false, + "systemd": false, + "downloadUrl": "https://alpinelinux.org/downloads/", + "colorPalette": ["#0D597F", "#2196F3", "#0B3954"], + "tagline": "Docker containerlarının gizli kahramanı", + "pros": ["Minimal", "Secure", "musl libc"], + "cons": ["Different from glibc distros", "Desktop not primary focus"] + }, + { + "id": "tails", + "name": "Tails", + "defaultDE": "GNOME", + "availableDEs": ["GNOME"], + "base": "Debian", + "focus": ["privacy", "anonymity", "tor"], + "nvidiaSupport": "poor", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": false, + "systemd": true, + "downloadUrl": "https://tails.net/", + "colorPalette": ["#56347C", "#7B1FA2", "#4A148C"], + "tagline": "İz bırakmadan internette gezin", + "pros": ["Ultimate privacy", "Leaves no trace", "Tor built-in"], + "cons": ["Live only", "Slow (Tor)", "Not for daily use"] + }, + { + "id": "kubuntu", + "name": "Kubuntu", + "defaultDE": "KDE Plasma", + "availableDEs": ["KDE Plasma"], + "base": "Ubuntu", + "focus": ["kde-ubuntu", "beginner-friendly", "stable"], + "nvidiaSupport": "excellent", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://kubuntu.org/getkubuntu/", + "colorPalette": ["#0099FF", "#0066CC", "#003D7A"], + "tagline": "Ubuntu'nun KDE lezzeti", + "pros": ["Ubuntu stability", "KDE goodness", "Easy"], + "cons": ["Not latest KDE", "Ubuntu limitations"] + }, + { + "id": "devuan", + "name": "Devuan", + "defaultDE": "Xfce", + "availableDEs": ["Xfce", "MATE", "Cinnamon", "LXQt", "KDE Plasma"], + "base": "Debian", + "focus": ["systemd-free", "freedom", "unix-philosophy"], + "nvidiaSupport": "moderate", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "intermediate", + "rolling": false, + "systemd": false, + "downloadUrl": "https://www.devuan.org/get-devuan", + "colorPalette": ["#C62828", "#B71C1C", "#7F0000"], + "tagline": "Debian olmasını isterdim ama systemd istemiyorum", + "pros": ["Debian without systemd", "Init freedom", "Stable"], + "cons": ["Smaller community", "Some packages missing"] + }, + { + "id": "artix", + "name": "Artix Linux", + "defaultDE": "None (choice)", + "availableDEs": ["KDE Plasma", "GNOME", "Xfce", "Cinnamon", "MATE", "LXQt", "LXDE", "i3"], + "base": "Arch", + "focus": ["arch-systemd-free", "freedom", "performance"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "advanced", + "rolling": true, + "systemd": false, + "downloadUrl": "https://artixlinux.org/download.php", + "colorPalette": ["#10B981", "#059669", "#047857"], + "tagline": "Arch ama systemd olmadan", + "pros": ["Arch without systemd", "Init choice (OpenRC, runit, s6)", "AUR access"], + "cons": ["Manual setup", "Smaller community"] + }, + { + "id": "parrot", + "name": "Parrot Security", + "defaultDE": "MATE", + "availableDEs": ["MATE", "KDE Plasma", "Xfce"], + "base": "Debian", + "focus": ["security", "pentesting", "privacy"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 4, + "difficulty": "intermediate", + "rolling": true, + "systemd": true, + "downloadUrl": "https://parrotsec.org/download/", + "colorPalette": ["#00E676", "#00C853", "#00A040"], + "tagline": "Kali'nin daha günlük kullanılabilir kuzeni", + "pros": ["Security tools", "Daily driver friendly", "AnonSurf"], + "cons": ["Less tools than Kali", "Debian testing instability"] + }, + { + "id": "void", + "name": "Void Linux", + "defaultDE": "None", + "availableDEs": ["Xfce", "Cinnamon", "MATE", "Enlightenment", "LXQt", "LXDE"], + "base": "Independent", + "focus": ["minimal", "runit", "independent"], + "nvidiaSupport": "moderate", + "minRAM": 0.5, + "recommendedRAM": 2, + "difficulty": "advanced", + "rolling": true, + "systemd": false, + "downloadUrl": "https://voidlinux.org/download/", + "colorPalette": ["#478061", "#2E5E45", "#1A3D2B"], + "tagline": "Bağımsızlığın ve minimalizmin simgesi", + "pros": ["runit init", "musl option", "Independent"], + "cons": ["Smaller repos", "Less hand-holding"] + }, + { + "id": "gentoo", + "name": "Gentoo", + "defaultDE": "None", + "availableDEs": ["Any"], + "base": "Independent", + "focus": ["compile-everything", "optimization", "learning"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 8, + "difficulty": "expert", + "rolling": true, + "systemd": false, + "downloadUrl": "https://www.gentoo.org/downloads/", + "colorPalette": ["#54487A", "#6E5494", "#4B3B6B"], + "tagline": "Her şeyi derleyeceksin ve seveceksin", + "pros": ["Ultimate optimization", "Total control", "Great learning"], + "cons": ["Compile times", "Complex"] + }, + { + "id": "lubuntu", + "name": "Lubuntu", + "defaultDE": "LXQt", + "availableDEs": ["LXQt"], + "base": "Ubuntu", + "focus": ["lightweight", "old-hardware", "simple"], + "nvidiaSupport": "good", + "minRAM": 1, + "recommendedRAM": 2, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://lubuntu.me/downloads/", + "colorPalette": ["#0068C8", "#0053A0", "#003E78"], + "tagline": "Ubuntu'nun en hafif tadı", + "pros": ["Light on resources", "Ubuntu base", "Simple"], + "cons": ["Basic features", "LXQt less polished"] + }, + { + "id": "xubuntu", + "name": "Xubuntu", + "defaultDE": "Xfce", + "availableDEs": ["Xfce"], + "base": "Ubuntu", + "focus": ["lightweight", "stable", "traditional"], + "nvidiaSupport": "good", + "minRAM": 1.5, + "recommendedRAM": 2, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://xubuntu.org/download/", + "colorPalette": ["#0044AA", "#003388", "#002266"], + "tagline": "Xfce ve Ubuntu'nun mükemmel uyumu", + "pros": ["Balanced", "Stable", "Traditional"], + "cons": ["Xfce can feel dated", "Not flashy"] + }, + { + "id": "deepin", + "name": "deepin", + "defaultDE": "DDE", + "availableDEs": ["DDE"], + "base": "Debian", + "focus": ["beautiful", "windows-like", "user-friendly"], + "nvidiaSupport": "good", + "minRAM": 2, + "recommendedRAM": 4, + "difficulty": "beginner", + "rolling": false, + "systemd": true, + "downloadUrl": "https://www.deepin.org/en/download/", + "colorPalette": ["#0082FC", "#006DD9", "#0052A3"], + "tagline": "En güzel masaüstü ortamının sahibi", + "pros": ["Stunning UI", "User friendly", "Unique"], + "cons": ["Chinese origin concerns", "DDE can be buggy"] + }, + { + "id": "qubes", + "name": "Qubes OS", + "defaultDE": "Xfce", + "availableDEs": ["Xfce", "i3"], + "base": "Fedora/Debian VMs", + "focus": ["security", "isolation", "privacy"], + "nvidiaSupport": "poor", + "minRAM": 16, + "recommendedRAM": 32, + "difficulty": "expert", + "rolling": false, + "systemd": true, + "downloadUrl": "https://www.qubes-os.org/downloads/", + "colorPalette": ["#3874D8", "#2C5FB3", "#1E4080"], + "tagline": "Paranoyakların tercihi", + "pros": ["Security by isolation", "Color-coded VMs", "Xen hypervisor"], + "cons": ["Heavy RAM needs", "Complex", "Limited hardware"] + } + ], + "desktopEnvironments": [ + { + "id": "kde", + "name": "KDE Plasma", + "description": "Özelleştirme cenneti, Windows benzeri", + "style": "modern", + "resourceUsage": "medium-high", + "customization": "extreme", + "colorPalette": ["#1D99F3", "#3DAEE9", "#0D5A8F"] + }, + { + "id": "gnome", + "name": "GNOME", + "description": "Minimalist ve modern, workflow odaklı", + "style": "minimalist", + "resourceUsage": "medium-high", + "customization": "limited", + "colorPalette": ["#4A86CF", "#3584E4", "#1C71D8"] + }, + { + "id": "xfce", + "name": "Xfce", + "description": "Hafif, geleneksel, güvenilir", + "style": "traditional", + "resourceUsage": "low", + "customization": "moderate", + "colorPalette": ["#2EB8E6", "#00AAD4", "#007EA8"] + }, + { + "id": "cinnamon", + "name": "Cinnamon", + "description": "Windows 7 nostaljisi, kullanıcı dostu", + "style": "traditional", + "resourceUsage": "medium", + "customization": "good", + "colorPalette": ["#87CF3E", "#6BBD2B", "#4E9A1A"] + }, + { + "id": "mate", + "name": "MATE", + "description": "GNOME 2'nin devamı, klasik", + "style": "traditional", + "resourceUsage": "low-medium", + "customization": "good", + "colorPalette": ["#6CAD54", "#4E8A3A", "#356425"] + }, + { + "id": "lxqt", + "name": "LXQt", + "description": "Ultra hafif, Qt tabanlı", + "style": "minimal", + "resourceUsage": "very-low", + "customization": "moderate", + "colorPalette": ["#0099CC", "#0077AA", "#005588"] + }, + { + "id": "budgie", + "name": "Budgie", + "description": "Modern, basit, zarif", + "style": "modern", + "resourceUsage": "medium", + "customization": "moderate", + "colorPalette": ["#6BCA81", "#4CAF50", "#388E3C"] + }, + { + "id": "pantheon", + "name": "Pantheon", + "description": "macOS benzeri, minimalist", + "style": "mac-like", + "resourceUsage": "medium", + "customization": "very-limited", + "colorPalette": ["#64BAFF", "#3689E6", "#0D52BF"] + }, + { + "id": "cosmic", + "name": "COSMIC", + "description": "System76'nın yeni nesil DE'si", + "style": "modern", + "resourceUsage": "medium", + "customization": "good", + "colorPalette": ["#FAA41A", "#48B9C7", "#574F4A"] + }, + { + "id": "dde", + "name": "Deepin DE", + "description": "En güzel DE, Windows 11 benzeri", + "style": "beautiful", + "resourceUsage": "medium-high", + "customization": "moderate", + "colorPalette": ["#0082FC", "#006DD9", "#0052A3"] + }, + { + "id": "i3", + "name": "i3/Sway", + "description": "Tiling WM, klavye odaklı", + "style": "minimal-tiling", + "resourceUsage": "very-low", + "customization": "extreme", + "colorPalette": ["#285577", "#1C3D5A", "#122A40"] + }, + { + "id": "hyprland", + "name": "Hyprland", + "description": "Wayland tiling WM, gösterişli animasyonlar", + "style": "minimal-tiling", + "resourceUsage": "low", + "customization": "extreme", + "colorPalette": ["#00D4AA", "#00B894", "#009874"] + } + ], + "criticalQuestions": [ + { + "id": "nvidia", + "question": "NVIDIA ekran kartın var mı?", + "type": "boolean", + "colorPalette": ["#76B900", "#5C9400", "#3D6200"], + "impact": { + "yes": { + "boost": ["popos", "nobara", "bazzite", "manjaro", "garuda", "mint", "zorin", "ubuntu", "kubuntu", "cachyos"], + "penalty": ["tails", "qubes", "alpine", "antix", "puppy", "nixos"] + } + } + }, + { + "id": "ram_low", + "question": "RAM'in 4GB veya altında mı?", + "type": "boolean", + "colorPalette": ["#FF6B6B", "#EE5A5A", "#CC4444"], + "impact": { + "yes": { + "boost": ["antix", "puppy", "alpine", "lubuntu", "mxlinux", "void", "xubuntu"], + "penalty": ["qubes", "garuda", "bazzite", "nobara", "elementary", "ubuntu", "fedora"] + } + } + }, + { + "id": "gaming", + "question": "Linux'ta oyun oynamayı planlıyor musun?", + "type": "boolean", + "colorPalette": ["#9B59B6", "#8E44AD", "#6C3483"], + "impact": { + "yes": { + "boost": ["nobara", "bazzite", "garuda", "cachyos", "popos", "manjaro"], + "penalty": ["tails", "qubes", "alpine", "debian", "antix", "kali"] + } + } + }, + { + "id": "privacy", + "question": "Gizlilik ve güvenlik senin için çok önemli mi?", + "type": "boolean", + "colorPalette": ["#2C3E50", "#1A252F", "#0D1318"], + "impact": { + "yes": { + "boost": ["tails", "qubes", "parrot", "kali", "alpine", "void", "artix", "devuan"], + "penalty": ["deepin", "ubuntu", "zorin"] + } + } + }, + { + "id": "systemd_hate", + "question": "Systemd'den nefret ediyor musun?", + "type": "boolean", + "colorPalette": ["#E74C3C", "#C0392B", "#922B21"], + "impact": { + "yes": { + "boost": ["artix", "devuan", "void", "antix", "mxlinux", "alpine", "gentoo", "puppy"], + "penalty": ["ubuntu", "fedora", "popos", "manjaro", "endeavouros"] + } + } + }, + { + "id": "beginner", + "question": "Linux'a yeni mi başlıyorsun?", + "type": "boolean", + "colorPalette": ["#3498DB", "#2980B9", "#1F618D"], + "impact": { + "yes": { + "boost": ["mint", "zorin", "ubuntu", "popos", "manjaro", "elementary", "kubuntu", "lubuntu", "xubuntu", "deepin"], + "penalty": ["arch", "gentoo", "nixos", "void", "qubes", "kali", "artix"] + } + } + }, + { + "id": "rolling", + "question": "Her zaman en güncel yazılımları ister misin?", + "type": "boolean", + "colorPalette": ["#1ABC9C", "#16A085", "#117A65"], + "impact": { + "yes": { + "boost": ["arch", "endeavouros", "manjaro", "opensuse", "cachyos", "garuda", "void", "nixos", "nobara", "bazzite"], + "penalty": ["debian", "mint", "mxlinux", "ubuntu", "elementary"] + } + } + }, + { + "id": "old_hardware", + "question": "Eski bir bilgisayar mı kullanıyorsun?", + "type": "boolean", + "colorPalette": ["#95A5A6", "#7F8C8D", "#616A6B"], + "impact": { + "yes": { + "boost": ["antix", "puppy", "lubuntu", "mxlinux", "alpine", "void", "xubuntu"], + "penalty": ["garuda", "qubes", "bazzite", "nobara", "elementary", "deepin"] + } + } + } + ] +} diff --git a/client/src/data/roasts.ts b/client/src/data/roasts.ts new file mode 100644 index 0000000..7b189bf --- /dev/null +++ b/client/src/data/roasts.ts @@ -0,0 +1,451 @@ +export interface RoastTemplate { + id: string; + condition: (context: RoastContext) => boolean; + messages: string[]; +} + +export interface RoastContext { + topDistro: string; + nvidia: boolean; + lowRam: boolean; + gaming: boolean; + privacy: boolean; + systemdHate: boolean; + beginner: boolean; + rolling: boolean; + oldHardware: boolean; + likedDEs: string[]; +} + +const generalRoasts: RoastTemplate[] = [ + { + id: "arch_nvidia", + condition: (ctx) => ctx.topDistro === "arch" && ctx.nvidia, + messages: [ + "NVIDIA kartınla Arch seçerek hayatınla kumar oynadın, tebrikler. Her kernel güncellemesinde dua etmeyi unutma.", + "Arch + NVIDIA combo'su seçtin. Ya çok cesursun ya da masokistsin. Her iki durumda da saygı duyuyorum.", + "NVIDIA ile Arch? Sana 'nvidia-dkms kurulumu başarısız' mesajını ezberlemeyi tavsiye ederim." + ] + }, + { + id: "arch_beginner", + condition: (ctx) => ctx.topDistro === "arch" && ctx.beginner, + messages: [ + "Yeni başlayan biri olarak Arch seçtin. Wiki'yi yastık altında tutmayı unutma.", + "Linux'a yeni başlıyorsun ve Arch istiyorsun. Cesaretine hayranım, ama Ubuntu öneririm desem kızar mısın?", + "Arch seçen bir newbie... Ya süper hızlı öğreneceksin ya da Windows'a geri döneceksin. Ortası yok." + ] + }, + { + id: "gentoo_anything", + condition: (ctx) => ctx.topDistro === "gentoo", + messages: [ + "Gentoo seçtin. Umarım derleyici optimizasyonları kadar boş zamanın da vardır.", + "Her şeyi derlemek istiyorsun. Elektrik faturasına hazır ol.", + "Gentoo kullanıcısı olacaksın. Artık her sohbette 'ben derledim' diye başlayacaksın.", + "emerge --sync yazdığında akşam yemeğini ısıtmayı unutma, çünkü bu biraz sürecek." + ] + }, + { + id: "nixos_any", + condition: (ctx) => ctx.topDistro === "nixos", + messages: [ + "NixOS seçtin. Artık her şeyi configuration.nix'te tanımlayacaksın. Her. Şeyi.", + "Nix öğrenme eğrisi dik, ama en azından sistemin her zaman reproducible olacak. Değer mi? Göreceğiz.", + "Declarative configuration istiyorsun. Kodla sistem yönetmeye hoş geldin.", + "NixOS: 'Ama benim makinemde çalışıyordu' cümlesini tarih kitaplarına göndermek için var." + ] + }, + { + id: "qubes_privacy", + condition: (ctx) => ctx.topDistro === "qubes" && ctx.privacy, + messages: [ + "Qubes OS seçtin. Ya bir gazeteci, ya bir aktivist, ya da çok paranoyaksın. Her durumda 32GB RAM al.", + "Her uygulama ayrı VM'de çalışacak. NSA'den bile gizlenebilirsin ama Chrome'u açamayabilirsin.", + "Qubes kullanıcısı olacaksın. Artık arkadaşlarına 'compartmentalization' kelimesini açıklamak zorundasın." + ] + }, + { + id: "tails_privacy", + condition: (ctx) => ctx.topDistro === "tails", + messages: [ + "Tails seçtin. Tor üzerinden her şey. Yavaş ama güvenli. Sabır bir erdem.", + "Hiç iz bırakmamak istiyorsun. Tails bunu sağlar ama Netflix izlemek istersen başka plan yap.", + "Tails kullanıcısı: USB'den boot, Tor ile gez, bilgisayarı kapat, iz yok. Ajan gibisin." + ] + }, + { + id: "mint_windows", + condition: (ctx) => ctx.topDistro === "mint" && ctx.beginner, + messages: [ + "Mint seçtin. Windows'tan kaçıp evini özleyenler için mükemmel tercih.", + "Linux Mint: 'Windows'tan geçiş yapmak istiyorum ama çok da değişmesin' diyen herkesin tercihi.", + "Akıllı seçim! Mint seni hayal kırıklığına uğratmaz. Sıkıcı ama güvenilir, tıpkı bir Volvo gibi." + ] + }, + { + id: "popos_nvidia_gaming", + condition: (ctx) => ctx.topDistro === "popos" && ctx.nvidia && ctx.gaming, + messages: [ + "Pop!_OS + NVIDIA + Gaming. Mükemmel üçlü. System76 seni düşünmüş.", + "NVIDIA kartınla oyun oynayacaksın ve Pop!_OS seçtin. Zeki çocuksun.", + "Pop!_OS seni NVIDIA sorunlarından kurtaracak. Artık 'sürücü sorunu' yerine sadece oyna." + ] + }, + { + id: "nobara_gaming", + condition: (ctx) => ctx.topDistro === "nobara" && ctx.gaming, + messages: [ + "Nobara seçtin. GloriousEggroll'un eseri. Proton-GE ile birlikte gelir, oyun optimizasyonları hazır.", + "Linux gaming denince Nobara akla gelmeli. İyi seçim, artık git biraz oyun oyna.", + "Nobara: 'Fedora güzel ama gaming için optimize değil' diyenler için yapıldı." + ] + }, + { + id: "bazzite_gaming", + condition: (ctx) => ctx.topDistro === "bazzite" && ctx.gaming, + messages: [ + "Bazzite seçtin. Steam Deck vibes ama masaüstünde. Immutable OS korkutmasın, rollback senin dostun.", + "SteamOS ama PC için. Bazzite ile konsol deneyimi masaüstüne geldi.", + "Gaming Mode, immutable sistem, otomatik güncellemeler. Bazzite ile oyun makinesi kur ve unut." + ] + }, + { + id: "garuda_eyecandy", + condition: (ctx) => ctx.topDistro === "garuda", + messages: [ + "Garuda seçtin. Göz zevkin yerinde, Dr460nized tema ile havali görüneceksin.", + "Arch tabanlı, oyuna hazır, gösterişli. Garuda ile masaüstün Instagram'a atılabilir.", + "Garuda'nın teması o kadar güzel ki bazen sadece masaüstüne bakarsın." + ] + }, + { + id: "elementary_mac", + condition: (ctx) => ctx.topDistro === "elementary", + messages: [ + "elementary OS seçtin. Mac alacak paran yoktu galiba. Şaka şaka, Pantheon gerçekten güzel.", + "macOS esintisi istiyorsun ama Apple'a para vermek istemiyorsun. Anladım seni.", + "elementary: 'Apple estetiği istiyorum ama özgürlük de istiyorum' diyenler için." + ] + }, + { + id: "zorin_windows", + condition: (ctx) => ctx.topDistro === "zorin", + messages: [ + "Zorin seçtin. Windows'tan geçiş yapacaklar için biçilmiş kaftan.", + "Windows 11 gibi görünsün ama Linux olsun. Zorin tam bunu yapıyor.", + "Zorin ile ailenin bile fark etmeyebilir Linux'a geçtiğini." + ] + }, + { + id: "deepin_beauty", + condition: (ctx) => ctx.topDistro === "deepin", + messages: [ + "deepin seçtin. En güzel masaüstü ortamı ama Çin yapımı. Paranoya seviyen düşük demek.", + "DDE gerçekten güzel. Mahremiyet endişen yoksa keyfini çıkar.", + "deepin: Görsel şölen isteyenler için. Sadece... telemetri ayarlarını kontrol et." + ] + }, + { + id: "manjaro_beginner_arch", + condition: (ctx) => ctx.topDistro === "manjaro" && ctx.beginner, + messages: [ + "Manjaro seçtin. Arch'ın tadını almak istiyorsun ama kurulumla uğraşmak istemiyorsun. Akıllıca.", + "'I use Arch btw' demek istiyorsun ama gerçek Arch kurmak istemiyorsun. Manjaro işte bu yüzden var.", + "Manjaro: Arch deneyimi, Ubuntu kolaylığı. Win-win." + ] + }, + { + id: "ubuntu_mainstream", + condition: (ctx) => ctx.topDistro === "ubuntu", + messages: [ + "Ubuntu seçtin. Klasik, güvenilir, sıkıcı. Tıpkı Toyota Corolla gibi.", + "Herkesin ilk Linux'u genelde Ubuntu olur. Nostaljik.", + "Ubuntu: 'Just works' felsefesi. Snap konusunda fikrin neyse artık..." + ] + }, + { + id: "fedora_dev", + condition: (ctx) => ctx.topDistro === "fedora", + messages: [ + "Fedora seçtin. Red Hat'in test alanına hoş geldin. En azından GNOME'un son hali senin.", + "Developer'lar Fedora sever. SELinux seni korur, DNF seni yavaşlatır.", + "Fedora: Bleeding edge ama stabil. Paradoks gibi ama çalışıyor." + ] + }, + { + id: "debian_server", + condition: (ctx) => ctx.topDistro === "debian", + messages: [ + "Debian seçtin. Paketler 2 yıl eski ama 'rock solid'. Sunucu gibi düşün, masaüstü gibi kullan.", + "Stable branch seçersen yazılımlar vintage olur. Testing seçersen... adı üstünde.", + "Debian: Her şeyin başladığı yer. Saygıyla." + ] + }, + { + id: "cachyos_performance", + condition: (ctx) => ctx.topDistro === "cachyos", + messages: [ + "CachyOS seçtin. Performans takıntılı Arch kullanıcısı için birebir.", + "Optimize edilmiş kernel, scheduler tweaks... CachyOS ile her milisaniye önemli.", + "CachyOS: 'Arch iyi ama daha hızlı olabilir' diyenler için." + ] + }, + { + id: "void_independent", + condition: (ctx) => ctx.topDistro === "void", + messages: [ + "Void Linux seçtin. runit, xbps, bağımsızlık. Kendi yolunu çizen biriymiş gibi duruyorsun.", + "Ne Arch, ne Debian. Void tamamen bağımsız. Hipster Linux kullanıcısı vibes.", + "Void: Minimalizm ve bağımsızlık isteyenler için. xbps-install hızlı ve temiz." + ] + }, + { + id: "artix_systemd_hate", + condition: (ctx) => ctx.topDistro === "artix" && ctx.systemdHate, + messages: [ + "Artix seçtin. 'Systemd'den nefret ediyorum ama Arch istiyorum' diyenlerin mabedi.", + "OpenRC, runit, s6... Init sistemi seçimi senin. Özgürlük bu işte.", + "Systemd olmadan Arch. Lennart Poettering bu mesajı beğenmedi." + ] + }, + { + id: "devuan_systemd_hate", + condition: (ctx) => ctx.topDistro === "devuan" && ctx.systemdHate, + messages: [ + "Devuan seçtin. Debian sevsem ama systemd istemesem... İşte Devuan.", + "Debian ama systemd olmadan. Init freedom forever!", + "Devuan: 'Veteran Init Wars' gazileri için." + ] + }, + { + id: "kali_hacker", + condition: (ctx) => ctx.topDistro === "kali", + messages: [ + "Kali seçtin. 600+ hacking tool'u ile artık hackersin. Ya da öyle olduğunu sanıyorsun.", + "Kali günlük kullanım için değil ama sen bilirsin. Root olarak takılmayı seviyorsan...", + "Kali: 'Mr. Robot izledim, hacker olacam' starter pack." + ] + }, + { + id: "parrot_security", + condition: (ctx) => ctx.topDistro === "parrot", + messages: [ + "Parrot seçtin. Kali'nin günlük kullanılabilir versiyonu. Akıllı tercih.", + "Güvenlik araçları + günlük kullanım. Parrot ikisini birleştiriyor.", + "Parrot: 'Kali istiyorum ama normal de kullanayım' diyenler için." + ] + }, + { + id: "antix_old_hw", + condition: (ctx) => ctx.topDistro === "antix" && ctx.oldHardware, + messages: [ + "antiX seçtin. 256MB RAM ile çalışır. Eski laptopu kurtardın.", + "Dede bilgisayar mı kurtarılacak? antiX işte tam bu iş için var.", + "antiX: 'Bu bilgisayar çöp' demeden önce bir şans ver." + ] + }, + { + id: "puppy_portable", + condition: (ctx) => ctx.topDistro === "puppy", + messages: [ + "Puppy Linux seçtin. USB'den boot, RAM'de çalış, iz bırakma. Minimalizmin zirvesi.", + "300MB RAM yeterli. Puppy ile antika bilgisayarlar bile uçar.", + "Puppy: Taşınabilir Linux isteyenler için cep dostu." + ] + }, + { + id: "alpine_minimal", + condition: (ctx) => ctx.topDistro === "alpine", + messages: [ + "Alpine seçtin. Docker image'ların bunun üstüne kurulu zaten. Masaüstü de olurmuş.", + "musl libc, minimal, güvenli. Container'ların kralı masaüstüne geldi.", + "Alpine: 'Her şey çok şişkin' diyenler için diyet Linux." + ] + }, + { + id: "opensuse_enterprise", + condition: (ctx) => ctx.topDistro === "opensuse", + messages: [ + "openSUSE seçtin. YaST ile her şeyi GUI'den yönet. Enterprise kalitesi, bedava.", + "Tumbleweed rolling ama stabil. Btrfs snapshot'ları hayat kurtarır.", + "openSUSE: Almanya mühendisliği, Linux tarzı." + ] + }, + { + id: "endeavouros_arch_light", + condition: (ctx) => ctx.topDistro === "endeavouros", + messages: [ + "EndeavourOS seçtin. Terminal-centric Arch experience. GUI installer var ama ruh hala minimal.", + "Arch'ın ruhu, kolay kurulum. EndeavourOS ile 'I use Arch btw' hakkını kazandın.", + "EndeavourOS: Arch puristlerin 'bu da Arch sayılır' dediği dağıtım." + ] + }, + { + id: "kdeneon_kde", + condition: (ctx) => ctx.topDistro === "kdeneon" && ctx.likedDEs.includes("kde"), + messages: [ + "KDE neon seçtin. En taze Plasma her zaman seninle. KDE fanboy detected.", + "KDE'nin kendi dağıtımı. Her yeni Plasma özelliği ilk sana gelir.", + "KDE neon: 'Plasma'nın son versiyonunu HEMEN istiyorum' diyenler için." + ] + }, + { + id: "lubuntu_light", + condition: (ctx) => ctx.topDistro === "lubuntu" && ctx.lowRam, + messages: [ + "Lubuntu seçtin. LXQt ile hafiflik, Ubuntu ile güvenlik. İyi denge.", + "1GB RAM yeterli. Lubuntu eski makineleri kurtarır.", + "Lubuntu: Ubuntu'nun en hafif lezzeti." + ] + }, + { + id: "xubuntu_balanced", + condition: (ctx) => ctx.topDistro === "xubuntu", + messages: [ + "Xubuntu seçtin. Xfce + Ubuntu = Dengeli, güvenilir, biraz nostaljik.", + "Ne çok hafif ne çok ağır. Xubuntu tam ortada, goldilocks zone.", + "Xubuntu: 'Xfce seviyorum ama Arch kurmak istemiyorum' diyenler için." + ] + }, + { + id: "kubuntu_kde_ubuntu", + condition: (ctx) => ctx.topDistro === "kubuntu", + messages: [ + "Kubuntu seçtin. Ubuntu + KDE. İkisinin de fanı mısın yoksa?", + "KDE istiyorsun ama Arch korkutuyor. Kubuntu mantıklı tercih.", + "Kubuntu: Ubuntu'nun en şık giysili versiyonu." + ] + }, + { + id: "mxlinux_stable", + condition: (ctx) => ctx.topDistro === "mxlinux", + messages: [ + "MX Linux seçtin. DistroWatch'ın gözdesi. Stabilite, hafiflik, kullanışlılık.", + "Xfce tabanlı, Debian güvenilirliği, harika araçlar. MX seni mutlu eder.", + "MX Linux: 'Neden bu kadar popüler?' diye sorarsan, kullandığında anlarsın." + ] + } +]; + +const genericRoasts = [ + "Linux dünyasına hoş geldin! Artık Windows güncellemelerinden kurtuldun... ama başka sorunlarla tanışacaksın.", + "Seçimini yaptın. Şimdi git, forumlarda 'bunu nasıl yaparım' diye sor. Herkes yardım eder... genelde.", + "Tebrikler! Artık 'bende çalışıyor' deme hakkını kazandın.", + "İyi seçim! Ama unutma, Linux'ta her şey 'sadece küçük bir config değişikliği' ile çözülür. Bazen.", + "Distro seçtin, güzel. Şimdi DE seçimi, WM tartışmaları, terminal vs GUI kavgaları... Maceraya hazır mısın?" +]; + +const deRoasts: Record = { + kde: [ + "KDE sevdin. Widget'lar, temalar, özelleştirme... Artık masaüstünü süslemekle geçecek saatler.", + "KDE Plasma seçimi = Ayarlar menüsünde kaybolmaya hazırsın." + ], + gnome: [ + "GNOME beğendin. Minimal, temiz, extensions'sız yarım. Ama extension store'da saatler geçireceksin.", + "GNOME seçtin. Ya workflow'u çok sevdin ya da sadece dock istiyordun." + ], + xfce: [ + "Xfce sevdin. Hafif, geleneksel, güvenilir. Tıpkı eski bir dost gibi.", + "Xfce: 'Kaynak kullanımı 200MB geçmesin' diyenler için." + ], + cinnamon: [ + "Cinnamon beğendin. Windows 7 nostaljisi hissediliyor.", + "Cinnamon: 'Değişim istemiyorum ama Linux istiyorum' diyenler için." + ], + i3: [ + "i3/Tiling WM sevdin. Artık fareyi kullanmak ayıp sayılır.", + "Tiling WM seçtin. Konfigürasyon dosyaları yeni evin olacak." + ], + hyprland: [ + "Hyprland beğendin. Wayland + Tiling + Animasyonlar = Rice heaven.", + "Hyprland: r/unixporn'da paylaşım yapmaya hazırsın." + ], + pantheon: [ + "Pantheon sevdin. macOS vibes ama özgür. elementary seni bekliyor.", + "Pantheon: Apple esintisi, Linux özgürlüğü." + ], + dde: [ + "Deepin DE beğendin. En güzel masaüstü ortamı, tartışmasız.", + "DDE sevdiysen görsellik önemli senin için. Anladım." + ] +}; + +export function generateRoast(context: RoastContext): string { + const matchingRoasts = generalRoasts.filter(r => r.condition(context)); + + let roastParts: string[] = []; + + if (matchingRoasts.length > 0) { + const primaryRoast = matchingRoasts[0]; + const randomMessage = primaryRoast.messages[Math.floor(Math.random() * primaryRoast.messages.length)]; + roastParts.push(randomMessage); + } + + if (context.likedDEs.length > 0) { + const topDE = context.likedDEs[0]; + const deKey = topDE.toLowerCase().replace(/\s+/g, '').replace('plasma', '').replace('sway', 'i3'); + if (deRoasts[deKey]) { + const deRoast = deRoasts[deKey][Math.floor(Math.random() * deRoasts[deKey].length)]; + roastParts.push(deRoast); + } + } + + if (roastParts.length === 0) { + roastParts.push(genericRoasts[Math.floor(Math.random() * genericRoasts.length)]); + } + + if (context.nvidia && context.gaming && !roastParts.some(r => r.includes('NVIDIA'))) { + roastParts.push("NVIDIA + Gaming combo'sun var. Linux'ta oyun artık gerçek, tadını çıkar!"); + } + + if (context.oldHardware && context.lowRam) { + roastParts.push("Eski donanımla Linux kullanmak çevreci bir hareket. Dünyayı kurtarıyorsun!"); + } + + if (context.systemdHate) { + roastParts.push("Systemd düşmanı bir seçim yaptın. Init savaşlarının gazisi olarak selamlıyorum."); + } + + return roastParts.join(" "); +} + +export function generateQuickRoast(distroId: string, isNvidia: boolean, isGaming: boolean): string { + const quickRoasts: Record = { + arch: isNvidia ? "NVIDIA ile Arch? Cesursun." : "Arch seçtin. Wiki'ye abone ol.", + gentoo: "Her şeyi derleyeceksin. Bol sabır.", + nixos: "Declarative dünya seni bekliyor.", + qubes: "VM içinde VM. Paranoya seviyesi: Maximum.", + tails: "İz bırakmadan gez. Ajan modunda.", + mint: "Windows'tan kaçış güzel olacak.", + ubuntu: "Klasik ama güzel.", + fedora: "Bleeding edge, stabil ambalajda.", + popos: isNvidia && isGaming ? "NVIDIA + Gaming = Pop!_OS. Perfect match." : "System76 seni seviyor.", + manjaro: "Arch lite. Akıllı seçim.", + garuda: "Göz zevkin yerinde.", + elementary: "macOS vibes, Linux kalbi.", + zorin: "Windows'tan geçiş modu: aktif.", + deepin: "En güzel DE seninle.", + nobara: isGaming ? "GloriousEggroll approved!" : "Fedora ama gaming-ready.", + bazzite: isGaming ? "SteamOS, PC edition." : "Immutable gaming goodness.", + cachyos: "Performans odaklı Arch.", + void: "Bağımsız ruhlu.", + artix: "Arch without the d-word.", + devuan: "Debian, özgür init ile.", + alpine: "Minimal perfection.", + kali: "Hacker mode: engaged.", + parrot: "Güvenlik + günlük kullanım.", + antix: "Eski PC'lerin kurtarıcısı.", + puppy: "USB'den uçar.", + opensuse: "Enterprise quality, zero cost.", + endeavouros: "Arch, easy mode.", + kdeneon: "Fresh Plasma daily.", + debian: "Rock. Solid.", + mxlinux: "Dengeli ve güvenilir.", + kubuntu: "KDE + Ubuntu love.", + lubuntu: "Hafif ve hızlı.", + xubuntu: "Dengeli Xfce." + }; + + return quickRoasts[distroId] || "İyi seçim!"; +} diff --git a/client/src/lib/scoring.ts b/client/src/lib/scoring.ts new file mode 100644 index 0000000..cc28eef --- /dev/null +++ b/client/src/lib/scoring.ts @@ -0,0 +1,166 @@ +import distrosData from '@/data/distros.json'; + +export interface ScoredDistro { + id: string; + name: string; + score: number; + colorPalette: string[]; + tagline: string; + downloadUrl: string; + defaultDE: string; + pros: string[]; + cons: string[]; + matchReasons: string[]; +} + +export interface UserPreferences { + likedDEs: string[]; + dislikedDEs: string[]; + superLikedDEs: string[]; + nvidia: boolean; + lowRam: boolean; + gaming: boolean; + privacy: boolean; + systemdHate: boolean; + beginner: boolean; + rolling: boolean; + oldHardware: boolean; +} + +const DE_SCORES: Record = { + kde: ['cachyos', 'endeavouros', 'manjaro', 'kubuntu', 'kdeneon', 'opensuse', 'fedora', 'nobara', 'bazzite', 'garuda', 'artix', 'devuan'], + plasma: ['cachyos', 'endeavouros', 'manjaro', 'kubuntu', 'kdeneon', 'opensuse', 'fedora', 'nobara', 'bazzite', 'garuda', 'artix', 'devuan'], + gnome: ['ubuntu', 'fedora', 'popos', 'zorin', 'debian', 'tails', 'endeavouros', 'manjaro'], + xfce: ['mxlinux', 'xubuntu', 'kali', 'qubes', 'endeavouros', 'manjaro', 'devuan'], + cinnamon: ['mint', 'endeavouros', 'manjaro', 'devuan'], + mate: ['mxlinux', 'mint', 'parrot', 'ubuntu', 'endeavouros'], + lxqt: ['lubuntu', 'endeavouros', 'artix', 'devuan'], + budgie: ['endeavouros', 'manjaro', 'cachyos'], + pantheon: ['elementary'], + cosmic: ['popos'], + 'cosmic/gnome': ['popos'], + dde: ['deepin'], + deepin: ['deepin'], + i3: ['endeavouros', 'manjaro', 'garuda', 'arch', 'artix', 'void', 'cachyos', 'kali', 'qubes'], + sway: ['endeavouros', 'manjaro', 'garuda', 'arch', 'artix', 'void', 'cachyos', 'nixos', 'alpine'], + hyprland: ['cachyos', 'endeavouros', 'garuda', 'nixos', 'arch'], + 'i3/sway': ['endeavouros', 'manjaro', 'garuda', 'arch', 'artix', 'void', 'cachyos'], +}; + +export function calculateDistroScores(preferences: UserPreferences): ScoredDistro[] { + const scores: Record = {}; + const matchReasons: Record = {}; + + distrosData.distros.forEach(distro => { + scores[distro.id] = 0; + matchReasons[distro.id] = []; + }); + + preferences.superLikedDEs.forEach(de => { + const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', ''); + const matchingDistros = DE_SCORES[deKey] || []; + matchingDistros.forEach(distroId => { + scores[distroId] = (scores[distroId] || 0) + 15; + if (!matchReasons[distroId]) matchReasons[distroId] = []; + matchReasons[distroId].push(`${de} masaüstü ortamını çok beğendin`); + }); + }); + + preferences.likedDEs.forEach(de => { + const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', ''); + const matchingDistros = DE_SCORES[deKey] || []; + matchingDistros.forEach(distroId => { + scores[distroId] = (scores[distroId] || 0) + 8; + if (!matchReasons[distroId]?.some(r => r.includes(de))) { + matchReasons[distroId]?.push(`${de} desteği mevcut`); + } + }); + }); + + preferences.dislikedDEs.forEach(de => { + const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', ''); + const matchingDistros = DE_SCORES[deKey] || []; + matchingDistros.forEach(distroId => { + scores[distroId] = (scores[distroId] || 0) - 5; + }); + }); + + distrosData.criticalQuestions.forEach(question => { + const prefKey = question.id as keyof UserPreferences; + const userAnswer = preferences[prefKey]; + + if (userAnswer === true && question.impact.yes) { + question.impact.yes.boost?.forEach(distroId => { + scores[distroId] = (scores[distroId] || 0) + 10; + + const reasonMap: Record = { + nvidia: 'NVIDIA desteği mükemmel', + ram_low: 'Düşük RAM kullanımı', + gaming: 'Oyun için optimize edilmiş', + privacy: 'Gizlilik odaklı', + systemd_hate: 'Systemd kullanmıyor', + beginner: 'Yeni başlayanlar için uygun', + rolling: 'Sürekli güncel kalır', + old_hardware: 'Eski donanımda harika çalışır' + }; + + if (reasonMap[question.id] && !matchReasons[distroId]?.includes(reasonMap[question.id])) { + matchReasons[distroId]?.push(reasonMap[question.id]); + } + }); + + question.impact.yes.penalty?.forEach(distroId => { + scores[distroId] = (scores[distroId] || 0) - 8; + }); + } + }); + + distrosData.distros.forEach(distro => { + if (preferences.lowRam && distro.minRAM > 2) { + scores[distro.id] -= 10; + } + + if (preferences.nvidia && distro.nvidiaSupport === 'excellent') { + scores[distro.id] += 5; + } else if (preferences.nvidia && distro.nvidiaSupport === 'poor') { + scores[distro.id] -= 10; + } + + if (preferences.beginner && distro.difficulty === 'beginner') { + scores[distro.id] += 5; + if (!matchReasons[distro.id]?.includes('Kolay kurulum ve kullanım')) { + matchReasons[distro.id]?.push('Kolay kurulum ve kullanım'); + } + } else if (preferences.beginner && (distro.difficulty === 'advanced' || distro.difficulty === 'expert')) { + scores[distro.id] -= 15; + } + + if (!preferences.beginner && (distro.difficulty === 'advanced' || distro.difficulty === 'expert')) { + scores[distro.id] += 3; + if (!matchReasons[distro.id]?.includes('İleri düzey kullanıcılar için')) { + matchReasons[distro.id]?.push('İleri düzey kullanıcılar için'); + } + } + }); + + const sortedDistros = distrosData.distros + .map(distro => ({ + id: distro.id, + name: distro.name, + score: scores[distro.id] || 0, + colorPalette: distro.colorPalette, + tagline: distro.tagline, + downloadUrl: distro.downloadUrl, + defaultDE: distro.defaultDE, + pros: distro.pros, + cons: distro.cons, + matchReasons: (matchReasons[distro.id] || []).slice(0, 3) + })) + .sort((a, b) => b.score - a.score); + + return sortedDistros.slice(0, 3); +} + +export function getTopDistros(preferences: UserPreferences): ScoredDistro[] { + return calculateDistroScores(preferences); +} diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index d7565f1..3262f42 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -1,28 +1,17 @@ -import { useState, useEffect } from 'react'; +import { useEffect } from 'react'; import Header from '@/components/Header'; -import CardStack from '@/components/CardStack'; -import DynamicBackground from '@/components/DynamicBackground'; -import { distroCards } from '@/data/distros'; +import DistroMatch from '@/components/DistroMatch'; export default function Home() { - const [backgroundColors, setBackgroundColors] = useState( - distroCards[0]?.colorPalette || ['#6B46C1', '#4F46E5', '#2563EB'] - ); - useEffect(() => { document.documentElement.classList.add('dark'); }, []); return (
-
- -
- +
+
);