spb/autoscholar
Public
1import { disciplineCounts, listTopics, searchPapers } from "@autoscholar/core";2import { DISCIPLINE_LABELS, PublicSearchQuery } from "@autoscholar/schemas";3import Link from "next/link";4import { Disclosure } from "@/components/Disclosure";5import { EmptyState } from "@/components/EmptyState";6import { PaperCard } from "@/components/PaperCard";7import { t } from "@/lib/i18n";8import { db } from "@/lib/server/db";910export const dynamic = "force-dynamic";1112export default async function Home() {13 const d = db();14 const latest = await searchPapers(d, PublicSearchQuery.parse({ pageSize: "7" }));15 const [featured, ...recent] = latest.items;16 const counts = await disciplineCounts(d);17 const topics = await listTopics(d);18 return (19 <div className="space-y-20">20 <section className="grid gap-10 md:grid-cols-12 md:items-end">21 <div className="md:col-span-8">22 <p className="eyebrow">Autonomous Research Foundry</p>23 <h1 className="serif mt-3 text-4xl font-semibold leading-[1.1] tracking-tight sm:text-5xl lg:text-6xl">24 From research instructions to verifiable working papers.25 </h1>26 <p className="muted mt-6 max-w-2xl text-lg leading-relaxed">27 AutoScholar is a research-producing startup and a public library of original, AI-executed working28 papers across disciplines. Each paper is produced by an auditable autonomous workflow, checked by29 deterministic quality gates, and released with its evidence: sources, code, data, build logs and30 provenance.31 </p>32 <div className="mt-8 flex flex-wrap gap-3">33 <Link href="/research" className="btn btn-primary">34 Browse the library35 </Link>36 <Link href="/methodology" className="btn">37 How papers are produced38 </Link>39 </div>40 </div>41 <aside className="surface p-5 text-sm md:col-span-4">42 <p className="eyebrow">Powered by MacLustr</p>43 <p className="muted mt-2">44 {t("footer.credit")} Every run executes in an isolated workspace with enforced budgets, and45 nothing is published unless every hard gate passes.46 </p>47 <Link href="/infrastructure" className="mt-3 inline-block">48 About the infrastructure →49 </Link>50 </aside>51 </section>5253 <section aria-labelledby="latest">54 <div className="flex items-end justify-between gap-4">55 <div>56 <p className="eyebrow">Library</p>57 <h2 id="latest" className="serif mt-1 text-2xl font-semibold">58 New releases59 </h2>60 </div>61 <Link href="/research" className="text-sm">62 All working papers →63 </Link>64 </div>65 <div className="mt-6">66 {!featured ? (67 <EmptyState title="No working papers have been released yet.">{t("library.empty")}</EmptyState>68 ) : (69 <div className="grid gap-4 md:grid-cols-12">70 <div className="md:col-span-7">71 <PaperCard p={featured} featured />72 </div>73 <div className="grid gap-4 md:col-span-5">74 {recent.slice(0, 3).map((p) => (75 <PaperCard key={p.publicId} p={p} />76 ))}77 </div>78 {recent.slice(3).map((p) => (79 <div key={p.publicId} className="md:col-span-4">80 <PaperCard p={p} />81 </div>82 ))}83 </div>84 )}85 </div>86 <div className="mt-6">87 <Disclosure />88 </div>89 </section>9091 <section aria-labelledby="subjects">92 <p className="eyebrow">Subject explorer</p>93 <h2 id="subjects" className="serif mt-1 text-2xl font-semibold">94 Disciplines95 </h2>96 <ul className="mt-6 grid gap-2 sm:grid-cols-2 lg:grid-cols-3">97 {Object.entries(DISCIPLINE_LABELS).map(([slug, name]) => {98 const n = counts.find((c) => c.discipline === slug)?.n ?? 0;99 const topic = topics.find((x) => x.slug === slug);100 return (101 <li key={slug}>102 <Link103 href={topic ? `/topics/${slug}` : `/research?discipline=${slug}`}104 className="surface flex items-center justify-between px-4 py-3 text-sm no-underline hover:bg-[var(--bg-muted)]"105 >106 <span>{name}</span>107 <span className="subtle font-mono text-xs">108 {n} {n === 1 ? "paper" : "papers"}109 </span>110 </Link>111 </li>112 );113 })}114 </ul>115 </section>116117 <section className="grid gap-6 md:grid-cols-3">118 {[119 [120 "Scientific integrity before throughput",121 "No paper is published automatically unless its central claims trace to verified sources or executed artifacts, its citations resolve, and its PDF builds from the released LaTeX source.",122 ],123 [124 "Evidence travels with the paper",125 "Each release ships the manuscript source, verified bibliography, code and data when they were part of the study, a reproducibility note, and a redacted provenance record.",126 ],127 [128 "Honest about what this is",129 "These are AI-generated working papers, not peer-reviewed articles. Automated review is critique, not validation. Corrections and retractions are public and permanent.",130 ],131 ].map(([h, p]) => (132 <div key={h} className="border-t pt-4 hairline">133 <h3 className="serif text-lg font-semibold">{h}</h3>134 <p className="muted mt-2 text-sm leading-relaxed">{p}</p>135 </div>136 ))}137 </section>138 </div>139 );140}141