1import type { Metadata } from 'next';2import Link from 'next/link';3import { EntityBadge } from '@/components/ui/badges';4import { Container, PageHeader } from '@/components/ui/section';5import { Unavailable } from '@/components/ui/unavailable';6import { api, safe } from '@/lib/api';7import { fmtInt, num } from '@/lib/format';8import { routes, typeLabel } from '@/lib/site';910export const metadata: Metadata = { title: 'Explore — every entity type with live counts', description: 'Browse the AI Atlas graph by entity type: models, companies, papers, providers, benchmarks, hardware, frameworks, datasets, tools and more.', alternates: { canonical: '/explore' } };11export const revalidate = 300;1213const BLURB: Record<string, string> = {14 model: 'Foundation and fine-tuned models: parameters, context, openness, prices, benchmarks, lineage.',15 company: 'Labs and companies that develop, serve or study AI.',16 paper: 'Research papers linked to the models and benchmarks they describe.',17 provider: 'Inference providers and their published prices per 1M tokens.',18 benchmark: 'Evaluation suites with results and configurations.',19 hardware: 'GPUs, accelerators and devices with memory and bandwidth specs.',20 framework: 'Training, inference and agent frameworks.',21 dataset: 'Training and evaluation datasets.',22 tool: 'Developer tools, agents and MCP servers.',23 repository: 'Code repositories linked to models and frameworks.',24 regulation: 'Laws, standards and policy instruments affecting AI.',25 incident: 'Reported incidents and safety events.',26};2728export default async function ExplorePage() {29 const res = await safe(api.exploreTypes());30 const items = (res?.items ?? []).slice().sort((a, b) => (num(b.count) ?? 0) - (num(a.count) ?? 0));31 const total = items.reduce((n, t) => n + (num(t.count) ?? 0), 0);32 return (33 <Container>34 <PageHeader eyebrow="Explore" title="The atlas by entity type" lede="Counts are live from the graph. Types without a dedicated section open a generic listing." aside={res ? <p className="tnum text-sm text-ink-3">{fmtInt(total)} entities</p> : undefined} />35 <div className="pb-16">36 {!res ? (37 <Unavailable what="Entity types" />38 ) : (39 <ul className="grid border-l border-t border-rule sm:grid-cols-2 lg:grid-cols-3">40 {items.map((t) => (41 <li key={t.entity_type} className="border-b border-r border-rule">42 <Link href={routes.listing(t.entity_type)} className="flex h-full flex-col px-5 py-5 hover:bg-surface-2">43 <div className="flex items-center justify-between">44 <EntityBadge type={t.entity_type} />45 <span className="tnum text-2xl font-semibold tracking-tight">{fmtInt(t.count)}</span>46 </div>47 <p className="mt-3 font-medium">{t.label || typeLabel(t.entity_type, true)}</p>48 <p className="mt-1 text-sm text-ink-2">{BLURB[t.entity_type] ?? `All ${typeLabel(t.entity_type, true).toLowerCase()} in the graph.`}</p>49 </Link>50 </li>51 ))}52 </ul>53 )}54 </div>55 </Container>56 );57}58