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 { mostActiveResearch, 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'; export const revalidate = 900; export default async function HomePage() { const [counts, spotlight, preview, active, curated, sources] = await Promise.all([ getSiteCounts(), getRareSpotlight(), previewSnapshot(['mortality_count', 'incidence_count', 'as_mortality_rate', 'active_trials', 'publications_5y', 'curated_evidence_items']), mostActiveResearch(8), 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', href: '/cancers?malignant=1' }, { label: 'Subtypes', value: counts.subtypes, note: 'histologic and molecular subtypes', href: '/cancers?entity_type=subtype' }, { label: 'Genes', value: counts.genes, note: 'HGNC gene records', href: '/genes' }, { label: 'Variants', value: counts.variants, note: 'distinct variant entities', href: '/genes' }, { label: 'Clinical trials', value: counts.trials, note: 'ClinicalTrials.gov studies ingested', href: '/trials' }, { 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 (
Provenance-first oncology intelligence
Every recognized malignant disease entity — taxonomy, epidemiology, genomics, variants, therapies, trials, literature and transparent rankings — with a source, a date and a formula version on every number.
Try glioma, KRAS, osimertinib or an NCT number.
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}| # | Cancer | {preview.metric.name} ({unitLabel(preview.metric.unit)}) | Confidence |
|---|---|---|---|
| {r.rank} | {r.canonical_name} | {fmtValue(r.value, r.unit)} |
|
| Cancer | Active trials (count) | Recruiting (count) |
|---|---|---|
| {r.canonical_name} | {fmtInt(r.active_trial_count)} | {fmtInt(r.recruiting_trial_count)} |
| Cancer | Evidence items (count) | Genes (count) |
|---|---|---|
| {r.canonical_name} | {fmtInt(r.evidence_count)} | {fmtInt(r.gene_count)} |