Leadtype
Integrate

Framework integration matrix

Leadtype stays framework-neutral at the core, then exposes thin adapters where a framework has a native routing, prerender, or state convention. The adapters do not render UI components; your app owns markup, styling, and accessibility.

FrameworkHuman docs routeAgent markdown routeSearch helperDogfood app
Next.js App RoutergenerateStaticParams() + server componentmiddleware or leadtype/next route handlerleadtype/search/reactapps/next-example
TanStack Startcatch-all route + generated manifestserver route / Nitro middlewareleadtype/search/reactapps/tanstack
Nuxt/NitroVue page + Nitro API routeNitro route or middlewareleadtype/search/vueapps/nuxt-example
AstrogetStaticPaths()generated static markdown files, or leadtype/astro endpoint in server outputleadtype/search/clientapps/astro-example
SvelteKit+page.server.ts + +page.svelte+server.ts under a .md routeleadtype/search/svelteapps/sveltekit-example
Fumadocsleadtype/fumadocs source adapterNext route/middleware patternReact search helperapps/fumadocs-example

Shared build step

Every reference app generates the same site artifact shape before the framework build:

That writes /llms.txt, /llms-full.txt, /docs/*.md, search JSON, sitemap files, robots files, and /docs/agent-readability.json.

SvelteKit uses the same command shape with --out static because SvelteKit serves static assets from that directory. If your docs are mounted somewhere other than /docs, pass the matching path to the adapter's basePath or artifactBasePath option.

For deployment paths across Vercel, Netlify, Cloudflare, and framework static adapters, see Deploy generated artifacts.

Next.js App Router

Use leadtype/next for static params and page data when you render from a DocsSource:

app/docs/[[...slug]]/page.tsx

Use leadtype/search/react in client search components.

Use createGenerateMetadata() for App Router page metadata:

app/docs/[[...slug]]/page.tsx

Render JSON-LD from createDocsJsonLd() in the page body; the deployment recipe shows the route-aware snippet.

Use createDocsProxy() when a Next Proxy owns markdown negotiation for the same route tree:

proxy.ts

TanStack Start

TanStack Start follows the same shape as the flagship dogfood app: generate a route manifest, lazy-load MDX modules by slug, and use leadtype/search/react for search.

Nuxt/Nitro

Nuxt Content is a Nuxt CMS. Leadtype is the portable artifact pipeline: use it when the same source needs framework-agnostic markdown, search JSON, llms.txt, and package docs.

Keep Leadtype source loading and adapter helpers in Nitro server files, not Vue client bundles:

server/api/docs.get.ts

Use leadtype/search/vue for the client search composable.

Astro

Use leadtype/astro to match Astro's getStaticPaths() shape and endpoint signature:

src/pages/docs/[...slug].astro
src/pages/docs/[...slug].md.ts

Static Astro apps can also serve markdown mirrors directly from the files generated into public/docs. Astro does not need a fake hook. Use leadtype/search/client from a browser script or from any island framework.

SvelteKit

Use the generated artifact manifest for prerender entries, render generated markdown in +page.server.ts, and keep markdown responses in a .md endpoint:

src/routes/docs/[...slug]/+page.server.ts

Use leadtype/search/svelte for store-based client search.

Fumadocs

Fumadocs uses leadtype/fumadocs to map the source primitive into Fumadocs' Source contract. Pair it with the same generated artifact serving used by the Next example.

Verification

The implemented dogfood apps are expected to build in CI: