Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a4f4791
chore(site): wire fumadocs-core + fumadocs-mdx content infra
ajweb3dev Jun 3, 2026
e1c72d4
chore(site): scaffold 70 placeholder MDX files mirroring URL structure
ajweb3dev Jun 3, 2026
e63d469
feat(site): catch-all docs route rendering MDX via existing DocPage l…
ajweb3dev Jun 3, 2026
d975c53
chore(site): remove old per-route docs page.tsx files + fix MDX comme…
ajweb3dev Jun 3, 2026
498b33f
feat(create-cdr-kit-app): T3 — remove all mock, premium dark template…
ajweb3dev Jun 3, 2026
4265c88
docs(site): migrate top-level pages from TSX to MDX (T1-E batch 1)
ajweb3dev Jun 3, 2026
371efae
feat(forms): scaffold @cdr-kit/forms package
ajweb3dev Jun 3, 2026
22b2612
feat(forms): storage provider picker with logos
ajweb3dev Jun 3, 2026
3eea16c
feat(forms): CdrForm + CdrField + CdrSubmitButton + useCdrSubmit
ajweb3dev Jun 3, 2026
e433a54
feat(forms): server helpers — storeFormSubmission + readFormSubmission
ajweb3dev Jun 3, 2026
a3e7243
feat(site): T1-F — Orama search + llms.txt + llms-full.txt + per-page…
ajweb3dev Jun 3, 2026
278a939
feat: T2-B docs RainbowKit + T3-C forms scaffolder template
ajweb3dev Jun 3, 2026
a6ecad1
feat(site): T2-C — DocsLiveProvider replaces mock; demos require real…
ajweb3dev Jun 3, 2026
3eed2bf
docs(site): T4-E — @cdr-kit/forms documentation page
ajweb3dev Jun 3, 2026
570e1bd
docs(site): migrate hook pages from TSX to MDX (T1-E batch 3)
ajweb3dev Jun 3, 2026
01f01f2
fix(0.7.0): post-review blockers — search client + scaffold tests + p…
ajweb3dev Jun 3, 2026
be3e268
docs(site): migrate contract pages from TSX to MDX (T1-E batch 4)
ajweb3dev Jun 3, 2026
7dfa103
docs(site): migrate agent-kit pages from TSX to MDX (T1-E batch 5)
ajweb3dev Jun 3, 2026
c1d0fcf
refactor(forms): real storage adapters, not a picker — 9 tests passing
ajweb3dev Jun 3, 2026
8465c57
fix(site): M1/M2/M3 migration nits — address bump, gallery grid, RSC-…
ajweb3dev Jun 3, 2026
c2694a9
fix(0.7.0): V6 review blockers + Turbopack module-not-found fix
ajweb3dev Jun 3, 2026
78ae5ca
fix(create-cdr-kit-app): CdrNetworkChip requires `mode` prop
ajweb3dev Jun 3, 2026
8297fef
fix(create-cdr-kit-app): correct ConditionBadge + VaultCard + CdrErro…
ajweb3dev Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ yarn-debug.log*
.DS_Store
.env.local
.env*.local
.source

# T1 migration temp backup of TSX docs pages
_docs_old_tsx_backup/
4 changes: 4 additions & 0 deletions apps/site/app/api/search/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { source } from "@/lib/source";
import { createFromSource } from "fumadocs-core/search/server";

export const { GET } = createFromSource(source);
95 changes: 95 additions & 0 deletions apps/site/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { notFound } from "next/navigation";
import { readFileSync } from "node:fs";
import { join } from "node:path";
import type { Metadata } from "next";
import type { ComponentType } from "react";
import { source } from "@/lib/source";
import { DocPage } from "@/components/docs/doc-page";
import { CopyPageButton } from "@/components/docs/copy-page-button";
import { getMDXComponents } from "@/lib/mdx-components";

type Props = { params: Promise<{ slug?: string[] }> };

// The frontmatter schema (defined in source.config.ts) doesn't flow into source.getPage().data
// as typed fields — fumadocs surfaces them as `unknown` by default. This interface is the
// runtime shape we know exists.
interface DocFrontmatter {
title: string;
description?: string;
importLine?: string;
breadcrumb?: string[];
prev?: { href: string; label: string };
next?: { href: string; label: string };
body: ComponentType<{ components: ReturnType<typeof getMDXComponents> }>;
toc: Array<{ url: string; title: unknown; depth: number }>;
}

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params;
const page = source.getPage(slug);
if (!page) return {};
const data = page.data as unknown as DocFrontmatter;
return {
title: `${data.title} — cdr-kit`,
description: data.description,
};
}

export async function generateStaticParams() {
return source.generateParams();
}

export default async function Page({ params }: Props) {
const { slug } = await params;
const page = source.getPage(slug);
if (!page) notFound();

const data = page.data as unknown as DocFrontmatter;
const MDX = data.body;

// Map fumadocs TOC ({ url: "#id", title, depth }) → DocTocItem ({ id, label }).
// Only h2/h3 land in the right rail to match the existing scrollspy density.
const tocItems = data.toc
.filter((node) => node.depth <= 3)
.map((node) => ({
id: node.url.replace(/^#/, ""),
label: typeof node.title === "string" ? node.title : "",
}));

// Raw MDX for the per-page Copy button. Server-read once; passed as a string
// to the client component so there's no extra fetch round-trip. The MDX file
// path is derived from the URL: /docs/components/x → content/docs/components/x.mdx;
// /docs → content/docs/index.mdx.
let rawMarkdown = "";
try {
const rel = page.url.replace(/^\/docs\/?/, "") || "index";
const mdxPath = join(process.cwd(), "content/docs", `${rel}.mdx`);
rawMarkdown = readFileSync(mdxPath, "utf-8");
} catch (err) {
// Surface but don't crash — the page itself is already rendered via fumadocs
// page.data.body; the Copy button just degrades to an empty payload.
console.warn(`[docs] Failed to read raw MDX for ${page.url}:`, (err as Error).message);
}

return (
<DocPage
data={{
breadcrumb: data.breadcrumb ?? [],
title: data.title,
badges: <CopyPageButton markdown={rawMarkdown} />,
lede: data.description ?? "",
importLine: data.importLine,
prev: data.prev,
next: data.next,
sections: [
{
id: "content",
title: "",
content: <MDX components={getMDXComponents()} />,
},
],
}}
tocItems={tocItems}
/>
);
}
27 changes: 0 additions & 27 deletions apps/site/app/docs/agent-kit/agentkit/page.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions apps/site/app/docs/agent-kit/goat/page.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions apps/site/app/docs/agent-kit/langchain/page.tsx

This file was deleted.

147 changes: 0 additions & 147 deletions apps/site/app/docs/agent-kit/mcp/page.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions apps/site/app/docs/agent-kit/openai/page.tsx

This file was deleted.

Loading
Loading