caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 07:21:22 +03:00

37 lines
1.0 KiB
TypeScript

export interface SourceItem {
id: string;
source_type: string;
external_id: string;
title: string | null;
url: string;
}
export interface SourceBadge {
label: string;
classes: string;
}
export function badgeFor(sourceType: string): SourceBadge {
if (sourceType === "pubmed") {
return { label: "PubMed", classes: "bg-blue-100 text-blue-800" };
}
if (sourceType === "clinicaltrials") {
return { label: "ClinicalTrials.gov", classes: "bg-purple-100 text-purple-800" };
}
return { label: sourceType, classes: "bg-ink/10 text-ink/70" };
}
export function identifierLabel(sourceType: string, externalId: string): string {
if (sourceType === "pubmed") return `PMID ${externalId}`;
if (sourceType === "clinicaltrials") return externalId;
return externalId;
}
export type TypeFilter = "all" | "pubmed" | "clinicaltrials";
export const TYPE_FILTERS: { value: TypeFilter; label: string }[] = [
{ value: "all", label: "All" },
{ value: "pubmed", label: "PubMed" },
{ value: "clinicaltrials", label: "ClinicalTrials.gov" },
];