import Link from "next/link"; import type { ReactNode } from "react"; import type { Metadata } from "next"; import { listDocs } from "@/lib/docs"; import { FAMILIES, GUIDES, familyTree } from "@/lib/specs"; import { SiteShell } from "@/components/site-shell"; export const metadata: Metadata = { title: "Docs ยท LogicSRC", description: "The specification text of every LogicSRC spec, grouped by family, and the guides: data model, CLI and TUI conventions, config, permissions, plugins.", alternates: { canonical: "/docs" }, }; const row: React.CSSProperties = { padding: "0.9rem 0", borderTop: "1px solid #e3e6e0" }; const h3: React.CSSProperties = { margin: "0 0 0.3rem", fontSize: "1.1rem", color: "#101418" }; const p: React.CSSProperties = { color: "#41505d", margin: 0 }; export default function DocsIndex(): ReactNode { const docs = new Map(listDocs().map((d) => [d.slug, d])); const docFor = (path?: string) => (path ? docs.get(path.replace(/^\/docs\//, "")) : undefined); return (

Docs

The specification text, one page per spec, grouped the way{" "} the specs are. Source lives in the{" "} profullstack/logicsrc {" "} repository under docs/.

{FAMILIES.map((family) => (

{family.name}

{family.line}.

    {familyTree(family).flatMap(({ spec, children }) => [spec, ...children]).map((spec) => { const doc = docFor(spec.doc); if (!doc) return null; return (
  • {doc.title}

    {spec.line}.

  • ); })}
))}

Guides

Conventions the reference implementations follow.

    {GUIDES.map((g) => { const doc = docs.get(g.slug); if (!doc) return null; return (
  • {doc.title}

    {doc.excerpt ?

    {doc.excerpt}

    : null}
  • ); })}
); }