Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
53 lines
1.7 KiB
TypeScript
53 lines
1.7 KiB
TypeScript
import Image from "next/image";
|
|
import { useState, useMemo } from "react";
|
|
|
|
const SourceCard = ({ source }: { source: { name: string; url: string } }) => {
|
|
const [imageSrc, setImageSrc] = useState(`https://www.google.com/s2/favicons?domain=${source.url}&sz=128`);
|
|
|
|
const handleImageError = () => {
|
|
setImageSrc("/img/globe.svg");
|
|
};
|
|
|
|
// Extract and format the domain from the URL
|
|
const formattedUrl = useMemo(() => {
|
|
try {
|
|
const urlObj = new URL(source.url);
|
|
return urlObj.hostname.replace(/^www\./, '');
|
|
} catch (e) {
|
|
// If URL parsing fails, use the original URL but trim it
|
|
return source.url.length > 50 ? source.url.substring(0, 50) + '...' : source.url;
|
|
}
|
|
}, [source.url]);
|
|
|
|
return (
|
|
<div className="flex h-[79px] w-full items-center gap-3 rounded-lg border border-solid border-gray-700/30 bg-gray-800/30 backdrop-blur-sm shadow-sm px-3 py-2 md:w-auto hover:border-teal-500/30 transition-colors duration-200">
|
|
|
|
<img
|
|
src={imageSrc}
|
|
alt={source.url}
|
|
className="p-1"
|
|
width={44}
|
|
height={44}
|
|
onError={handleImageError} // Update src on error
|
|
/>
|
|
|
|
<div className="flex max-w-[192px] flex-col justify-center gap-[7px]">
|
|
<h6 className="line-clamp-2 text-sm font-medium leading-[normal] text-white">
|
|
{source.name}
|
|
</h6>
|
|
<a
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
href={source.url}
|
|
className="truncate text-sm font-light text-gray-300/60 hover:text-teal-300/80 transition-colors"
|
|
title={source.url}
|
|
>
|
|
{formattedUrl}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SourceCard;
|