Spaces:
Running
Running
full dark migration: CSS overrides for all legacy classes, framer-motion animations across every page/component, rebrand to Bio Nexus
Browse filesFiles changed (25)
- bioai-platform/backend/app/main.py+1-1
- bioai-platform/frontend/src/app/(auth)/auth/callback/page.tsx+6-4
- bioai-platform/frontend/src/app/(auth)/auth/page.tsx+4-2
- bioai-platform/frontend/src/app/(dashboard)/analyze/blast/page.tsx+22-18
- bioai-platform/frontend/src/app/(dashboard)/analyze/page.tsx+8-4
- bioai-platform/frontend/src/app/(dashboard)/dashboard/page.tsx+32-29
- bioai-platform/frontend/src/app/(dashboard)/history/page.tsx+9-6
- bioai-platform/frontend/src/app/(dashboard)/jobs/[jobId]/page.tsx+38-28
- bioai-platform/frontend/src/app/(dashboard)/jobs/page.tsx+7-2
- bioai-platform/frontend/src/app/(dashboard)/layout.tsx+1-2
- bioai-platform/frontend/src/app/(dashboard)/settings/page.tsx+20-18
- bioai-platform/frontend/src/app/globals.css+81
- bioai-platform/frontend/src/app/page.tsx+4-5
- bioai-platform/frontend/src/app/shared/[token]/page.tsx+14-8
- bioai-platform/frontend/src/components/GuestBanner.tsx+4-2
- bioai-platform/frontend/src/components/SequenceRetrieval.tsx+34-31
- bioai-platform/frontend/src/components/pipeline/JobProgress.tsx+6-4
- bioai-platform/frontend/src/components/pipeline/PipelineSelector.tsx+28-25
- bioai-platform/frontend/src/components/pipeline/SequenceInput.tsx+4-2
- bioai-platform/frontend/src/components/results/AIInterpretation.tsx+8-6
- bioai-platform/frontend/src/components/results/BlastPanel.tsx+8-6
- bioai-platform/frontend/src/components/results/ScoreBars.tsx+4-2
- bioai-platform/frontend/src/components/results/StructureViewer.tsx+6-4
- bioai-platform/frontend/src/components/results/UniprotPanel.tsx+4-2
- bioai-platform/frontend/src/lib/animations.tsAdded+17
16 unmodified lines1718192021222316 unmodified lineslimiter = Limiter(key_func=get_remote_address, default_limits=["30/minute"])app = FastAPI(title="Bio Nexus API", version="0.1.0")app.state.limiter = limiterapp.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)16 unmodified lines1718192021222316 unmodified lineslimiter = Limiter(key_func=get_remote_address, default_limits=["30/minute"])app = FastAPI(title="Bio Nexus API", version="0.2.0")app.state.limiter = limiterapp.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
4 unmodified lines567891025 unmodified lines363738394041424344453 unmodified lines495051525354555657584 unmodified linesimport { Loader2 } from 'lucide-react';import { getSupabase } from '@/lib/supabase';import { ThemeToggle } from '@/components/ThemeToggle';export default function AuthCallback() {const router = useRouter();25 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><div className="bg-white rounded-2xl border border-red-200 p-8 max-w-sm text-center"><h2 className="text-lg font-semibold text-red-900 mb-2">Sign in failed</h2><p className="text-sm text-red-600">{error}</p></div></div>);}3 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><div className="text-center"><Loader2 className="w-8 h-8 text-teal-600 animate-spin mx-auto mb-4" /><p className="text-sm text-gray-500">Completing sign in...</p></div></div>);}4 unmodified lines5678910111225 unmodified lines383940414243444546473 unmodified lines515253545556575859604 unmodified linesimport { Loader2 } from 'lucide-react';import { getSupabase } from '@/lib/supabase';import { ThemeToggle } from '@/components/ThemeToggle';import { motion } from 'framer-motion';import { fadeUp } from '@/lib/animations';export default function AuthCallback() {const router = useRouter();25 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><motion.div variants={fadeUp} initial="hidden" animate="show" className="bg-white rounded-2xl border border-red-200 p-8 max-w-sm text-center"><h2 className="text-lg font-semibold text-red-900 mb-2">Sign in failed</h2><p className="text-sm text-red-600">{error}</p></motion.div></div>);}3 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><motion.div variants={fadeUp} initial="hidden" animate="show" className="text-center"><Loader2 className="w-8 h-8 text-teal-600 animate-spin mx-auto mb-4" /><p className="text-sm text-gray-500">Completing sign in...</p></motion.div></div>);}
4 unmodified lines567891021 unmodified lines3233343536373837 unmodified lines767778798081824 unmodified linesimport { Dna, Loader2 } from 'lucide-react';import { useAuth } from '@/contexts/auth';import { ThemeToggle } from '@/components/ThemeToggle';export default function AuthPage() {const { user, loading, signIn, isGuest } = useAuth();21 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><div className="bg-white rounded-2xl border border-gray-200 p-8 w-full max-w-sm shadow-sm"><div className="flex items-center gap-2 justify-center mb-6"><Dna className="w-8 h-8 text-teal-600" /><span className="text-xl font-bold text-gray-900">Bio Nexus</span>37 unmodified linesFree for academic researchers. No spam, ever.<br />Guest results are saved for 24 hours.</p></div></div>);}4 unmodified lines5678910111221 unmodified lines3435363738394037 unmodified lines787980818283844 unmodified linesimport { Dna, Loader2 } from 'lucide-react';import { useAuth } from '@/contexts/auth';import { ThemeToggle } from '@/components/ThemeToggle';import { motion } from 'framer-motion';import { fadeUp } from '@/lib/animations';export default function AuthPage() {const { user, loading, signIn, isGuest } = useAuth();21 unmodified lines<div className="absolute top-4 right-4"><ThemeToggle compact /></div><motion.div variants={fadeUp} initial="hidden" animate="show" className="bg-white rounded-2xl border border-gray-200 p-8 w-full max-w-sm shadow-sm"><div className="flex items-center gap-2 justify-center mb-6"><Dna className="w-8 h-8 text-teal-600" /><span className="text-xl font-bold text-gray-900">Bio Nexus</span>37 unmodified linesFree for academic researchers. No spam, ever.<br />Guest results are saved for 24 hours.</p></motion.div></div>);}
6 unmodified lines789101112142 unmodified lines1551561571581591601617 unmodified lines16917017117217317417517617717819 unmodified lines1981992002012022032041 unmodified line2062072082092102112124 unmodified lines2172182192202212222237 unmodified lines23123223323423523623723823924 unmodified lines26426526626726826927035 unmodified lines3063073083093103113123 unmodified lines31631731831932032132232332432532632732832933033133233333427 unmodified lines3623633643653663673682 unmodified lines3713723733743753763773 unmodified lines3813823833843853863873883896 unmodified linesimport { runPipeline, fetchSequence, validateSequence } from '@/lib/api';import { extractErrorMessage, extractErrorStatus } from '@/lib/errors';import type { SequenceResult, SequenceValidation, SequenceType } from '@/types/pipeline';const SAMPLES = [{142 unmodified linesChoose a different operation</button><div className="flex items-center gap-3 mb-8">{[1, 2, 3].map((s) => (<div key={s} className="flex items-center gap-3"><div className={`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${7 unmodified lines{s < 3 && <ChevronRight className="w-4 h-4 text-gray-300" />}</div>))}</div>{step === 2 && (<div className="space-y-6"><div><h2 className="text-lg font-semibold text-gray-900 mb-1">Enter your sequence</h2><p className="text-sm text-gray-500">19 unmodified lines</div>{inputMode === 'paste' ? (<div className="bg-white rounded-2xl border border-gray-200 p-5"><textareavalue={rawInput}onChange={(e) => setRawInput(e.target.value)}1 unmodified lineclassName="w-full h-40 px-4 py-3 rounded-xl border border-gray-300 focus:border-teal-500 focus:ring-2 focus:ring-teal-200 outline-none transition font-mono text-sm text-gray-900 resize-none"/><div className="flex items-center justify-between mt-4"><div className="flex items-center gap-3">{SAMPLES.map((s) => (<buttonkey={s.label}4 unmodified linesLoad {s.label}</button>))}</div>{detectedType && (<div className="flex items-center gap-2"><span className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${7 unmodified lines</div>)}</div></div>) : (<div className="bg-white rounded-2xl border border-gray-200 p-5 space-y-4"><div className="flex gap-3"><inputtype="text"24 unmodified lines<p className="text-xs text-teal-600 mt-1">{accessionResult.organism} · {accessionResult.length} residues</p></div>)}</div>)}<div className="border-t border-gray-200 pt-4">35 unmodified lines</div><div className="flex justify-end"><buttononClick={() => setStep(3)}disabled={(inputMode === 'paste' && !rawInput.trim()) ||3 unmodified lines>Continue<ChevronRight className="w-4 h-4" /></button></div></div>)}{step === 3 && (<div className="space-y-6"><div><h2 className="text-lg font-semibold text-gray-900 mb-1">Confirm and run</h2><p className="text-sm text-gray-500">Review your analysis settings before submitting.</p></div><div className="bg-white rounded-2xl border border-gray-200 p-6 space-y-4"><div className="flex items-center gap-3 pb-4 border-b border-gray-100"><Search className="w-5 h-5 text-teal-600" /><div>27 unmodified lines<div className="pt-2 text-xs text-gray-500"><p>BLAST searches against NCBI nr typically take 30s–5min. Your results will be saved and you can return to them later.</p></div></div><div className="flex items-center justify-between"><button2 unmodified lines>← Change input</button><buttononClick={handleSubmit}disabled={submitting}className="px-8 py-3 bg-teal-600 text-white font-medium rounded-xl hover:bg-teal-700 transition disabled:opacity-50 flex items-center gap-2"3 unmodified lines) : ('Run Analysis')}</button></div></div>)}</div>);6 unmodified lines7891011121314142 unmodified lines1571581591601611621637 unmodified lines17117217317417517617717817918019 unmodified lines2002012022032042052061 unmodified line2082092102112122132144 unmodified lines2192202212222232242257 unmodified lines23323423523623723823924024124 unmodified lines26626726826927027127235 unmodified lines3083093103113123133143153 unmodified lines31932032132232332432532632732832933033133233333433533633727 unmodified lines3653663673683693703712 unmodified lines3743753763773783793803813 unmodified lines3853863873883893903913923936 unmodified linesimport { runPipeline, fetchSequence, validateSequence } from '@/lib/api';import { extractErrorMessage, extractErrorStatus } from '@/lib/errors';import type { SequenceResult, SequenceValidation, SequenceType } from '@/types/pipeline';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';const SAMPLES = [{142 unmodified linesChoose a different operation</button><motion.div variants={fadeUp} initial="hidden" animate="visible" className="flex items-center gap-3 mb-8">{[1, 2, 3].map((s) => (<div key={s} className="flex items-center gap-3"><div className={`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${7 unmodified lines{s < 3 && <ChevronRight className="w-4 h-4 text-gray-300" />}</div>))}</motion.div>{step === 2 && (<motion.div variants={fadeUp} initial="hidden" animate="visible" className="space-y-6"><div><h2 className="text-lg font-semibold text-gray-900 mb-1">Enter your sequence</h2><p className="text-sm text-gray-500">19 unmodified lines</div>{inputMode === 'paste' ? (<motion.div variants={fadeUp} initial="hidden" animate="visible" className="bg-white rounded-2xl border border-gray-200 p-5"><textareavalue={rawInput}onChange={(e) => setRawInput(e.target.value)}1 unmodified lineclassName="w-full h-40 px-4 py-3 rounded-xl border border-gray-300 focus:border-teal-500 focus:ring-2 focus:ring-teal-200 outline-none transition font-mono text-sm text-gray-900 resize-none"/><div className="flex items-center justify-between mt-4"><motion.div variants={fadeUp} initial="hidden" animate="visible" className="flex items-center gap-3">{SAMPLES.map((s) => (<buttonkey={s.label}4 unmodified linesLoad {s.label}</button>))}</motion.div>{detectedType && (<div className="flex items-center gap-2"><span className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${7 unmodified lines</div>)}</div></motion.div>) : (<motion.div variants={fadeUp} initial="hidden" animate="visible" className="bg-white rounded-2xl border border-gray-200 p-5 space-y-4"><div className="flex gap-3"><inputtype="text"24 unmodified lines<p className="text-xs text-teal-600 mt-1">{accessionResult.organism} · {accessionResult.length} residues</p></div>)}</motion.div>)}<div className="border-t border-gray-200 pt-4">35 unmodified lines</div><div className="flex justify-end"><motion.buttonwhileHover={{ scale: 1.02 }}onClick={() => setStep(3)}disabled={(inputMode === 'paste' && !rawInput.trim()) ||3 unmodified lines>Continue<ChevronRight className="w-4 h-4" /></motion.button></div></motion.div>)}{step === 3 && (<motion.div variants={fadeUp} initial="hidden" animate="visible" className="space-y-6"><div><h2 className="text-lg font-semibold text-gray-900 mb-1">Confirm and run</h2><p className="text-sm text-gray-500">Review your analysis settings before submitting.</p></div><motion.div variants={fadeUp} initial="hidden" animate="visible" className="bg-white rounded-2xl border border-gray-200 p-6 space-y-4"><div className="flex items-center gap-3 pb-4 border-b border-gray-100"><Search className="w-5 h-5 text-teal-600" /><div>27 unmodified lines<div className="pt-2 text-xs text-gray-500"><p>BLAST searches against NCBI nr typically take 30s–5min. Your results will be saved and you can return to them later.</p></div></motion.div><div className="flex items-center justify-between"><button2 unmodified lines>← Change input</button><motion.buttonwhileHover={{ scale: 1.02 }}onClick={handleSubmit}disabled={submitting}className="px-8 py-3 bg-teal-600 text-white font-medium rounded-xl hover:bg-teal-700 transition disabled:opacity-50 flex items-center gap-2"3 unmodified lines) : ('Run Analysis')}</motion.button></div></motion.div>)}</div>);
1 unmodified line23456751 unmodified lines5960616263646566676869707125 unmodified lines9798991001011021031041051 unmodified lineimport { useRouter } from 'next/navigation';import { Dna, Layout, Search, Globe, GitBranch, Beaker } from 'lucide-react';const operations = [{51 unmodified linesreturn (<div><h1 className="text-2xl font-bold text-gray-900 mb-1">What do you want to do?</h1><p className="text-gray-500 mb-8">Choose an operation to get started with your analysis.</p><div className="grid md:grid-cols-2 gap-4">{operations.map((op) => {const Icon = op.icon;return (<buttonkey={op.id}onClick={() => op.active && router.push(`/analyze/${op.id}`)}25 unmodified lines</div></div></button>);})}</div></div>);}1 unmodified line2345678951 unmodified lines616263646566676869707172737425 unmodified lines1001011021031041051061071081091 unmodified lineimport { useRouter } from 'next/navigation';import { Dna, Layout, Search, Globe, GitBranch, Beaker } from 'lucide-react';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';const operations = [{51 unmodified linesreturn (<div><motion.h1 variants={fadeUp} className="text-2xl font-bold text-gray-900 mb-1">What do you want to do?</motion.h1><motion.p variants={fadeUp} className="text-gray-500 mb-8">Choose an operation to get started with your analysis.</motion.p><motion.div variants={stagger} initial="hidden" whileInView="show" viewport={{ once: true, margin: '-40px' }} className="grid md:grid-cols-2 gap-4">{operations.map((op) => {const Icon = op.icon;return (<motion.div variants={fadeUp} whileHover={op.active ? cardHover : undefined}><buttonkey={op.id}onClick={() => op.active && router.push(`/analyze/${op.id}`)}25 unmodified lines</div></div></button></motion.div>);})}</motion.div></div>);}
1 unmodified line23456747 unmodified lines5556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181194 unmodified lines1241251261271281291301 unmodified lineimport { useEffect, useState } from 'react';import Link from 'next/link';import { Loader2, Dna, Play, Clock, CheckCircle, XCircle, FileText, TrendingUp, BarChart3 } from 'lucide-react';import { getJobs, getJobCount } from '@/lib/api';import { useAuth } from '@/contexts/auth';47 unmodified lines</p></div><div className="grid grid-cols-2 md:grid-cols-4 gap-4">{[{ icon: BarChart3, label: 'Total Jobs', value: jobs.length, color: 'text-teal-600', bg: 'bg-teal-50' },{ icon: CheckCircle, label: 'Completed', value: completedCount, color: 'text-teal-600', bg: 'bg-teal-50' },{ icon: TrendingUp, label: 'Today', value: usage.count, color: 'text-blue-600', bg: 'bg-blue-50' },{ icon: XCircle, label: 'Failed', value: failedCount, color: 'text-red-500', bg: 'bg-red-50' },].map((s) => (<div key={s.label} className="bg-white rounded-xl border border-gray-200 p-4"><div className={`w-8 h-8 ${s.bg} rounded-lg flex items-center justify-center mb-2`}><s.icon className={`w-4 h-4 ${s.color}`} /></div><div className="text-2xl font-bold text-gray-900">{s.value}</div><div className="text-xs text-gray-500">{s.label}</div></div>))}</div><div><div className="flex items-center justify-between mb-4"><h2 className="text-lg font-semibold text-gray-900">Recent Activity</h2>{jobs.length > 0 && (<Link href="/jobs" className="text-sm text-teal-600 hover:text-teal-700 font-medium">View all</Link>)}</div>{recentJobs.length > 0 ? (<div className="space-y-3">{recentJobs.map((job) => {const Icon = STATUS_ICONS[job.status] || Clock;const color = STATUS_COLORS[job.status] || 'text-gray-400';const label = job.current_step_label || STEP_LABELS[job.status as keyof typeof STEP_LABELS] || job.status;return (<Linkkey={job.id}href={`/jobs/${job.id}`}className="block bg-white rounded-xl border border-gray-200 p-4 hover:border-teal-300 hover:shadow-sm transition"><div className="flex items-center gap-3"><div className={`w-8 h-8 rounded-lg flex items-center justify-center ${job.status === 'complete' ? 'bg-teal-50' : job.status === 'failed' ? 'bg-red-50' : 'bg-gray-50'}`}><Icon className={`w-4 h-4 ${color}`} /></div><div className="flex-1 min-w-0"><p className="text-sm font-medium text-gray-900 truncate">{label}</p>{job.context_json?.query?.sequence && (<p className="text-xs text-gray-500 truncate mt-0.5">{job.context_json.query.sequence.slice(0, 80)}...</p>)}</div><div className="text-xs text-gray-400 shrink-0">{new Date(job.created_at || Date.now()).toLocaleDateString()}</div></div></Link>);})}</div>) : (<div className="bg-white rounded-2xl border border-gray-200 p-12 text-center"><Dna className="w-12 h-12 text-gray-200 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">Run your first analysis</h3><p className="text-sm text-gray-500 mb-6">Submit a protein sequence to BLAST, get annotations, structure data, and AI-powered interpretation.</p>4 unmodified lines<Play className="w-4 h-4" />Start Analysis</Link></div>)}</div></div>1 unmodified line2345678947 unmodified lines575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211224 unmodified lines1271281291301311321331 unmodified lineimport { useEffect, useState } from 'react';import Link from 'next/link';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';import { Loader2, Dna, Play, Clock, CheckCircle, XCircle, FileText, TrendingUp, BarChart3 } from 'lucide-react';import { getJobs, getJobCount } from '@/lib/api';import { useAuth } from '@/contexts/auth';47 unmodified lines</p></div><motion.div variants={stagger} initial="hidden" animate="show" className="grid grid-cols-2 md:grid-cols-4 gap-4">{[{ icon: BarChart3, label: 'Total Jobs', value: jobs.length, color: 'text-teal-600', bg: 'bg-teal-50' },{ icon: CheckCircle, label: 'Completed', value: completedCount, color: 'text-teal-600', bg: 'bg-teal-50' },{ icon: TrendingUp, label: 'Today', value: usage.count, color: 'text-blue-600', bg: 'bg-blue-50' },{ icon: XCircle, label: 'Failed', value: failedCount, color: 'text-red-500', bg: 'bg-red-50' },].map((s) => (<motion.div key={s.label} variants={fadeUp} whileHover={cardHover} className="bg-white rounded-xl border border-gray-200 p-4"><div className={`w-8 h-8 ${s.bg} rounded-lg flex items-center justify-center mb-2`}><s.icon className={`w-4 h-4 ${s.color}`} /></div><div className="text-2xl font-bold text-gray-900">{s.value}</div><div className="text-xs text-gray-500">{s.label}</div></motion.div>))}</motion.div><div><motion.div variants={fadeUp} className="flex items-center justify-between mb-4"><h2 className="text-lg font-semibold text-gray-900">Recent Activity</h2>{jobs.length > 0 && (<Link href="/jobs" className="text-sm text-teal-600 hover:text-teal-700 font-medium">View all</Link>)}</motion.div>{recentJobs.length > 0 ? (<motion.div variants={stagger} initial="hidden" animate="show" className="space-y-3">{recentJobs.map((job) => {const Icon = STATUS_ICONS[job.status] || Clock;const color = STATUS_COLORS[job.status] || 'text-gray-400';const label = job.current_step_label || STEP_LABELS[job.status as keyof typeof STEP_LABELS] || job.status;return (<motion.div key={job.id} variants={fadeUp}><Linkhref={`/jobs/${job.id}`}className="block bg-white rounded-xl border border-gray-200 p-4 hover:border-teal-300 hover:shadow-sm transition"><div className="flex items-center gap-3"><div className={`w-8 h-8 rounded-lg flex items-center justify-center ${job.status === 'complete' ? 'bg-teal-50' : job.status === 'failed' ? 'bg-red-50' : 'bg-gray-50'}`}><Icon className={`w-4 h-4 ${color}`} /></div><div className="flex-1 min-w-0"><p className="text-sm font-medium text-gray-900 truncate">{label}</p>{job.context_json?.query?.sequence && (<p className="text-xs text-gray-500 truncate mt-0.5">{job.context_json.query.sequence.slice(0, 80)}...</p>)}</div><div className="text-xs text-gray-400 shrink-0">{new Date(job.created_at || Date.now()).toLocaleDateString()}</div></div></Link></motion.div>);})}</motion.div>) : (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-12 text-center"><Dna className="w-12 h-12 text-gray-200 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">Run your first analysis</h3><p className="text-sm text-gray-500 mb-6">Submit a protein sequence to BLAST, get annotations, structure data, and AI-powered interpretation.</p>4 unmodified lines<Play className="w-4 h-4" />Start Analysis</Link></motion.div>)}</div></div>
3 unmodified lines45678946 unmodified lines565758596061623 unmodified lines6667686970717273747511 unmodified lines87888990919293949596973 unmodified linesimport { useRouter } from "next/navigation";import { getJobs } from "@/lib/api";import type { JobStatus } from "@/types/pipeline";const STATUS_STYLES: Record<string, string> = {complete: "bg-teal-100 text-teal-800",46 unmodified linesreturn (<div className="p-6 max-w-4xl"><h1 className="text-xl font-semibold mb-5">Analysis history</h1><div className="rounded-xl border border-gray-200 overflow-hidden"><table className="w-full text-sm"><thead><tr className="bg-gray-50 border-b border-gray-200">3 unmodified lines<th className="px-4 py-3 text-left font-medium text-gray-600 hidden sm:table-cell">Created</th></tr></thead><tbody>{jobs.map((job) => (<trkey={job.id}onClick={() => router.push(`/results/${job.id}`)}className="border-b border-gray-100 hover:bg-gray-50 cursor-pointer transition-colors last:border-0">11 unmodified lines<td className="px-4 py-3 text-gray-400 text-xs hidden sm:table-cell">{new Date(job.created_at).toLocaleString("en-IN", { dateStyle: "short", timeStyle: "short" })}</td></tr>))}</tbody></table></div></div>);}3 unmodified lines456789101146 unmodified lines585960616263643 unmodified lines686970717273747576777811 unmodified lines909192939495969798991003 unmodified linesimport { useRouter } from "next/navigation";import { getJobs } from "@/lib/api";import type { JobStatus } from "@/types/pipeline";import { motion } from "framer-motion";import { fadeUp, stagger, fadeIn } from "@/lib/animations";const STATUS_STYLES: Record<string, string> = {complete: "bg-teal-100 text-teal-800",46 unmodified linesreturn (<div className="p-6 max-w-4xl"><h1 className="text-xl font-semibold mb-5">Analysis history</h1><motion.div variants={fadeIn} initial="hidden" animate="show" className="rounded-xl border border-gray-200 overflow-hidden"><table className="w-full text-sm"><thead><tr className="bg-gray-50 border-b border-gray-200">3 unmodified lines<th className="px-4 py-3 text-left font-medium text-gray-600 hidden sm:table-cell">Created</th></tr></thead><motion.tbody variants={stagger} initial="hidden" animate="show">{jobs.map((job) => (<motion.trkey={job.id}variants={fadeUp}onClick={() => router.push(`/results/${job.id}`)}className="border-b border-gray-100 hover:bg-gray-50 cursor-pointer transition-colors last:border-0">11 unmodified lines<td className="px-4 py-3 text-gray-400 text-xs hidden sm:table-cell">{new Date(job.created_at).toLocaleString("en-IN", { dateStyle: "short", timeStyle: "short" })}</td></motion.tr>))}</motion.tbody></table></motion.div></div>);}
11 unmodified lines12131415161743 unmodified lines6162636465666768697071727374757677788 unmodified lines878889909192939495969798991001011021032 unmodified lines10610710810911011111249 unmodified lines16216316416516616716860 unmodified lines2292302312322332342352366 unmodified lines24324424524624724824925025125225325415 unmodified lines27027127227327427527627727827928028128228328428528628728828929029129229329419 unmodified lines31431531631731831911 unmodified linesimport { UniprotPanel } from '@/components/results/UniprotPanel';import { AlphaFoldViewer } from '@/components/AlphaFoldViewer';import { getJob } from '@/lib/api';const STATUS_ORDER: JobStepStatus[] = ['queued', 'submitted_to_ncbi', 'polling_ncbi', 'parsing', 'interpreting', 'fetching_alphafold', 'complete',43 unmodified linesif (loading && !job && !timedOut) {return (<div className="flex items-center justify-center py-20"><div className="text-center"><Loader2 className="w-8 h-8 text-teal-500 animate-spin mx-auto mb-4" /><p className="text-sm text-gray-500">Loading job...</p></div></div>);}if (!job && timedOut) {return (<div className="max-w-xl mx-auto py-12"><div className="bg-white rounded-2xl border border-gray-200 p-8 text-center"><Clock className="w-12 h-12 text-amber-500 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">Still processing</h3>8 unmodified linesRefresh</button></div></div>);}if (!job) {return (<div className="bg-white rounded-2xl border border-gray-200 p-16 text-center"><Dna className="w-16 h-16 text-gray-200 mx-auto mb-6" /><h3 className="text-xl font-semibold text-gray-900 mb-2">Job not found</h3><p className="text-sm text-gray-500">This job does not exist or has been deleted.</p></div>);}2 unmodified linesif (isActive) {return (<div className="max-w-xl mx-auto py-12"><div className="bg-white rounded-2xl border border-gray-200 p-8 text-center">{pollError ? (<div className="mb-6">49 unmodified lines</p></div></div></div>);}60 unmodified linesconst hasHits = context.blast && context.blast.hits && context.blast.hits.length > 0;return (<div className="space-y-6"><div className="flex items-center justify-between"><div><h1 className="text-2xl font-bold text-gray-900 mb-1">Analysis Results</h1><p className="text-sm text-gray-500">6 unmodified lines>Share</button></div><AIInterpretation context={context} pipelineType={job.pipeline_type} />{!hasHits ? (<div className="bg-white rounded-2xl border border-gray-200 p-10 text-center"><Search className="w-12 h-12 text-gray-200 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">No significant similarity found</h3><p className="text-sm text-gray-500 max-w-md mx-auto">15 unmodified lines>New Analysis</button></div>) : (<><div className="grid lg:grid-cols-2 gap-6"><BlastPanelhits={context.blast.hits}count={context.blast.count}source={context.blast?.source ?? 'NCBI BLAST'}/>{context.uniprot && <UniprotPanel data={context.uniprot} />}</div><ScoreBars hits={context.blast.hits} />{context.alphafold && context.alphafold.structure_available && (<AlphaFoldViewerpdbUrl={context.alphafold.pdb_url}uniprotId={context.alphafold.uniprot_accession}/>)}<div className="flex items-center gap-3 pt-2">19 unmodified lines</div></>)}</div>);}11 unmodified lines121314151617181943 unmodified lines6364656667686970717273747576777879808 unmodified lines89909192939495969798991001011021031041052 unmodified lines10810911011111211311449 unmodified lines16416516616716816917060 unmodified lines2312322332342352362372386 unmodified lines24524624724824925025125225325425525625725815 unmodified lines27427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330419 unmodified lines32432532632732832911 unmodified linesimport { UniprotPanel } from '@/components/results/UniprotPanel';import { AlphaFoldViewer } from '@/components/AlphaFoldViewer';import { getJob } from '@/lib/api';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';const STATUS_ORDER: JobStepStatus[] = ['queued', 'submitted_to_ncbi', 'polling_ncbi', 'parsing', 'interpreting', 'fetching_alphafold', 'complete',43 unmodified linesif (loading && !job && !timedOut) {return (<motion.div variants={fadeUp} initial="hidden" animate="show" className="flex items-center justify-center py-20"><div className="text-center"><Loader2 className="w-8 h-8 text-teal-500 animate-spin mx-auto mb-4" /><p className="text-sm text-gray-500">Loading job...</p></div></motion.div>);}if (!job && timedOut) {return (<motion.div variants={fadeUp} initial="hidden" animate="show" className="max-w-xl mx-auto py-12"><div className="bg-white rounded-2xl border border-gray-200 p-8 text-center"><Clock className="w-12 h-12 text-amber-500 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">Still processing</h3>8 unmodified linesRefresh</button></div></motion.div>);}if (!job) {return (<motion.div variants={fadeUp} initial="hidden" animate="show" className="bg-white rounded-2xl border border-gray-200 p-16 text-center"><Dna className="w-16 h-16 text-gray-200 mx-auto mb-6" /><h3 className="text-xl font-semibold text-gray-900 mb-2">Job not found</h3><p className="text-sm text-gray-500">This job does not exist or has been deleted.</p></motion.div>);}2 unmodified linesif (isActive) {return (<motion.div variants={fadeUp} initial="hidden" animate="show" className="max-w-xl mx-auto py-12"><div className="bg-white rounded-2xl border border-gray-200 p-8 text-center">{pollError ? (<div className="mb-6">49 unmodified lines</p></div></div></motion.div>);}60 unmodified linesconst hasHits = context.blast && context.blast.hits && context.blast.hits.length > 0;return (<motion.div variants={stagger} initial="hidden" animate="show" className="space-y-6"><motion.div variants={fadeUp} className="flex items-center justify-between"><div><h1 className="text-2xl font-bold text-gray-900 mb-1">Analysis Results</h1><p className="text-sm text-gray-500">6 unmodified lines>Share</button></motion.div><motion.div variants={fadeUp} whileHover={cardHover}><AIInterpretation context={context} pipelineType={job.pipeline_type} /></motion.div>{!hasHits ? (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-10 text-center"><Search className="w-12 h-12 text-gray-200 mx-auto mb-4" /><h3 className="text-lg font-semibold text-gray-900 mb-2">No significant similarity found</h3><p className="text-sm text-gray-500 max-w-md mx-auto">15 unmodified lines>New Analysis</button></motion.div>) : (<><motion.div variants={fadeUp} whileHover={cardHover}><div className="grid lg:grid-cols-2 gap-6"><BlastPanelhits={context.blast.hits}count={context.blast.count}source={context.blast?.source ?? 'NCBI BLAST'}/>{context.uniprot && <UniprotPanel data={context.uniprot} />}</div></motion.div><motion.div variants={fadeUp} whileHover={cardHover}><ScoreBars hits={context.blast.hits} /></motion.div>{context.alphafold && context.alphafold.structure_available && (<motion.div variants={fadeUp} whileHover={cardHover}><AlphaFoldViewerpdbUrl={context.alphafold.pdb_url}uniprotId={context.alphafold.uniprot_accession}/></motion.div>)}<div className="flex items-center gap-3 pt-2">19 unmodified lines</div></>)}</motion.div>);}
1 unmodified line23456758 unmodified lines666768697071722 unmodified lines7576777879801 unmodified line828384858687888922 unmodified lines1121131141151161171181191 unmodified lineimport { useEffect, useState } from 'react';import Link from 'next/link';import { Loader2, Dna, FileText, AlertCircle, Clock, CheckCircle, XCircle } from 'lucide-react';import { getJobs } from '@/lib/api';import type { JobStatus } from '@/types/pipeline';58 unmodified linesreturn (<div className="space-y-4"><div className="flex items-center justify-between"><h1 className="text-2xl font-bold text-gray-900">Your Jobs</h1><Linkhref="/analyze"className="px-4 py-2 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition"2 unmodified lines</Link></div>{jobs.map((job) => {const Icon = STATUS_ICONS[job.status] || Clock;const color = STATUS_COLORS[job.status] || 'text-gray-400';1 unmodified lineconst isComplete = job.status === 'complete';return (<Linkkey={job.id}href={`/jobs/${job.id}`}className="block bg-white rounded-2xl border border-gray-200 p-5 hover:border-teal-300 hover:shadow-sm transition">22 unmodified lines</div></div></Link>);})}</div>);}1 unmodified line2345678958 unmodified lines686970717273742 unmodified lines777879808182831 unmodified line858687888990919222 unmodified lines1151161171181191201211221231241 unmodified lineimport { useEffect, useState } from 'react';import Link from 'next/link';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';import { Loader2, Dna, FileText, AlertCircle, Clock, CheckCircle, XCircle } from 'lucide-react';import { getJobs } from '@/lib/api';import type { JobStatus } from '@/types/pipeline';58 unmodified linesreturn (<div className="space-y-4"><div className="flex items-center justify-between"><motion.h1 variants={fadeUp} className="text-2xl font-bold text-gray-900">Your Jobs</motion.h1><Linkhref="/analyze"className="px-4 py-2 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition"2 unmodified lines</Link></div><motion.div variants={stagger} initial="hidden" whileInView="show" viewport={{ once: true, margin: '-40px' }}>{jobs.map((job) => {const Icon = STATUS_ICONS[job.status] || Clock;const color = STATUS_COLORS[job.status] || 'text-gray-400';1 unmodified lineconst isComplete = job.status === 'complete';return (<motion.div key={job.id} variants={fadeUp} whileHover={cardHover}><Linkhref={`/jobs/${job.id}`}className="block bg-white rounded-2xl border border-gray-200 p-5 hover:border-teal-300 hover:shadow-sm transition">22 unmodified lines</div></div></Link></motion.div>);})}</motion.div></div>);}
65 unmodified lines666768697071727365 unmodified linesexit="hidden"className="font-display text-sm font-semibold overflow-hidden whitespace-nowrap">Bio<span className="text-gradient">Flow</span><span className="text-accent-cyan">_</span>AI</motion.span>)}</AnimatePresence>65 unmodified lines6667686970717265 unmodified linesexit="hidden"className="font-display text-sm font-semibold overflow-hidden whitespace-nowrap">Bio <span className="text-gradient">Nexus</span></motion.span>)}</AnimatePresence>
2 unmodified lines34567841 unmodified lines505152535455565758596018 unmodified lines79808182838485868712 unmodified lines1001011021031041051061071083 unmodified lines11211311411511611711811912011 unmodified lines1321331341351361371381391403 unmodified lines1441451461471481491501511523 unmodified lines1561571581591601611621631643 unmodified lines1681691701711721731741752 unmodified linesimport { useState, useEffect } from 'react';import axios from 'axios';import toast from 'react-hot-toast';import { User, BarChart3, Bell, Key, Shield, Loader2, Save, Sun, Moon } from 'lucide-react';import { useTheme } from '@/contexts/theme';41 unmodified linesreturn (<div className="max-w-3xl"><h1 className="text-2xl font-bold text-gray-900 mb-2">Settings</h1><p className="text-gray-600 mb-8">Manage your account and preferences</p><div className="space-y-8"><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><User className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Account</h2>18 unmodified linesSave changes</button></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><BarChart3 className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Usage</h2>12 unmodified lines<p className="text-xs text-gray-500 mt-1">Current plan</p></div></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Bell className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Notifications</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in a future update</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Email notifications for completed analyses and weekly summaries.</p></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Sun className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Appearance</h2>11 unmodified lines{theme === 'dark' ? 'Light mode' : 'Dark mode'}</button></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Key className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">API Access</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in Phase 2</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Programmatic API access for running pipelines from your scripts.</p></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Shield className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Data & Privacy</h2>3 unmodified lines<p>Cached query results are stored for 24 hours for performance. They are keyed by input hash, not your user ID.</p><p>All AI outputs are labeled "AI-assisted research analysis — not for clinical or diagnostic use."</p></div></section><section className="bg-white rounded-2xl border border-gray-200 p-6 opacity-60"><div className="flex items-center gap-2 mb-6"><Shield className="w-5 h-5 text-gray-400" /><h2 className="text-lg font-semibold text-gray-400">Danger Zone</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in a future update</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Account deletion and data export will be available here.</p></div></section></div></div>);}2 unmodified lines34567891041 unmodified lines525354555657585960616218 unmodified lines81828384858687888912 unmodified lines1021031041051061071081091103 unmodified lines11411511611711811912012112211 unmodified lines1341351361371381391401411423 unmodified lines1461471481491501511521531543 unmodified lines1581591601611621631641651663 unmodified lines1701711721731741751761772 unmodified linesimport { useState, useEffect } from 'react';import axios from 'axios';import toast from 'react-hot-toast';import { motion } from 'framer-motion';import { fadeUp, stagger, cardHover } from '@/lib/animations';import { User, BarChart3, Bell, Key, Shield, Loader2, Save, Sun, Moon } from 'lucide-react';import { useTheme } from '@/contexts/theme';41 unmodified linesreturn (<div className="max-w-3xl"><motion.h1 variants={fadeUp} className="text-2xl font-bold text-gray-900 mb-2">Settings</motion.h1><motion.p variants={fadeUp} className="text-gray-600 mb-8">Manage your account and preferences</motion.p><motion.div variants={stagger} initial="hidden" whileInView="show" viewport={{ once: true, margin: '-40px' }} className="space-y-8"><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><User className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Account</h2>18 unmodified linesSave changes</button></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><BarChart3 className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Usage</h2>12 unmodified lines<p className="text-xs text-gray-500 mt-1">Current plan</p></div></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Bell className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Notifications</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in a future update</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Email notifications for completed analyses and weekly summaries.</p></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Sun className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Appearance</h2>11 unmodified lines{theme === 'dark' ? 'Light mode' : 'Dark mode'}</button></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Key className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">API Access</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in Phase 2</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Programmatic API access for running pipelines from your scripts.</p></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-2 mb-6"><Shield className="w-5 h-5 text-teal-600" /><h2 className="text-lg font-semibold text-gray-900">Data & Privacy</h2>3 unmodified lines<p>Cached query results are stored for 24 hours for performance. They are keyed by input hash, not your user ID.</p><p>All AI outputs are labeled "AI-assisted research analysis — not for clinical or diagnostic use."</p></div></motion.section><motion.section variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6 opacity-60"><div className="flex items-center gap-2 mb-6"><Shield className="w-5 h-5 text-gray-400" /><h2 className="text-lg font-semibold text-gray-400">Danger Zone</h2>3 unmodified lines<h3 className="text-sm font-medium text-gray-900 mb-1">Coming in a future update</h3><p className="text-xs text-gray-500 max-w-sm mx-auto">Account deletion and data export will be available here.</p></div></motion.section></motion.div></div>);}
301 unmodified lines302303304305306307301 unmodified lines}}@layer utilities {.bg-grid {background-image:301 unmodified lines302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388301 unmodified lines}}/* ── Legacy Tailwind class overrides ──────────────────────────────────── */.bg-white { background-color: var(--bg-surface-1) !important; }.bg-gray-50,.bg-gray-100 { background-color: var(--bg-surface-0) !important; }.bg-gray-200 { background-color: var(--bg-surface-2) !important; }.text-gray-900,.text-gray-800 { color: var(--text-primary) !important; }.text-gray-700 { color: var(--text-secondary) !important; }.text-gray-600,.text-gray-500 { color: var(--text-muted) !important; }.text-gray-400,.text-gray-300 { color: var(--text-muted) !important; }.text-gray-200 { color: var(--text-muted) !important; }.border-gray-200,.border-gray-100,.border-gray-300 { border-color: var(--glass-border) !important; }.divide-gray-100 > * + *,.divide-gray-200 > * + * { border-color: var(--glass-border) !important; }.hover\:bg-gray-50:hover,.hover\:bg-gray-100:hover { background-color: var(--bg-surface-1) !important; }.hover\:bg-gray-200:hover { background-color: var(--bg-surface-2) !important; }.hover\:text-gray-900:hover { color: var(--text-primary) !important; }.hover\:text-gray-700:hover { color: var(--text-secondary) !important; }.hover\:border-gray-300:hover { border-color: var(--glass-border) !important; }.bg-teal-50 { background-color: var(--accent-cyan-10) !important; }.bg-teal-100 { background-color: rgba(0, 245, 212, 0.12) !important; }.bg-teal-200 { background-color: var(--accent-cyan-20) !important; }.border-teal-200 { border-color: var(--accent-cyan-20) !important; }.border-teal-300,.hover\:border-teal-300:hover { border-color: var(--accent-cyan-30) !important; }.text-teal-600 { color: var(--accent-cyan) !important; }.text-teal-700,.text-teal-800 { color: var(--accent-cyan) !important; }.hover\:text-teal-700:hover,.hover\:text-teal-800:hover { color: var(--accent-cyan) !important; }.hover\:bg-teal-50:hover { background-color: var(--accent-cyan-10) !important; }.bg-teal-500 { background-color: var(--accent-cyan) !important; }.bg-teal-600 { background-color: var(--accent-cyan) !important; }.hover\:bg-teal-700:hover { background-color: var(--accent-cyan) !important; }.bg-red-50 { background-color: rgba(248, 113, 113, 0.1) !important; }.bg-red-100 { background-color: rgba(248, 113, 113, 0.12) !important; }.text-red-500,.text-red-600,.text-red-700,.text-red-800,.text-red-900 { color: #F87171 !important; }.border-red-200 { border-color: rgba(248, 113, 113, 0.2) !important; }.bg-amber-50 { background-color: rgba(245, 158, 11, 0.1) !important; }.text-amber-500,.text-amber-600,.text-amber-700,.text-amber-800,.text-amber-900 { color: #FBBF24 !important; }.border-amber-200 { border-color: rgba(251, 191, 36, 0.2) !important; }.hover\:bg-amber-100:hover { background-color: rgba(245, 158, 11, 0.15) !important; }.bg-blue-50 { background-color: rgba(96, 165, 250, 0.1) !important; }.bg-blue-100 { background-color: rgba(96, 165, 250, 0.12) !important; }.text-blue-600 { color: #60A5FA !important; }.text-blue-700,.text-blue-800 { color: #60A5FA !important; }.hover\:bg-blue-100:hover { background-color: rgba(96, 165, 250, 0.15) !important; }.bg-purple-50 { background-color: rgba(167, 139, 250, 0.08) !important; }.text-purple-600 { color: #A78BFA !important; }.focus\:ring-teal-200 { --tw-ring-color: var(--accent-cyan-20) !important; }.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important; }.shadow-md,.shadow-xl { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important; }.from-teal-50 { --tw-gradient-from: var(--bg-surface-1) !important; }.to-teal-50 { --tw-gradient-to: var(--bg-surface-1) !important; }@layer utilities {.bg-grid {background-image:
70 unmodified lines717273747576777880 unmodified lines159160161162163164165187 unmodified lines3533543553563573583591 unmodified line36136236336436536636770 unmodified linesstyle={{ backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)' }}><span className="font-display text-sm font-semibold tracking-widest uppercase">Bio<span className="text-gradient">Flow</span><span className="text-accent-cyan">_</span>AI</span><div className="flex items-center gap-6">80 unmodified linestransition={{ delay: 0.6 }}className="text-text-secondary text-lg max-w-[520px] mx-auto mb-10 leading-relaxed">BioFlow AI unifies NCBI, UniProt, PDB, and KEGG into a single plain-languageinterface — with AI-interpreted visual results, instantly.</motion.p>187 unmodified linesFree to start. No API keys required to run your first analysis.</p><Link href="/dashboard" className="btn-primary text-base px-8 py-4">Open BioFlow AI<ArrowRight size={17} /></Link></motion.div>1 unmodified line<footer className="border-t border-glass-border py-8 px-8 flex flex-col sm:flex-row items-center justify-between gap-4"><span className="font-mono text-xs text-text-muted">BioFlow AI · Built at Jamia Millia Islamia</span><div className="flex items-center gap-6"><Link href="/auth" className="text-xs text-text-muted hover:text-text-primary transition-colors">70 unmodified lines7172737475767780 unmodified lines158159160161162163164187 unmodified lines3523533543553563573581 unmodified line36036136236336436536670 unmodified linesstyle={{ backdropFilter: 'blur(12px)', WebkitBackdropFilter: 'blur(12px)' }}><span className="font-display text-sm font-semibold tracking-widest uppercase">Bio <span className="text-gradient">Nexus</span></span><div className="flex items-center gap-6">80 unmodified linestransition={{ delay: 0.6 }}className="text-text-secondary text-lg max-w-[520px] mx-auto mb-10 leading-relaxed">BioNexus unifies NCBI, UniProt, PDB, and KEGG into a single plain-languageinterface — with AI-interpreted visual results, instantly.</motion.p>187 unmodified linesFree to start. No API keys required to run your first analysis.</p><Link href="/dashboard" className="btn-primary text-base px-8 py-4">Open Bio Nexus<ArrowRight size={17} /></Link></motion.div>1 unmodified line<footer className="border-t border-glass-border py-8 px-8 flex flex-col sm:flex-row items-center justify-between gap-4"><span className="font-mono text-xs text-text-muted">Bio Nexus · Built at Jamia Millia Islamia</span><div className="flex items-center gap-6"><Link href="/auth" className="text-xs text-text-muted hover:text-text-primary transition-colors">
9 unmodified lines10111213141553 unmodified lines6970717273747576777879808182838485868788899091929394959 unmodified linesimport { BlastPanel } from '@/components/results/BlastPanel';import { UniprotPanel } from '@/components/results/UniprotPanel';import { AlphaFoldViewer } from '@/components/AlphaFoldViewer';export default function SharedResultPage() {const params = useParams();53 unmodified lines<p className="text-sm text-gray-500">This result is from an older version and cannot be displayed in full.</p></div>) : (<div className="space-y-6"><div><h1 className="text-2xl font-bold text-gray-900 mb-1">Analysis Results</h1><p className="text-sm text-gray-500">Query: {context.query.sequence.slice(0, 80)}... ({context.query.length} aa)</p></div><AIInterpretation context={context} pipelineType={job.pipeline_type} /><div className="grid lg:grid-cols-2 gap-6">{context.blast?.hits && context.blast.hits.length > 0 && (<BlastPanel hits={context.blast.hits} count={context.blast.count} source={context.blast.source} />)}{context.uniprot && <UniprotPanel data={context.uniprot} />}</div>{context.alphafold?.structure_available && (<AlphaFoldViewer pdbUrl={context.alphafold.pdb_url} uniprotId={context.alphafold.uniprot_accession} />)}</div>)}</div></div>9 unmodified lines101112131415161753 unmodified lines71727374757677787980818283848586878889909192939495969798991001019 unmodified linesimport { BlastPanel } from '@/components/results/BlastPanel';import { UniprotPanel } from '@/components/results/UniprotPanel';import { AlphaFoldViewer } from '@/components/AlphaFoldViewer';import { motion } from 'framer-motion';import { fadeUp, stagger } from '@/lib/animations';export default function SharedResultPage() {const params = useParams();53 unmodified lines<p className="text-sm text-gray-500">This result is from an older version and cannot be displayed in full.</p></div>) : (<motion.div variants={stagger} initial="hidden" animate="show" className="space-y-6"><motion.div variants={fadeUp}><h1 className="text-2xl font-bold text-gray-900 mb-1">Analysis Results</h1><p className="text-sm text-gray-500">Query: {context.query.sequence.slice(0, 80)}... ({context.query.length} aa)</p></motion.div><motion.div variants={fadeUp}><AIInterpretation context={context} pipelineType={job.pipeline_type} /></motion.div><motion.div variants={fadeUp} className="grid lg:grid-cols-2 gap-6">{context.blast?.hits && context.blast.hits.length > 0 && (<BlastPanel hits={context.blast.hits} count={context.blast.count} source={context.blast.source} />)}{context.uniprot && <UniprotPanel data={context.uniprot} />}</motion.div>{context.alphafold?.structure_available && (<motion.div variants={fadeUp}><AlphaFoldViewer pdbUrl={context.alphafold.pdb_url} uniprotId={context.alphafold.uniprot_accession} /></motion.div>)}</motion.div>)}</div></div>
12345673 unmodified lines1112131415161717 unmodified lines353637383940'use client';import { useState } from 'react';import { X, User } from 'lucide-react';import { useAuth } from '@/contexts/auth';export function GuestBanner() {3 unmodified linesif (!isGuest || dismissed) return null;return (<div className="mb-6 bg-amber-50 border border-amber-200 rounded-xl p-4 flex items-start justify-between gap-4"><div className="flex items-start gap-3"><User className="w-5 h-5 text-amber-600 shrink-0 mt-0.5" /><div>17 unmodified lines><X className="w-4 h-4 text-amber-500" /></button></div>);}1234567893 unmodified lines1314151617181917 unmodified lines373839404142'use client';import { useState } from 'react';import { motion } from 'framer-motion';import { X, User } from 'lucide-react';import { fadeUp } from '@/lib/animations';import { useAuth } from '@/contexts/auth';export function GuestBanner() {3 unmodified linesif (!isGuest || dismissed) return null;return (<motion.div variants={fadeUp} className="mb-6 bg-amber-50 border border-amber-200 rounded-xl p-4 flex items-start justify-between gap-4"><div className="flex items-start gap-3"><User className="w-5 h-5 text-amber-600 shrink-0 mt-0.5" /><div>17 unmodified lines><X className="w-4 h-4 text-amber-500" /></button></motion.div>);}
1234567880 unmodified lines899091929394959639 unmodified lines13613713813914014114214314414514614714814915015115230 unmodified lines183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226106 unmodified lines333334335336337338339340'use client';import { useState } from 'react';import { useRouter } from 'next/navigation';import { Search, Dna, Loader2, CheckCircle, AlertCircle, BookOpen, ArrowRight, Beaker } from 'lucide-react';import { fetchSequence, validateSequence, searchSequences } from '@/lib/api';import { extractErrorMessage } from '@/lib/errors';import type { SequenceResult, SequenceValidation, SequenceSearchResult } from '@/types/pipeline';80 unmodified lines};return (<div className="space-y-6"><div className="bg-white rounded-2xl border border-gray-200 p-6"><h2 className="text-lg font-semibold text-gray-900 mb-1">Sequence Retrieval</h2><p className="text-sm text-gray-500 mb-6">Look up a sequence by accession number, paste raw sequence data, or search by gene/protein name39 unmodified lines{loading ? 'Searching...' : 'Search'}</button></div></div>{error && (<div className="bg-red-50 border border-red-200 rounded-2xl p-4 flex items-start gap-3"><AlertCircle className="w-5 h-5 text-red-500 mt-0.5 shrink-0" /><p className="text-sm text-red-700">{error}</p></div>)}{validation && mode === 'sequence' && (<div className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-3 mb-4">{validation.valid ? (<CheckCircle className="w-5 h-5 text-teal-500" />30 unmodified lines))}</div>)}</div>)}{searchResults && mode === 'name' && (<div className="bg-white rounded-2xl border border-gray-200 p-6"><h3 className="font-semibold text-gray-900 mb-4">Search Results ({searchResults.length})</h3>{searchResults.length === 0 ? (<p className="text-sm text-gray-500">No results found</p>) : (<div className="space-y-2">{searchResults.map((r, i) => (<buttonkey={i}onClick={() => handleSelectAccession(r.accession)}className="w-full text-left p-4 rounded-xl border border-gray-200 hover:border-teal-300 hover:bg-teal-50 transition"><div className="flex items-center justify-between"><div><div className="flex items-center gap-2"><code className="text-sm font-mono text-teal-700">{r.accession}</code><ArrowRight className="w-3 h-3 text-gray-300" /></div><p className="text-sm text-gray-700 mt-1 line-clamp-1">{r.title}</p></div><div className="text-right text-xs text-gray-500"><div>{r.organism}</div><div>{r.length} aa</div></div></div></button>))}</div>)}</div>)}{result && mode === 'accession' && (<div className="bg-white rounded-2xl border border-gray-200 divide-y divide-gray-100"><div className="p-6"><div className="flex items-start justify-between mb-4"><div>106 unmodified linesAnalyze with BLAST</button></div></div>)}</div>);}1234567891080 unmodified lines919293949596979839 unmodified lines13813914014114214314414514614714814915015115215315430 unmodified lines185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229106 unmodified lines336337338339340341342343'use client';import { useState } from 'react';import { motion } from 'framer-motion';import { useRouter } from 'next/navigation';import { Search, Dna, Loader2, CheckCircle, AlertCircle, BookOpen, ArrowRight, Beaker } from 'lucide-react';import { fadeUp, stagger } from '@/lib/animations';import { fetchSequence, validateSequence, searchSequences } from '@/lib/api';import { extractErrorMessage } from '@/lib/errors';import type { SequenceResult, SequenceValidation, SequenceSearchResult } from '@/types/pipeline';80 unmodified lines};return (<motion.div initial="hidden" animate="show" variants={stagger} className="space-y-6"><motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 p-6"><h2 className="text-lg font-semibold text-gray-900 mb-1">Sequence Retrieval</h2><p className="text-sm text-gray-500 mb-6">Look up a sequence by accession number, paste raw sequence data, or search by gene/protein name39 unmodified lines{loading ? 'Searching...' : 'Search'}</button></div></motion.div>{error && (<motion.div variants={fadeUp} className="bg-red-50 border border-red-200 rounded-2xl p-4 flex items-start gap-3"><AlertCircle className="w-5 h-5 text-red-500 mt-0.5 shrink-0" /><p className="text-sm text-red-700">{error}</p></motion.div>)}{validation && mode === 'sequence' && (<motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center gap-3 mb-4">{validation.valid ? (<CheckCircle className="w-5 h-5 text-teal-500" />30 unmodified lines))}</div>)}</motion.div>)}{searchResults && mode === 'name' && (<motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 p-6"><h3 className="font-semibold text-gray-900 mb-4">Search Results ({searchResults.length})</h3>{searchResults.length === 0 ? (<p className="text-sm text-gray-500">No results found</p>) : (<motion.div initial="hidden" animate="show" variants={stagger} className="space-y-2">{searchResults.map((r, i) => (<motion.div key={i} variants={fadeUp}><buttononClick={() => handleSelectAccession(r.accession)}className="w-full text-left p-4 rounded-xl border border-gray-200 hover:border-teal-300 hover:bg-teal-50 transition"><div className="flex items-center justify-between"><div><div className="flex items-center gap-2"><code className="text-sm font-mono text-teal-700">{r.accession}</code><ArrowRight className="w-3 h-3 text-gray-300" /></div><p className="text-sm text-gray-700 mt-1 line-clamp-1">{r.title}</p></div><div className="text-right text-xs text-gray-500"><div>{r.organism}</div><div>{r.length} aa</div></div></div></button></motion.div>))}</motion.div>)}</motion.div>)}{result && mode === 'accession' && (<motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 divide-y divide-gray-100"><div className="p-6"><div className="flex items-start justify-between mb-4"><div>106 unmodified linesAnalyze with BLAST</button></div></motion.div>)}</motion.div>);}
12345618 unmodified lines252627282930319 unmodified lines414243444546476 unmodified lines545556575859603 unmodified lines646566676869'use client';import { CheckCircle2, XCircle } from 'lucide-react';interface Step {name: string;18 unmodified linesconst pct = stepsCompleted.length === 0 ? 0 : Math.round((stepsCompleted.length / STEPS.length) * 100);return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center justify-between mb-4"><h3 className="text-sm font-semibold text-gray-900">Pipeline progress</h3><span className="text-xs text-gray-500">{pct}%</span>9 unmodified linesconst done = stepSet.has(step.name);const active = status === 'running' && (step.name === stepsCompleted[stepsCompleted.length - 1] || (!done && stepsCompleted.length === 0 && step.name === STEPS[0].name));return (<div key={step.name} className="flex items-center gap-3">{done ? (<CheckCircle2 className="w-5 h-5 text-teal-600 shrink-0" />) : isFailed ? (6 unmodified lines<span className={`text-sm ${done ? 'text-gray-900 font-medium' : active ? 'text-teal-700' : 'text-gray-400'}`}>{step.label}</span></div>);})}</div>3 unmodified lines{isFailed && (<p className="text-xs text-red-500 mt-3 font-medium">Pipeline failed</p>)}</div>);}1234567818 unmodified lines272829303132339 unmodified lines434445464748496 unmodified lines565758596061623 unmodified lines666768697071'use client';import { motion } from 'framer-motion';import { CheckCircle2, XCircle } from 'lucide-react';import { fadeUp, fadeIn } from '@/lib/animations';interface Step {name: string;18 unmodified linesconst pct = stepsCompleted.length === 0 ? 0 : Math.round((stepsCompleted.length / STEPS.length) * 100);return (<motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center justify-between mb-4"><h3 className="text-sm font-semibold text-gray-900">Pipeline progress</h3><span className="text-xs text-gray-500">{pct}%</span>9 unmodified linesconst done = stepSet.has(step.name);const active = status === 'running' && (step.name === stepsCompleted[stepsCompleted.length - 1] || (!done && stepsCompleted.length === 0 && step.name === STEPS[0].name));return (<motion.div key={step.name} variants={fadeIn} className="flex items-center gap-3">{done ? (<CheckCircle2 className="w-5 h-5 text-teal-600 shrink-0" />) : isFailed ? (6 unmodified lines<span className={`text-sm ${done ? 'text-gray-900 font-medium' : active ? 'text-teal-700' : 'text-gray-400'}`}>{step.label}</span></motion.div>);})}</div>3 unmodified lines{isFailed && (<p className="text-xs text-red-500 mt-3 font-medium">Pipeline failed</p>)}</motion.div>);}
123456721 unmodified lines2930313233343536373839404142434445464748495051525354555657585960616263646566'use client';import { useState } from 'react';import { Dna, ArrowRight, ChevronRight } from 'lucide-react';interface PipelineOption {id: string;21 unmodified linesreturn (<div><h2 className="text-lg font-semibold text-gray-900 mb-4">Choose a pipeline</h2><div className="grid gap-4">{pipelines.map((p) => {const active = selected === p.id;return (<buttonkey={p.id}onClick={() => {setSelected(p.id);onSelect(p.id);}}className={`w-full text-left p-5 rounded-2xl border-2 transition ${active? 'border-teal-500 bg-teal-50 shadow-sm': 'border-gray-200 bg-white hover:border-teal-300 hover:shadow-sm'}`}><div className="flex items-start gap-4"><div className={`p-3 rounded-xl ${active ? 'bg-teal-100' : 'bg-gray-100'}`}><p.icon className={`w-6 h-6 ${active ? 'text-teal-600' : 'text-gray-500'}`} /></div><div className="flex-1"><div className="flex items-center gap-2"><h3 className={`font-semibold ${active ? 'text-teal-900' : 'text-gray-900'}`}>{p.name}</h3><ChevronRight className={`w-4 h-4 ${active ? 'text-teal-600' : 'text-gray-300'}`} /></div><p className="text-sm text-gray-500 mt-1">{p.description}</p></div></div></button>);})}</div></div>);}12345678921 unmodified lines313233343536373839404142434445464748495051525354555657585960616263646566676869'use client';import { useState } from 'react';import { motion } from 'framer-motion';import { Dna, ArrowRight, ChevronRight } from 'lucide-react';import { fadeUp, stagger, cardHover } from '@/lib/animations';interface PipelineOption {id: string;21 unmodified linesreturn (<div><h2 className="text-lg font-semibold text-gray-900 mb-4">Choose a pipeline</h2><motion.div initial="hidden" animate="show" variants={stagger} className="grid gap-4">{pipelines.map((p) => {const active = selected === p.id;return (<motion.div key={p.id} variants={fadeUp} whileHover={cardHover}><buttononClick={() => {setSelected(p.id);onSelect(p.id);}}className={`w-full text-left p-5 rounded-2xl border-2 transition ${active? 'border-teal-500 bg-teal-50 shadow-sm': 'border-gray-200 bg-white hover:border-teal-300 hover:shadow-sm'}`}><div className="flex items-start gap-4"><div className={`p-3 rounded-xl ${active ? 'bg-teal-100' : 'bg-gray-100'}`}><p.icon className={`w-6 h-6 ${active ? 'text-teal-600' : 'text-gray-500'}`} /></div><div className="flex-1"><div className="flex items-center gap-2"><h3 className={`font-semibold ${active ? 'text-teal-900' : 'text-gray-900'}`}>{p.name}</h3><ChevronRight className={`w-4 h-4 ${active ? 'text-teal-600' : 'text-gray-300'}`} /></div><p className="text-sm text-gray-500 mt-1">{p.description}</p></div></div></button></motion.div>);})}</motion.div></div>);}
12345628 unmodified lines3536373839404127 unmodified lines697071727374'use client';import { useState } from 'react';const SAMPLES = [{28 unmodified lines.join('').length;return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><label className="block text-sm font-medium text-gray-700 mb-2">Enter protein sequence (FASTA or plain)</label>27 unmodified lines{loading ? 'Running pipeline...' : 'Run Pipeline'}</button></div></div>);}1234567828 unmodified lines3738394041424327 unmodified lines717273747576'use client';import { useState } from 'react';import { motion } from 'framer-motion';import { fadeUp } from '@/lib/animations';const SAMPLES = [{28 unmodified lines.join('').length;return (<motion.div variants={fadeUp} className="bg-white rounded-2xl border border-gray-200 p-6"><label className="block text-sm font-medium text-gray-700 mb-2">Enter protein sequence (FASTA or plain)</label>27 unmodified lines{loading ? 'Running pipeline...' : 'Run Pipeline'}</button></div></motion.div>);}
1234567891011117 unmodified lines1291301311321331341355 unmodified lines1411421431441451461471481499 unmodified lines1591601611621631641651661671682 unmodified lines171172173174175176'use client';import { useState, useRef, useCallback } from 'react';import { Brain, Loader2 } from 'lucide-react';import type { AssembledContext } from '@/types/pipeline';import type { StreamEvent } from '@/types/results';import { interpretStream } from '@/lib/api';import { extractErrorMessage } from '@/lib/errors';function addCitationLinks(text: string): string {return text.replace(117 unmodified lines}, [context, pipelineType, loading]);return (<div className="bg-gradient-to-br from-teal-50 to-teal-50 rounded-2xl border border-teal-200 p-6"><div className="flex items-center justify-between mb-4"><div className="flex items-center gap-2"><Brain className="w-5 h-5 text-teal-600" />5 unmodified lines)}</div>{!text && !loading && (<button onClick={handleInterpret} className="px-4 py-2 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition">Interpret results</button>)}{loading && (<button onClick={() => abortRef.current?.abort()} className="px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-300 transition">9 unmodified lines)}{text ? (<div>{renderMarkdown(text)}{model && <div className="mt-3 text-xs text-gray-400">Model: {model}</div>}</div>) : loading ? (<div className="flex items-center gap-2 text-sm text-gray-500"><Loader2 className="w-4 h-4 animate-spin" />2 unmodified lines) : (<p className="text-sm text-gray-500">Click to get an AI explanation combining BLAST, UniProt, and AlphaFold data</p>)}</div>);}12345678910111213117 unmodified lines1311321331341351361375 unmodified lines1431441451461471481491501519 unmodified lines1611621631641651661671681691702 unmodified lines173174175176177178'use client';import { useState, useRef, useCallback } from 'react';import { motion } from 'framer-motion';import { Brain, Loader2 } from 'lucide-react';import type { AssembledContext } from '@/types/pipeline';import type { StreamEvent } from '@/types/results';import { interpretStream } from '@/lib/api';import { extractErrorMessage } from '@/lib/errors';import { fadeUp, fadeIn, cardHover } from '@/lib/animations';function addCitationLinks(text: string): string {return text.replace(117 unmodified lines}, [context, pipelineType, loading]);return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-gradient-to-br from-teal-50 to-teal-50 rounded-2xl border border-teal-200 p-6"><div className="flex items-center justify-between mb-4"><div className="flex items-center gap-2"><Brain className="w-5 h-5 text-teal-600" />5 unmodified lines)}</div>{!text && !loading && (<motion.button variants={fadeIn} onClick={handleInterpret} className="px-4 py-2 bg-teal-600 text-white text-sm font-medium rounded-lg hover:bg-teal-700 transition">Interpret results</motion.button>)}{loading && (<button onClick={() => abortRef.current?.abort()} className="px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-300 transition">9 unmodified lines)}{text ? (<motion.div variants={fadeIn}>{renderMarkdown(text)}{model && <div className="mt-3 text-xs text-gray-400">Model: {model}</div>}</motion.div>) : loading ? (<div className="flex items-center gap-2 text-sm text-gray-500"><Loader2 className="w-4 h-4 animate-spin" />2 unmodified lines) : (<p className="text-sm text-gray-500">Click to get an AI explanation combining BLAST, UniProt, and AlphaFold data</p>)}</motion.div>);}
12345678922 unmodified lines3233343536373839404142434445464748495030 unmodified lines81828384858687888990'use client';import { useState } from 'react';import { ChevronDown, ChevronUp, ExternalLink } from 'lucide-react';import type { BlastHitSummary } from '@/types/pipeline';import { AlignmentView } from './AlignmentView';interface BlastPanelProps {hits: BlastHitSummary[];22 unmodified linesconst [expanded, setExpanded] = useState<number | null>(null);return (<div className="bg-white rounded-2xl border border-gray-200 overflow-hidden"><div className="px-6 py-4 border-b border-gray-100 bg-gray-50 flex items-center justify-between"><h2 className="font-semibold text-gray-900">BLAST Hits<span className="text-xs text-gray-400 ml-2 font-normal">({count} found{source ? ` via ${source}` : ''})</span></h2></div><div className="divide-y divide-gray-100">{hits.map((hit, i) => {const band = confidenceBand(hit.evalue);const isExpanded = expanded === i;return (<div key={hit.accession}><buttononClick={() => setExpanded(isExpanded ? null : i)}className="w-full px-6 py-4 flex items-center justify-between text-left hover:bg-gray-50 transition"30 unmodified lines</a></div>)}</div>);})}</div></div>);}123456789101122 unmodified lines3435363738394041424344454647484950515230 unmodified lines83848586878889909192'use client';import { useState } from 'react';import { motion } from 'framer-motion';import { ChevronDown, ChevronUp, ExternalLink } from 'lucide-react';import type { BlastHitSummary } from '@/types/pipeline';import { AlignmentView } from './AlignmentView';import { fadeUp, stagger, cardHover } from '@/lib/animations';interface BlastPanelProps {hits: BlastHitSummary[];22 unmodified linesconst [expanded, setExpanded] = useState<number | null>(null);return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 overflow-hidden"><div className="px-6 py-4 border-b border-gray-100 bg-gray-50 flex items-center justify-between"><h2 className="font-semibold text-gray-900">BLAST Hits<span className="text-xs text-gray-400 ml-2 font-normal">({count} found{source ? ` via ${source}` : ''})</span></h2></div><motion.div variants={stagger} className="divide-y divide-gray-100">{hits.map((hit, i) => {const band = confidenceBand(hit.evalue);const isExpanded = expanded === i;return (<motion.div key={hit.accession} variants={fadeUp}><buttononClick={() => setExpanded(isExpanded ? null : i)}className="w-full px-6 py-4 flex items-center justify-between text-left hover:bg-gray-50 transition"30 unmodified lines</a></div>)}</motion.div>);})}</motion.div></motion.div>);}
12345622 unmodified lines2930313233343518 unmodified lines545556575859'use client';import type { BlastHitSummary } from '@/types/pipeline';interface ScoreBarsProps {hits: BlastHitSummary[];22 unmodified linesconst maxScore = hits[0]?.bit_score || 1;return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><h2 className="text-lg font-semibold text-gray-900 mb-4">Score Distribution</h2><div className="space-y-2">{hits.slice(0, 15).map((hit, i) => {18 unmodified lines);})}</div></div>);}1234567822 unmodified lines3132333435363718 unmodified lines565758596061'use client';import { motion } from 'framer-motion';import type { BlastHitSummary } from '@/types/pipeline';import { fadeUp, cardHover } from '@/lib/animations';interface ScoreBarsProps {hits: BlastHitSummary[];22 unmodified linesconst maxScore = hits[0]?.bit_score || 1;return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><h2 className="text-lg font-semibold text-gray-900 mb-4">Score Distribution</h2><div className="space-y-2">{hits.slice(0, 15).map((hit, i) => {18 unmodified lines);})}</div></motion.div>);}
12345672 unmodified lines10111213141516171819202122232430 unmodified lines555657585960'use client';import { ExternalLink } from 'lucide-react';import type { AlphaFoldResult } from '@/types/pipeline';interface StructureViewerProps {data: AlphaFoldResult;2 unmodified linesexport function StructureViewer({ data }: StructureViewerProps) {if (!data.structure_available) {return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><h3 className="font-semibold text-gray-900 mb-2">AlphaFold Structure</h3><p className="text-sm text-gray-500">No AlphaFold prediction available for this protein.</p></div>);}return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center justify-between mb-4"><h3 className="font-semibold text-gray-900">AlphaFold Structure</h3>{data.confidence && (30 unmodified lines{data.model_created_date && (<p className="text-xs text-gray-400 mt-1">Model created: {data.model_created_date}</p>)}</div>);}1234567892 unmodified lines12131415161718192021222324252630 unmodified lines575859606162'use client';import { motion } from 'framer-motion';import { ExternalLink } from 'lucide-react';import type { AlphaFoldResult } from '@/types/pipeline';import { fadeUp, cardHover } from '@/lib/animations';interface StructureViewerProps {data: AlphaFoldResult;2 unmodified linesexport function StructureViewer({ data }: StructureViewerProps) {if (!data.structure_available) {return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><h3 className="font-semibold text-gray-900 mb-2">AlphaFold Structure</h3><p className="text-sm text-gray-500">No AlphaFold prediction available for this protein.</p></motion.div>);}return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-center justify-between mb-4"><h3 className="font-semibold text-gray-900">AlphaFold Structure</h3>{data.confidence && (30 unmodified lines{data.model_created_date && (<p className="text-xs text-gray-400 mt-1">Model created: {data.model_created_date}</p>)}</motion.div>);}
12345671 unmodified line910111213141552 unmodified lines686970717273'use client';import { ExternalLink } from 'lucide-react';import type { UniprotSummary } from '@/types/pipeline';interface UniprotPanelProps {data: UniprotSummary;1 unmodified lineexport function UniprotPanel({ data }: UniprotPanelProps) {return (<div className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-start justify-between mb-4"><div><h3 className="font-medium text-gray-900">{data.full_name}</h3>52 unmodified lines</div></div>)}</div>);}1234567891 unmodified line1112131415161752 unmodified lines707172737475'use client';import { motion } from 'framer-motion';import { ExternalLink } from 'lucide-react';import type { UniprotSummary } from '@/types/pipeline';import { fadeUp, cardHover } from '@/lib/animations';interface UniprotPanelProps {data: UniprotSummary;1 unmodified lineexport function UniprotPanel({ data }: UniprotPanelProps) {return (<motion.div variants={fadeUp} whileHover={cardHover} className="bg-white rounded-2xl border border-gray-200 p-6"><div className="flex items-start justify-between mb-4"><div><h3 className="font-medium text-gray-900">{data.full_name}</h3>52 unmodified lines</div></div>)}</motion.div>);}
1234567891011121314151617import type { Variants } from 'framer-motion';
export const fadeUp: Variants = { hidden: { opacity: 0, y: 24 }, show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: [0.25, 1, 0.5, 1] as const } },};
export const stagger: Variants = { show: { transition: { staggerChildren: 0.08 } },};
export const cardHover = { y: -4, transition: { duration: 0.25 } };
export const fadeIn: Variants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { duration: 0.4 } },};bioai-platform/backend/app/main.py+1-1
bioai-platform/frontend/src/app/(auth)/auth/callback/page.tsx+6-4
bioai-platform/frontend/src/app/(auth)/auth/page.tsx+4-2
bioai-platform/frontend/src/app/(dashboard)/analyze/blast/page.tsx+22-18
bioai-platform/frontend/src/app/(dashboard)/analyze/page.tsx+8-4
bioai-platform/frontend/src/app/(dashboard)/dashboard/page.tsx+32-29
bioai-platform/frontend/src/app/(dashboard)/history/page.tsx+9-6
bioai-platform/frontend/src/app/(dashboard)/jobs/[jobId]/page.tsx+38-28
bioai-platform/frontend/src/app/(dashboard)/jobs/page.tsx+7-2
bioai-platform/frontend/src/app/(dashboard)/layout.tsx+1-2
bioai-platform/frontend/src/app/(dashboard)/settings/page.tsx+20-18
bioai-platform/frontend/src/app/globals.css+81
bioai-platform/frontend/src/app/page.tsx+4-5
bioai-platform/frontend/src/app/shared/[token]/page.tsx+14-8
bioai-platform/frontend/src/components/GuestBanner.tsx+4-2
bioai-platform/frontend/src/components/SequenceRetrieval.tsx+34-31
bioai-platform/frontend/src/components/pipeline/JobProgress.tsx+6-4
bioai-platform/frontend/src/components/pipeline/PipelineSelector.tsx+28-25
bioai-platform/frontend/src/components/pipeline/SequenceInput.tsx+4-2
bioai-platform/frontend/src/components/results/AIInterpretation.tsx+8-6
bioai-platform/frontend/src/components/results/BlastPanel.tsx+8-6
bioai-platform/frontend/src/components/results/ScoreBars.tsx+4-2
bioai-platform/frontend/src/components/results/StructureViewer.tsx+6-4
bioai-platform/frontend/src/components/results/UniprotPanel.tsx+4-2
bioai-platform/frontend/src/lib/animations.tsAdded+17