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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import React from 'react';
|
| 3 |
+
import { Sparkles, ArrowRight, Layers, Brain, Code2, Zap, Layout, ShieldCheck, Box } from 'lucide-react';
|
| 4 |
+
|
| 5 |
+
interface LandingPageProps {
|
| 6 |
+
onEnterApp: () => void;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
const LandingPage: React.FC<LandingPageProps> = ({ onEnterApp }) => {
|
| 10 |
+
const handleScrollTo = (id: string) => {
|
| 11 |
+
const element = document.getElementById(id);
|
| 12 |
+
if (element) {
|
| 13 |
+
element.scrollIntoView({ behavior: 'smooth' });
|
| 14 |
+
}
|
| 15 |
+
};
|
| 16 |
+
|
| 17 |
+
return (
|
| 18 |
+
<div className="h-screen w-full bg-slate-950 text-slate-200 overflow-y-auto overflow-x-hidden selection:bg-purple-500/30">
|
| 19 |
+
{/* Navbar */}
|
| 20 |
+
<nav className="border-b border-slate-800/50 bg-slate-950/80 backdrop-blur-md fixed top-0 w-full z-50">
|
| 21 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
|
| 22 |
+
<div className="flex items-center gap-2">
|
| 23 |
+
<Box className="text-blue-500" size={24} />
|
| 24 |
+
<span className="font-bold text-lg tracking-tight text-white">wuhp</span>
|
| 25 |
+
</div>
|
| 26 |
+
<div className="hidden md:flex items-center gap-6 text-sm font-medium text-slate-400">
|
| 27 |
+
<button onClick={() => handleScrollTo('features')} className="hover:text-white transition-colors">Features</button>
|
| 28 |
+
<button onClick={onEnterApp} className="hover:text-white transition-colors">AI Agents</button>
|
| 29 |
+
<button onClick={onEnterApp} className="hover:text-white transition-colors">Code Gen</button>
|
| 30 |
+
</div>
|
| 31 |
+
<button
|
| 32 |
+
onClick={onEnterApp}
|
| 33 |
+
className="bg-slate-800 hover:bg-slate-700 text-white px-4 py-2 rounded-lg text-sm font-medium transition-all border border-slate-700 hover:border-blue-500/50"
|
| 34 |
+
>
|
| 35 |
+
Launch Builder
|
| 36 |
+
</button>
|
| 37 |
+
</div>
|
| 38 |
+
</nav>
|
| 39 |
+
|
| 40 |
+
{/* Hero Section */}
|
| 41 |
+
<section className="relative pt-32 pb-20 lg:pt-48 lg:pb-32 overflow-hidden">
|
| 42 |
+
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] bg-blue-600/20 rounded-full blur-[120px] -z-10" />
|
| 43 |
+
<div className="absolute bottom-0 right-0 w-[600px] h-[300px] bg-purple-600/10 rounded-full blur-[100px] -z-10" />
|
| 44 |
+
|
| 45 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
| 46 |
+
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-slate-800/50 border border-slate-700/50 text-xs font-medium text-blue-400 mb-6 animate-in fade-in slide-in-from-bottom-4 duration-700">
|
| 47 |
+
<Sparkles size={12} />
|
| 48 |
+
<span>Now powered by Gemini 2.5</span>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<h1 className="text-5xl md:text-7xl font-extrabold text-white tracking-tight mb-6 animate-in fade-in slide-in-from-bottom-8 duration-700 delay-100">
|
| 52 |
+
Design Deep Learning <br />
|
| 53 |
+
<span className="bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">
|
| 54 |
+
With AI Architect Agents
|
| 55 |
+
</span>
|
| 56 |
+
</h1>
|
| 57 |
+
|
| 58 |
+
<p className="max-w-2xl mx-auto text-lg text-slate-400 mb-10 leading-relaxed animate-in fade-in slide-in-from-bottom-8 duration-700 delay-200">
|
| 59 |
+
The visual interface where human creativity meets AI precision. Draft complex neural networks, validate architectures, and generate production-ready PyTorch code instantly.
|
| 60 |
+
</p>
|
| 61 |
+
|
| 62 |
+
<div className="flex flex-col sm:flex-row items-center justify-center gap-4 animate-in fade-in slide-in-from-bottom-8 duration-700 delay-300">
|
| 63 |
+
<button
|
| 64 |
+
onClick={onEnterApp}
|
| 65 |
+
className="w-full sm:w-auto px-8 py-4 bg-blue-600 hover:bg-blue-500 text-white rounded-xl font-bold text-lg shadow-lg shadow-blue-500/25 transition-all flex items-center justify-center gap-2 group"
|
| 66 |
+
>
|
| 67 |
+
Get Started
|
| 68 |
+
<ArrowRight className="group-hover:translate-x-1 transition-transform" size={20} />
|
| 69 |
+
</button>
|
| 70 |
+
<button
|
| 71 |
+
onClick={() => handleScrollTo('features')}
|
| 72 |
+
className="w-full sm:w-auto px-8 py-4 bg-slate-800/50 hover:bg-slate-800 text-slate-200 rounded-xl font-semibold text-lg border border-slate-700 backdrop-blur transition-all flex items-center justify-center"
|
| 73 |
+
>
|
| 74 |
+
Explore Features
|
| 75 |
+
</button>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</section>
|
| 79 |
+
|
| 80 |
+
{/* Features Grid */}
|
| 81 |
+
<section id="features" className="py-24 bg-slate-900/30 border-t border-slate-800/50">
|
| 82 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 83 |
+
<div className="text-center mb-16">
|
| 84 |
+
<h2 className="text-3xl font-bold text-white mb-4">Everything you need to build</h2>
|
| 85 |
+
<p className="text-slate-400">From concept to code, powered by advanced specialized agents.</p>
|
| 86 |
+
</div>
|
| 87 |
+
|
| 88 |
+
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 89 |
+
<FeatureCard
|
| 90 |
+
icon={<Layout className="text-blue-400" />}
|
| 91 |
+
title="Visual Node Editor"
|
| 92 |
+
description="Drag, drop, and connect over 50+ layer types including Transformers, Convolutions, and specialized blocks for Audio and 3D."
|
| 93 |
+
/>
|
| 94 |
+
<FeatureCard
|
| 95 |
+
icon={<Brain className="text-purple-400" />}
|
| 96 |
+
title="Multi-Agent System"
|
| 97 |
+
description="Our Architect, Critic, and Refiner agents collaborate to interpret your prompts and build optimal graph structures automatically."
|
| 98 |
+
/>
|
| 99 |
+
<FeatureCard
|
| 100 |
+
icon={<Code2 className="text-emerald-400" />}
|
| 101 |
+
title="PyTorch Export"
|
| 102 |
+
description="Instantly convert your visual graph into clean, runnable PyTorch code, complete with shape handling and forward passes."
|
| 103 |
+
/>
|
| 104 |
+
<FeatureCard
|
| 105 |
+
icon={<ShieldCheck className="text-amber-400" />}
|
| 106 |
+
title="Smart Validation"
|
| 107 |
+
description="Detect shape mismatches and disconnected nodes before you run. Use the Auto-Fixer to correct errors instantly."
|
| 108 |
+
/>
|
| 109 |
+
<FeatureCard
|
| 110 |
+
icon={<Zap className="text-pink-400" />}
|
| 111 |
+
title="Rapid Prototyping"
|
| 112 |
+
description="Start from templates like YOLO, ResNet, or Transformers, or use natural language to generate entire architectures from scratch."
|
| 113 |
+
/>
|
| 114 |
+
<FeatureCard
|
| 115 |
+
icon={<Layers className="text-cyan-400" />}
|
| 116 |
+
title="Advanced Modules"
|
| 117 |
+
description="Support for cutting-edge layers: Sparse MoE, RoPE, SwiGLU, 3D Gaussian Splats, and more out of the box."
|
| 118 |
+
/>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
</section>
|
| 122 |
+
|
| 123 |
+
{/* Agent Workflow Section */}
|
| 124 |
+
<section id="agents" className="py-24 relative overflow-hidden">
|
| 125 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 126 |
+
<div className="bg-slate-900 border border-slate-800 rounded-3xl p-8 md:p-12 relative overflow-hidden">
|
| 127 |
+
{/* Background glow */}
|
| 128 |
+
<div className="absolute top-0 right-0 w-96 h-96 bg-blue-500/10 rounded-full blur-[80px] -z-10" />
|
| 129 |
+
|
| 130 |
+
<div className="grid lg:grid-cols-2 gap-12 items-center">
|
| 131 |
+
<div>
|
| 132 |
+
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-purple-500/10 border border-purple-500/20 text-xs font-medium text-purple-400 mb-6">
|
| 133 |
+
<Brain size={12} />
|
| 134 |
+
<span>Intelligent Workflow</span>
|
| 135 |
+
</div>
|
| 136 |
+
<h2 className="text-3xl md:text-4xl font-bold text-white mb-6">
|
| 137 |
+
Meet your new <br />
|
| 138 |
+
<span className="text-blue-400">AI Engineering Team</span>
|
| 139 |
+
</h2>
|
| 140 |
+
<p className="text-slate-400 text-lg mb-8 leading-relaxed">
|
| 141 |
+
Stop writing boilerplate. Describe your idea—like "A multimodal model that combines video and audio for sentiment analysis"—and watch the agents work.
|
| 142 |
+
</p>
|
| 143 |
+
|
| 144 |
+
<div className="space-y-4">
|
| 145 |
+
<AgentRow name="The Architect" role="Drafts initial graph structures based on your requirements." color="bg-blue-500" />
|
| 146 |
+
<AgentRow name="The Critic" role="Reviews architectures for logical errors and bottlenecks." color="bg-amber-500" />
|
| 147 |
+
<AgentRow name="The Refiner" role="Polishes the design and generates the final implementation." color="bg-emerald-500" />
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
<div className="relative">
|
| 152 |
+
{/* Abstract Representation of Graph */}
|
| 153 |
+
<div className="bg-slate-950 border border-slate-800 rounded-xl p-6 shadow-2xl relative z-10">
|
| 154 |
+
<div className="flex items-center justify-between mb-4 border-b border-slate-800 pb-4">
|
| 155 |
+
<div className="flex gap-2">
|
| 156 |
+
<div className="w-3 h-3 rounded-full bg-red-500" />
|
| 157 |
+
<div className="w-3 h-3 rounded-full bg-yellow-500" />
|
| 158 |
+
<div className="w-3 h-3 rounded-full bg-green-500" />
|
| 159 |
+
</div>
|
| 160 |
+
<div className="text-xs text-slate-500 font-mono">agent_activity.log</div>
|
| 161 |
+
</div>
|
| 162 |
+
<div className="space-y-3 font-mono text-sm">
|
| 163 |
+
<div className="flex gap-2">
|
| 164 |
+
<span className="text-blue-400">[Architect]</span>
|
| 165 |
+
<span className="text-slate-300">Drafting ResNet backbone...</span>
|
| 166 |
+
</div>
|
| 167 |
+
<div className="flex gap-2">
|
| 168 |
+
<span className="text-amber-400">[Critic]</span>
|
| 169 |
+
<span className="text-slate-300">Detected shape mismatch at Node 4.</span>
|
| 170 |
+
</div>
|
| 171 |
+
<div className="flex gap-2">
|
| 172 |
+
<span className="text-emerald-400">[Refiner]</span>
|
| 173 |
+
<span className="text-slate-300">Adding Pooling layer to fix dims.</span>
|
| 174 |
+
</div>
|
| 175 |
+
<div className="flex gap-2 opacity-50">
|
| 176 |
+
<span className="text-slate-500">...</span>
|
| 177 |
+
</div>
|
| 178 |
+
<div className="mt-4 p-3 bg-slate-900 rounded border border-slate-800 text-emerald-400">
|
| 179 |
+
Build Complete. 0 Errors.
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
{/* Decorative Elements */}
|
| 184 |
+
<div className="absolute -bottom-6 -right-6 w-full h-full border border-slate-800 rounded-xl -z-10 bg-slate-900/50" />
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
</section>
|
| 190 |
+
|
| 191 |
+
{/* Footer */}
|
| 192 |
+
<footer className="py-12 border-t border-slate-800/50 bg-slate-950 text-slate-500 text-sm">
|
| 193 |
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center gap-6">
|
| 194 |
+
<div className="flex items-center gap-2">
|
| 195 |
+
<Box size={20} className="text-slate-400" />
|
| 196 |
+
<span className="font-semibold text-slate-300">wuhp.org</span>
|
| 197 |
+
</div>
|
| 198 |
+
|
| 199 |
+
<div>
|
| 200 |
+
© {new Date().getFullYear()} wuhp. All rights reserved.
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
</footer>
|
| 204 |
+
</div>
|
| 205 |
+
);
|
| 206 |
+
};
|
| 207 |
+
|
| 208 |
+
const FeatureCard: React.FC<{ icon: React.ReactNode, title: string, description: string }> = ({ icon, title, description }) => (
|
| 209 |
+
<div className="p-6 rounded-2xl bg-slate-900 border border-slate-800 hover:bg-slate-800/80 transition-colors group">
|
| 210 |
+
<div className="w-12 h-12 rounded-lg bg-slate-950 border border-slate-800 flex items-center justify-center mb-4 group-hover:scale-110 transition-transform">
|
| 211 |
+
{icon}
|
| 212 |
+
</div>
|
| 213 |
+
<h3 className="text-xl font-bold text-white mb-2">{title}</h3>
|
| 214 |
+
<p className="text-slate-400 leading-relaxed">{description}</p>
|
| 215 |
+
</div>
|
| 216 |
+
);
|
| 217 |
+
|
| 218 |
+
const AgentRow: React.FC<{ name: string, role: string, color: string }> = ({ name, role, color }) => (
|
| 219 |
+
<div className="flex items-start gap-4 p-4 rounded-xl bg-slate-950 border border-slate-800">
|
| 220 |
+
<div className={`w-2 h-2 mt-2 rounded-full shrink-0 ${color}`} />
|
| 221 |
+
<div>
|
| 222 |
+
<h4 className="font-bold text-slate-200">{name}</h4>
|
| 223 |
+
<p className="text-sm text-slate-400">{role}</p>
|
| 224 |
+
</div>
|
| 225 |
+
</div>
|
| 226 |
+
);
|
| 227 |
+
|
| 228 |
+
export default LandingPage;
|