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

62 lines
2.1 KiB
TypeScript

import type { Metadata } from "next";
import Link from "next/link";
import { ENDPOINTS } from "../_components/apiEndpoints";
import {
EndpointCard,
EndpointIndex,
} from "../_components/apiReference";
export const metadata: Metadata = {
title: "API reference — Developers — PaperTrail",
description:
"Interactive reference for the PaperTrail public API: authenticate with an API key and verify clinical-trial claims programmatically.",
};
// Interactive API reference for the developer portal. Endpoint definitions live
// in _components/apiEndpoints.ts (generated from lib/apiSpec.ts + the public
// entries); the presentational pieces live in _components/apiReference.tsx.
export default function DeveloperApiReferencePage() {
return (
<div>
<div className="flex items-center justify-between gap-4">
<h1 className="text-2xl font-semibold text-ink/80">API reference</h1>
<Link
href="/console/developers"
className="text-sm text-ink/60 hover:text-accent"
>
← Developers
</Link>
</div>
<p className="mt-3 text-sm leading-relaxed text-ink/70">
The public API is authenticated with an{" "}
<Link href="/console/developers" className="text-accent hover:underline">
API key
</Link>{" "}
in the{" "}
<code className="rounded bg-paper px-1 py-0.5 font-mono text-xs">
x-api-key
</code>{" "}
header. All responses use the standard{" "}
<code className="rounded bg-paper px-1 py-0.5 font-mono text-xs">
{"{ success, data, error }"}
</code>{" "}
envelope. Console webhook-management routes use your session and require
an admin or owner role.
</p>
<section className="mt-8">
<h2 className="text-sm font-medium uppercase tracking-wide text-ink/40">
Endpoints
</h2>
<EndpointIndex endpoints={ENDPOINTS} />
</section>
<div className="mt-6">
{ENDPOINTS.map((e) => (
<EndpointCard key={`${e.method} ${e.path}`} endpoint={e} />
))}
</div>
</div>
);
}