import Link from 'next/link'; import { TOP_LEVEL_CANCERS } from '@cancerindex/ontology'; import { CommandPalette } from '@/components/layout/command-palette'; import { EmptyState } from '@/components/ui/empty-state'; import { Freshness } from '@/components/ui/freshness'; import { Section } from '@/components/ui/section'; import { Badge, ClaimBadge, ConfidenceBadge, StatusBadge } from '@/components/ui/badge'; import { getSiteCounts, getRareSpotlight } from '@/lib/queries/stats'; import { previewSnapshot } from '@/lib/queries/rankings'; import { mostCuratedEvidence } from '@/lib/queries/trials'; import { resolveTopLevel } from '@/lib/queries/cancers'; import { listSources } from '@/lib/queries/sources'; import { fmtInt, fmtValue, fmtDate, scopeLabel, unitLabel, humanize, parseScopeKey } from '@/lib/format'; import { BurdenModule } from '@/components/home/burden-module'; import { RisingModule } from '@/components/home/rising-module'; import { GapsModule } from '@/components/home/gaps-module'; import { TrialIntelModule } from '@/components/home/trial-intel-module'; import { TrialMapModule } from '@/components/home/trial-map-module'; import { GraphModule } from '@/components/home/graph-module'; import { ExplorerModule } from '@/components/home/explorer-module'; import { ApprovalsModule } from '@/components/home/approvals-module'; export const revalidate = 900; export default async function HomePage() { const [counts, spotlight, preview, curated, sources] = await Promise.all([ getSiteCounts(), getRareSpotlight(), previewSnapshot(['mortality_count', 'incidence_count', 'as_mortality_rate', 'active_trials', 'publications_5y', 'curated_evidence_items']), mostCuratedEvidence(8), listSources(), ]); const topLevel = await resolveTopLevel(TOP_LEVEL_CANCERS.map((t) => t.ncit)); const topMatched = TOP_LEVEL_CANCERS.filter((t) => topLevel.has(t.ncit)).length; const ticker: Array<{ label: string; value: number; note: string; href: string }> = [ { label: 'Cancers indexed', value: counts.cancers, note: 'active malignant disease entities (NCIt)', href: '/cancers?malignant=1' }, { label: 'Active oncology trials', value: counts.activeTrials, note: 'interventional, recruiting or active (ClinicalTrials.gov)', href: '/trials?status=active' }, { label: 'Recruiting Phase III', value: counts.recruitingPhase3, note: 'interventional Phase III studies recruiting now', href: '/trials?status=RECRUITING&phase=PHASE3' }, { label: 'Approved oncology drugs', value: counts.approvedDrugs, note: `drugs with ≥ 1 approval record (${fmtInt(counts.approvals)} records, all authorities)`, href: '/approvals' }, { label: 'Genes', value: counts.genes, note: 'HGNC gene records', href: '/genes' }, { label: 'Publications', value: counts.publications, note: 'PubMed records linked', href: '/search' }, { label: 'Sources', value: counts.sources, note: `${counts.activeSources} active connector${counts.activeSources === 1 ? '' : 's'}`, href: '/sources' }, ]; return (
{/* Hero */}

Global cancer intelligence

Understand cancer through data.

CancerIndex connects epidemiology, survival, genomics, treatments, clinical trials, research and regulatory decisions across every recognized cancer entity — with a source, a date and a formula version on every number.

Try glioma, KRAS, osimertinib or an NCT number · or open the Data explorer, the trial intelligence table, the knowledge graph or what changed this month.

{/* Ticker */}
{/* Cancer burden (US, latest year) — §105 "Cancer burden today" */} {/* Data explorer default chart (SPEC §110) */} {/* Clinical trial intelligence (SPEC §10) */} {/* New oncology approvals (SPEC §14) */} {/* Rankings preview */}
All rankings → } > {preview ? ( <> {!preview.metric.slug.match(/incidence|mortality|survival/) ? (

No epidemiology-based ranking has been computed yet (awaiting licensed burden data). Showing the research-activity ranking instead — it measures registered activity, not disease burden.

) : null}
{preview.rows.map((r) => ( ))}
# Cancer {preview.metric.name} ({unitLabel(preview.metric.unit)}) Confidence
{r.rank} {r.canonical_name} {fmtValue(r.value, r.unit)}
Full table, methodology and "Why this rank?" →
) : ( Ranking snapshots are produced by the ranking engine once counters and licensed epidemiology observations are available. Nothing is shown until a snapshot exists with a scope, a formula version and an inputs hash.
Read how rankings are computed
)}
{/* Fastest-rising incidence (derived on the fly, §105/§328) */} {/* Largest trial / research gaps (§105, §265-266) */} {/* Curated evidence */}
{curated.length ? ( <>
{curated.map((r) => ( ))}
Cancer Evidence items (count) Genes (count)
{r.canonical_name} {fmtInt(r.evidence_count)} {fmtInt(r.gene_count)}
) : ( No curated evidence items have been ingested yet. CIViC evidence will appear here grouped by cancer, with native evidence levels and directions. )}
); }