Skip to content

Add documentation site with generated API reference - #36

Merged
julia-script merged 2 commits into
mainfrom
claude/nextjs-fumadocs-setup-60se6v
Aug 3, 2026
Merged

Add documentation site with generated API reference#36
julia-script merged 2 commits into
mainfrom
claude/nextjs-fumadocs-setup-60se6v

Conversation

@julia-script

Copy link
Copy Markdown
Owner

This PR adds a complete documentation site for evm-effect built with Next.js, Fumadocs, and Tailwind CSS.

Summary

The documentation site provides hand-written guides and an automatically generated API reference from TSDoc comments in all published packages. The API reference is regenerated on every build to stay in sync with the source code.

Key Changes

  • New apps/docs application: A Next.js + Fumadocs documentation site with:

    • Home page with feature highlights and installation instructions
    • Getting started guide with a complete ETH transfer example
    • Package overview pages for each published package
    • Auto-generated API reference from TypeDoc output
  • API documentation generation (scripts/generate-api-docs.ts):

    • Runs TypeDoc to extract TSDoc comments from all packages
    • Transforms raw markdown output into Fumadocs content tree
    • Flattens @evm-effect/<pkg> package paths to <pkg>/
    • Rewrites all cross-references to match the new structure
    • Adds Fumadocs frontmatter (title, description) to each page
    • Generates meta.json files for stable sidebar ordering
    • Handles TypeDoc's deduplication suffixes to avoid search index collisions
  • TypeDoc configuration:

    • Base configuration in typedoc.base.json with common settings
    • Per-package configurations in each packages/*/typedoc.json
    • Configured to output markdown with proper formatting for Fumadocs
  • Documentation content:

    • Introduction and getting started guides
    • Per-package documentation pages explaining use cases and entry points
    • Links between guides and generated API reference
  • Build integration:

    • Added docs:dev and docs:build workspace commands
    • API generation runs automatically before dev/build
    • Updated pnpm-workspace.yaml to include apps/ directory
    • Added TypeDoc to workspace catalog

Notable Implementation Details

  • The API generation script handles several edge cases:

    • Removes "Defined in" lines pointing to node_modules for inherited members
    • Rewrites relative links to account for the flattened directory structure
    • Disambiguates same-named exports (e.g., schema and inferred type) with -alt suffix
    • Extracts kind information from TypeDoc titles and moves it to page descriptions
    • Generates proper YAML frontmatter with escaped values
  • The site supports content negotiation for LLM access via /llms.mdx/docs/ routes and full-text export at /llms-full.txt

  • Search functionality is provided by Fumadocs' built-in search server

https://claude.ai/code/session_01Sw2ocnrbaaN7ih3XjErNwB

claude added 2 commits August 3, 2026 23:51
Adds apps/docs, a Next.js + Tailwind + Fumadocs documentation site, and wires
the workspace packages up to TypeDoc so their TSDoc comments are published as
an API reference on the site.

- apps/docs: guides (introduction, getting started, per-package pages), landing
  page, search, llms.txt and OG images from the Fumadocs Next.js template
- scripts/generate-api-docs.ts: runs TypeDoc in packages mode, then flattens
  the @evm-effect/<pkg> output, rewrites cross-references, adds frontmatter and
  writes meta.json so the generated pages slot into the Fumadocs sidebar
- typedoc.base.json + packages/*/typedoc.json: shared TypeDoc settings and
  per-package entry points, with source links back to GitHub
- workspace: add apps/* to pnpm-workspace, docs:dev / docs:build / docs:api
  root scripts, and a turbo config so the site builds after its dependencies

The generated content/docs/api tree is git-ignored and rebuilt on every
`pnpm docs:build`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sw2ocnrbaaN7ih3XjErNwB
The package and API-reference folders already show their name in the sidebar,
so repeating it on the index page produced a duplicate-looking entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sw2ocnrbaaN7ih3XjErNwB
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@julia-script
julia-script merged commit b7d5110 into main Aug 3, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants