'use client' import { useEffect, useState } from 'react' import Image from 'next/image' import { Header } from '@/components/Header' import { Footer } from '@/components/Footer' import { DomainChecker } from '@/components/DomainChecker' import { useStore } from '@/lib/store' import { api } from '@/lib/api' import { Eye, Bell, Clock, Shield, ArrowRight, TrendingUp, TrendingDown, Minus, ChevronRight, Zap, BarChart3, Globe, Check, } from 'lucide-react' import Link from 'next/link' import clsx from 'clsx' interface TrendingTld { tld: string reason: string current_price: number price_change: number } // Shimmer for loading states function Shimmer({ className }: { className?: string }) { return (
) } // Animated counter function AnimatedNumber({ value, suffix = '' }: { value: number, suffix?: string }) { const [count, setCount] = useState(0) useEffect(() => { const duration = 2000 const steps = 60 const increment = value / steps let current = 0 const timer = setInterval(() => { current += increment if (current >= value) { setCount(value) clearInterval(timer) } else { setCount(Math.floor(current)) } }, duration / steps) return () => clearInterval(timer) }, [value]) return <>{count.toLocaleString()}{suffix} } export default function HomePage() { const { checkAuth, isLoading, isAuthenticated } = useStore() const [trendingTlds, setTrendingTlds] = useState([]) const [loadingTlds, setLoadingTlds] = useState(true) useEffect(() => { checkAuth() fetchTldData() }, [checkAuth]) const fetchTldData = async () => { try { const trending = await api.getTrendingTlds() setTrendingTlds(trending.trending.slice(0, 4)) } catch (error) { console.error('Failed to fetch TLD data:', error) } finally { setLoadingTlds(false) } } if (isLoading) { return (
) } const getTrendIcon = (priceChange: number) => { if (priceChange > 0) return if (priceChange < 0) return return } return (
{/* Background Effects */}
{/* Primary glow */}
{/* Secondary glow */}
{/* Grid pattern */}
{/* Hero Section */}
{/* Puma Logo */}
pounce {/* Glow ring */}
{/* Main Headline - MASSIVE */}

Others wait. You pounce.

{/* Subheadline */}

Domain intelligence for the decisive. Track any domain. Know the moment it drops. Move before anyone else.

{/* Domain Checker */}
{/* Trust Indicators */}
+ TLDs tracked
Real-time pricing
Instant alerts
{/* Trending TLDs Section */}
{/* Section Header */}
Market Intel

Trending Now

Explore all TLDs
{/* TLD Cards */} {loadingTlds ? (
{[...Array(4)].map((_, i) => (
))}
) : (
{trendingTlds.map((item, index) => ( {/* Hover glow */}
.{item.tld} 0 ? "text-orange-400 bg-orange-400/10" : (item.price_change ?? 0) < 0 ? "text-accent bg-accent/10" : "text-foreground-muted bg-foreground/5" )}> {getTrendIcon(item.price_change ?? 0)} {(item.price_change ?? 0) > 0 ? '+' : ''}{(item.price_change ?? 0).toFixed(1)}%

{item.reason}

{isAuthenticated ? ( ${(item.current_price ?? 0).toFixed(2)}/yr ) : ( )}
))}
)}
{/* Features Section */}
{/* Section Header */}
How It Works

Built for hunters.

The tools that give you the edge. Simple. Powerful. Decisive.

{/* Feature Cards */}
{[ { icon: Eye, title: 'Always Watching', description: 'Daily scans across 886+ TLDs. You sleep, we hunt.', }, { icon: Bell, title: 'Instant Alerts', description: 'Domain drops? You know first. Email alerts the moment it happens.', }, { icon: Clock, title: 'Expiry Intel', description: 'See when domains expire. Plan your acquisition strategy.', }, { icon: Shield, title: 'Your Strategy, Private', description: 'Your watchlist is yours alone. No one sees what you\'re tracking.', }, ].map((feature, i) => (

{feature.title}

{feature.description}

))}
{/* Social Proof / Stats Section */}
{/* Background pattern */}

+

TLDs Tracked

24/7

Monitoring

s

Alert Speed

{/* Pricing CTA Section */}
Pricing

Pick your weapon.

Start free with 5 domains. Scale to 500+ when you need more firepower.

{/* Quick Plans */}

Scout

Free forever

Trader

$19/month

Compare Plans {isAuthenticated ? "Go to Dashboard" : "Start Free"}
{/* Final CTA */}

Ready to hunt?

Track your first domain in under a minute. No credit card required.

{isAuthenticated ? "Go to Dashboard" : "Get Started Free"} {!isAuthenticated && (

Free forever • No credit card • 5 domains included

)}
) }