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>
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect, useState } from "react";
|
|
import { StatusHeader } from "./_components/StatusHeader";
|
|
import { HealthCard, type HealthResponse } from "./_components/HealthCard";
|
|
import { StatusLoading, StatusError } from "./_components/StatusStates";
|
|
|
|
export default function StatusPage() {
|
|
const [health, setHealth] = useState<HealthResponse | null>(null);
|
|
const [loading, setLoading] = useState(true);
|
|
const [error, setError] = useState<string | null>(null);
|
|
|
|
useEffect(() => {
|
|
let active = true;
|
|
|
|
async function loadHealth(): Promise<void> {
|
|
try {
|
|
const res = await fetch("/api/health", { cache: "no-store" });
|
|
const data = (await res.json()) as HealthResponse;
|
|
if (active) {
|
|
setHealth(data);
|
|
}
|
|
} catch {
|
|
if (active) {
|
|
setError("Could not reach the health endpoint.");
|
|
}
|
|
} finally {
|
|
if (active) {
|
|
setLoading(false);
|
|
}
|
|
}
|
|
}
|
|
|
|
loadHealth();
|
|
|
|
return () => {
|
|
active = false;
|
|
};
|
|
}, []);
|
|
|
|
return (
|
|
<main className="mx-auto max-w-3xl px-6 py-12">
|
|
<StatusHeader />
|
|
|
|
{loading && <StatusLoading />}
|
|
|
|
{!loading && error && <StatusError message={error} />}
|
|
|
|
{!loading && !error && health && <HealthCard health={health} />}
|
|
</main>
|
|
);
|
|
}
|