import React, { useState, useRef } from 'react'; import { motion, AnimatePresence } from 'motion/react'; import { FileSearch, Upload, ChevronRight, CheckCircle2, AlertCircle, RefreshCcw, FileText, ExternalLink, Zap, ShieldCheck, Search, BookOpen } from 'lucide-react'; import { checkPlagiarism, PlagiarismResult } from './services/gemini'; export default function App() { const [text, setText] = useState(''); const [isLoading, setIsLoading] = useState(false); const [result, setResult] = useState(null); const [error, setError] = useState(null); const fileInputRef = useRef(null); const handleCheck = async () => { if (!text.trim()) { setError('Please enter some text to check.'); return; } setIsLoading(true); setError(null); try { const data = await checkPlagiarism(text); setResult(data); } catch (err) { console.error(err); setError(err instanceof Error ? err.message : 'Analysis failed. Please try again.'); } finally { setIsLoading(false); } }; const clearAll = () => { setText(''); setResult(null); setError(null); }; const handleFileUpload = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; if (file) { const reader = new FileReader(); reader.onload = (event) => { const content = event.target?.result as string; setText(content); }; reader.readAsText(file); } }; return (
{/* Background Elements */}
{/* Navigation */}
{/* Left Column: Input */}
Powered by Neural Intelligence

Integrity is
Non-Negotiable

Deploy advanced forensic analysis to verify content originality with 99.9% precision.

Document Input