🚀 ULTRA HIGH-PERFORMANCE SEO IMPLEMENTATION ## SEO Features ✅ Comprehensive metadata (OpenGraph, Twitter Cards) ✅ Structured data (JSON-LD) for all pages ✅ Programmatic SEO: 120+ TLD landing pages ✅ Dynamic OG image generation (TLD & Domain pages) ✅ robots.txt with proper crawl directives ✅ XML sitemap with 120+ indexed pages ✅ Rich snippets for domain listings ✅ Breadcrumb navigation schema ✅ FAQ schema for key pages ✅ Product/Offer schema for marketplace ## Performance Optimizations ✅ Next.js Image optimization (AVIF/WebP) ✅ Security headers (HSTS, CSP, XSS protection) ✅ Cache-Control headers (1yr immutable for static) ✅ Gzip compression enabled ✅ Core Web Vitals monitoring (FCP, LCP, FID, CLS, TTFB) ✅ Edge runtime for OG images ✅ Lazy loading setup ✅ PWA manifest with app shortcuts ## Geo-Targeting ✅ Multi-language support (13 locales) ✅ Hreflang alternate tags ✅ Locale detection from headers ✅ Currency formatting per region ✅ x-default fallback ## Analytics ✅ Google Analytics integration ✅ Plausible Analytics (privacy-friendly) ✅ Custom event tracking ✅ Web Vitals reporting ✅ Error tracking ✅ A/B test support ✅ GDPR consent management ## New Files - SEO_PERFORMANCE.md (complete documentation) - frontend/src/components/SEO.tsx (reusable SEO component) - frontend/src/lib/seo.ts (geo-targeting utilities) - frontend/src/lib/analytics.ts (performance monitoring) - frontend/src/lib/domain-seo.ts (marketplace SEO) - frontend/src/app/api/og/tld/route.tsx (dynamic TLD images) - frontend/src/app/api/og/domain/route.tsx (dynamic domain images) - frontend/src/app/*/metadata.ts (page-specific meta) ## Updated Files - frontend/src/app/layout.tsx (root SEO) - frontend/next.config.js (performance config) - frontend/public/robots.txt (crawl directives) - frontend/public/site.webmanifest (PWA config) - frontend/src/app/sitemap.ts (120+ pages) Target: Lighthouse 95+ / 100 SEO Score Expected: 100K+ organic visitors/month (Month 12)
170 lines
4.5 KiB
TypeScript
170 lines
4.5 KiB
TypeScript
import { ImageResponse } from 'next/og'
|
|
import { NextRequest } from 'next/server'
|
|
|
|
export const runtime = 'edge'
|
|
|
|
export async function GET(request: NextRequest) {
|
|
try {
|
|
const { searchParams } = new URL(request.url)
|
|
const tld = searchParams.get('tld') || 'com'
|
|
const price = parseFloat(searchParams.get('price') || '0')
|
|
const trend = parseFloat(searchParams.get('trend') || '0')
|
|
|
|
const trendText = trend > 0 ? `+${trend.toFixed(1)}%` : `${trend.toFixed(1)}%`
|
|
const trendColor = trend > 0 ? '#ef4444' : '#10b981'
|
|
|
|
return new ImageResponse(
|
|
(
|
|
<div
|
|
style={{
|
|
height: '100%',
|
|
width: '100%',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
backgroundColor: '#0a0a0a',
|
|
backgroundImage: 'radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.05) 0%, transparent 50%), radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%)',
|
|
}}
|
|
>
|
|
{/* Logo/Brand */}
|
|
<div
|
|
style={{
|
|
position: 'absolute',
|
|
top: 40,
|
|
left: 60,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
gap: 16,
|
|
}}
|
|
>
|
|
<div
|
|
style={{
|
|
width: 48,
|
|
height: 48,
|
|
borderRadius: '50%',
|
|
background: 'linear-gradient(135deg, #10b981 0%, #059669 100%)',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
fontSize: 28,
|
|
}}
|
|
>
|
|
🐆
|
|
</div>
|
|
<span
|
|
style={{
|
|
fontSize: 32,
|
|
fontWeight: 700,
|
|
color: '#ffffff',
|
|
letterSpacing: '-0.02em',
|
|
}}
|
|
>
|
|
Pounce
|
|
</span>
|
|
</div>
|
|
|
|
{/* Main Content */}
|
|
<div
|
|
style={{
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
padding: '60px',
|
|
}}
|
|
>
|
|
{/* TLD */}
|
|
<div
|
|
style={{
|
|
fontSize: 120,
|
|
fontWeight: 900,
|
|
color: '#ffffff',
|
|
letterSpacing: '-0.04em',
|
|
marginBottom: 20,
|
|
}}
|
|
>
|
|
.{tld.toUpperCase()}
|
|
</div>
|
|
|
|
{/* Price */}
|
|
<div
|
|
style={{
|
|
fontSize: 64,
|
|
fontWeight: 700,
|
|
color: '#10b981',
|
|
marginBottom: 30,
|
|
}}
|
|
>
|
|
${price.toFixed(2)}
|
|
</div>
|
|
|
|
{/* Trend */}
|
|
<div
|
|
style={{
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
gap: 16,
|
|
padding: '16px 32px',
|
|
backgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
borderRadius: 16,
|
|
border: '1px solid rgba(255, 255, 255, 0.1)',
|
|
}}
|
|
>
|
|
<span
|
|
style={{
|
|
fontSize: 28,
|
|
color: '#a1a1aa',
|
|
}}
|
|
>
|
|
1Y Trend:
|
|
</span>
|
|
<span
|
|
style={{
|
|
fontSize: 36,
|
|
fontWeight: 700,
|
|
color: trendColor,
|
|
}}
|
|
>
|
|
{trendText}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Footer */}
|
|
<div
|
|
style={{
|
|
position: 'absolute',
|
|
bottom: 40,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
width: '100%',
|
|
}}
|
|
>
|
|
<div
|
|
style={{
|
|
fontSize: 24,
|
|
color: '#71717a',
|
|
letterSpacing: '0.02em',
|
|
}}
|
|
>
|
|
Domain Intelligence • Real-time Market Data
|
|
</div>
|
|
</div>
|
|
</div>
|
|
),
|
|
{
|
|
width: 1200,
|
|
height: 630,
|
|
}
|
|
)
|
|
} catch (e: any) {
|
|
console.log(`Failed to generate image: ${e.message}`)
|
|
return new Response(`Failed to generate image`, {
|
|
status: 500,
|
|
})
|
|
}
|
|
}
|
|
|