import { notFound } from 'next/navigation' import Link from 'next/link' import { ArrowLeft, ExternalLink, FileText, Code, Calendar, GitCompare, Heart } from 'lucide-react' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { getAllTools, getCategoryIcon, getCategoryColor } from '@/lib/data' import { formatNumber, formatBytes, slugify } from '@/lib/utils' export async function generateStaticParams() { const tools = getAllTools() return tools.map((tool) => ({ slug: slugify(tool.directory), })) } export default function ToolDetailPage({ params }: { params: { slug: string } }) { const tools = getAllTools() const tool = tools.find((t) => slugify(t.directory) === params.slug) if (!tool) { notFound() } return (
{/* Back Button */} {/* Header */}
{getCategoryIcon(tool.category)}

{tool.name}

{tool.category} {tool.type}

{tool.company}

{tool.description}

{/* Quick Stats */}
Files {tool.file_count} Total Lines {formatNumber(tool.total_lines)} Models {tool.models.length || '-'} Category {tool.category}
{/* Files */} Configuration Files {tool.file_count} files containing system prompts and configurations
{tool.files.map((file) => (
{file.name}
{formatBytes(file.size)} {file.lines && ` • ${formatNumber(file.lines)} lines`}
{file.type}
))}
{/* Models */} {tool.models.length > 0 && ( AI Models Models used or supported by this tool
{tool.models.map((model) => ( {model} ))}
)} {/* Subcategories */} {tool.subcategories && tool.subcategories.length > 0 && ( Related Tools Other tools in this collection
{tool.subcategories.map((sub) => ( {sub} ))}
)}
{/* Sidebar */}
{/* Actions */} Actions {tool.website && ( )} {/* Info */} Information
Company
{tool.company}
Category
{tool.category}
Type
{tool.type}
Total Size
{formatBytes(tool.files.reduce((acc, f) => acc + f.size, 0))}
) }