import Link from "next/link"; import Image from "next/image"; import { runPreflight } from "@/lib/preflight"; import { listProjects } from "@/lib/store"; import { PreflightPanel } from "@/components/preflight-panel"; import { NewProjectButton } from "@/components/new-project-button"; import { ModeToggle } from "@/components/mode-toggle"; import { Card, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import type { ProjectManifest } from "@/lib/types"; export const dynamic = "force-dynamic"; function DemoCard({ project }: { project: ProjectManifest }) { const platform = /nanopore/i.test(project.assay) ? "Nanopore · long-read" : "Illumina · short-read"; return ( {project.name}
{platform}
{project.demoBlurb && ( {project.demoBlurb} )}
); } function fmtDate(iso: string): string { try { return new Date(iso).toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short", }); } catch { return iso; } } function ProjectCard({ project }: { project: ProjectManifest }) { const runCount = project.runIds.length; return (
{project.name} {project.specId}
{project.assay}

{runCount === 0 ? "No runs yet" : `${runCount} run${runCount === 1 ? "" : "s"}`} {" · "} updated {fmtDate(project.updatedAt)}

); } // curated example order: Illumina clean → Illumina problem → Nanopore problem const EXAMPLE_ORDER = ["healthy-library", "adapter-dimer"]; const exampleRank = (id: string) => { const i = EXAMPLE_ORDER.findIndex((k) => id.includes(k)); return i < 0 ? 99 : i; }; export default async function Home() { const [preflight, projects] = await Promise.all([runPreflight(), listProjects()]); const demos = projects.filter((p) => p.demo).sort((a, b) => exampleRank(a.id) - exampleRank(b.id)); const rest = projects.filter((p) => !p.demo); return (
Seqcolyte

Seqcolyte Studio

Root cause analysis for genomic sequencing runs.

Diagnostics Technologies

Projects

{rest.length === 0 ? ( No projects yet Create a project to load a protocol, run the QC pipeline on your reads, and ask the assistant about the results.
) : (
{rest.map((p) => ( ))}
)}
{demos.length > 0 && (

Examples

Worked cases across platforms — open any to see the extracted spec, the QC run, and the diagnosis with its root cause and suggested fix.

{demos.map((project) => ( ))}
)}
); }