Skip to content

docs: Migrate to Fumadocs#62

Merged
mfkrause merged 16 commits into
masterfrom
docs/fumadocs
Jun 21, 2026
Merged

docs: Migrate to Fumadocs#62
mfkrause merged 16 commits into
masterfrom
docs/fumadocs

Conversation

@mfkrause

@mfkrause mfkrause commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Migrated documentation site to Fumadocs + Next.js framework with improved performance.
    • Added search functionality for documentation pages.
    • Introduced dynamic Open Graph image generation for social sharing.
    • Added platform/provider badges to API documentation.
  • Documentation

    • Restructured all documentation with improved organization and navigation.
    • Added comprehensive home page with feature highlights.
    • Updated installation guides and tutorials with clearer formatting.
    • Auto-generated API reference from source code.
  • Chores

    • Updated build configuration and dependencies.
    • Added SEO enhancements (sitemap, robots.txt, metadata).
    • Configured Netlify deployment settings.

@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for react-native-cloud-storage ready!

Name Link
🔨 Latest commit 3782095
🔍 Latest deploy log https://app.netlify.com/projects/react-native-cloud-storage/deploys/6a3831f216dd8c00085b4041
😎 Deploy Preview https://deploy-preview-62--react-native-cloud-storage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e93b474-000b-4615-89a6-fe95d03e1dfb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The apps/docs app is fully migrated from Docusaurus to Fumadocs + Next.js. This includes replacing all tooling, implementing a TypeDoc-based API reference generation pipeline with @platform/@provider badge annotations, adding custom Fumadocs source loader plugins for sidebar restructuring and badge display, building all Next.js App Router routes (layouts, docs pages, OG images, LLM endpoints, search), and migrating existing MDX content to Fumadocs conventions.

Changes

Docusaurus → Fumadocs + Next.js migration

Layer / File(s) Summary
Toolchain replacement and project config
apps/docs/package.json, apps/docs/tsconfig.json, apps/docs/postcss.config.mjs, apps/docs/next.config.mjs, apps/docs/netlify.toml, apps/docs/.gitignore, apps/docs/README.md
Replaces Docusaurus scripts, dependencies, and config with Next.js/Fumadocs equivalents; adds PostCSS/Tailwind, Netlify build config, legacy Docusaurus URL redirects, and an MDX rewrite rule.
Site metadata and shared layout config
apps/docs/lib/site.ts, apps/docs/lib/layout.shared.tsx, apps/docs/lib/cn.ts
Exports siteUrl/siteName/siteDescription constants, shared baseOptions() with GitHub nav link, and a cn() Tailwind merge helper.
Badge config, normalization utilities, and UI components
apps/docs/config/badges.ts, apps/docs/lib/badges.ts, apps/docs/lib/mdx/headings.tsx, apps/docs/components/badges/pills.tsx, apps/docs/app/global.css
Defines canonical badge labels/aliases, normalizeBadgeLabel/orderBadges, page-data badge readers, TOC badge extraction, withHeadingBadgePills HOC, BadgePills component, and all badge/sidebar CSS utility classes.
Fumadocs source loader plugins
apps/docs/config/api-reference.ts, apps/docs/lib/source/page-tree.ts, apps/docs/lib/source/api-reference-tree-plugin.ts, apps/docs/lib/source/badge-label-plugin.ts
Adds API section key config/ordering constants, page-tree data helpers, a plugin that flattens TypeDoc kind folders into a sidebar root with an Overview entry, and a plugin that injects badge React elements into sidebar item names.
TypeDoc → Fumadocs API reference generation
apps/docs/typedoc.config.mts, apps/docs/scripts/typedoc-frontmatter.mts, apps/docs/source.config.ts, packages/react-native-cloud-storage/src/cloud-storage.ts, packages/react-native-cloud-storage/src/types/main.ts
Configures TypeDoc to output markdown to content/docs/api; the frontmatter renderer hook reads @platform/@provider tags to populate badges/tocBadges in page frontmatter and removes those tags from the rendered body. Source config extends the frontmatter schema and enables processed markdown. Package source gains @provider/@platform JSDoc annotations.
Fumadocs source loader and MDX component wiring
apps/docs/lib/source.ts, apps/docs/mdx-components.tsx
Exports the source loader (with icon, API-tree, and badge-label plugins), getPageImage, getLLMText, and getMDXComponents (conditionally wires h3 with heading badge pills).
Next.js App Router layouts, docs page, robots, and sitemap
apps/docs/app/layout.tsx, apps/docs/app/(home)/layout.tsx, apps/docs/app/(home)/page.tsx, apps/docs/app/docs/layout.tsx, apps/docs/app/docs/[[...slug]]/page.tsx, apps/docs/app/robots.ts, apps/docs/app/sitemap.ts
Implements root layout (Geist fonts, metadata, RootProvider), home page (hero/feature/provider cards), docs layout (DocsLayout with page tree), dynamic docs page (badge extraction, MDX rendering, OG metadata, static params), robots, and sitemap.
LLM text, OG image, search, and AI page-action routes
apps/docs/app/llms.txt/route.ts, apps/docs/app/llms-full.txt/route.ts, apps/docs/app/llms.mdx/docs/[[...slug]]/route.ts, apps/docs/app/og/docs/[...slug]/route.tsx, apps/docs/app/api/search/route.ts, apps/docs/components/ai/page-actions.tsx
Adds LLM index/full-content/per-page markdown routes, dynamic OG image generation, Orama full-text search, and LLMCopyButton/ViewOptions client components for clipboard copy and AI tool deep-links.
MDX content migration to Fumadocs conventions
apps/docs/content/docs/meta.json, apps/docs/content/docs/index.mdx, apps/docs/content/docs/installation/*, apps/docs/content/docs/guides/*, apps/docs/content/docs/example.mdx
Adds meta.json and docs landing page; migrates all existing MDX pages to Fumadocs by adding title/description frontmatter, converting admonition syntax to <Callout>, rewriting internal links to absolute /docs/... routes, and updating install snippets to package-install blocks.

Sequence Diagram(s)

sequenceDiagram
    participant Browser
    participant NextDocsPage as Next.js /docs/[[...slug]]
    participant source as source loader
    participant getMDXComponents
    participant withHeadingBadgePills

    Browser->>NextDocsPage: GET /docs/some-page
    NextDocsPage->>source: getPage(slug)
    source-->>NextDocsPage: page (data.badges, data.tocBadges, data.body)
    NextDocsPage->>getMDXComponents: { tocBadges }
    getMDXComponents->>withHeadingBadgePills: wrap h3 with badgesByHeading
    withHeadingBadgePills-->>getMDXComponents: augmented h3 component
    getMDXComponents-->>NextDocsPage: MDXComponents map
    NextDocsPage->>Browser: DocsPage with MDX body + badge pills under headings
Loading
sequenceDiagram
    participant pnpm as pnpm docs:api
    participant TypeDoc
    participant typedoc-frontmatter.mts
    participant ContentDocs as content/docs/api/*.md

    pnpm->>TypeDoc: run with typedoc.config.mts
    TypeDoc->>typedoc-frontmatter.mts: MarkdownPageEvent.BEGIN per page
    typedoc-frontmatter.mts->>typedoc-frontmatter.mts: extract `@platform/`@provider tags → badges/tocBadges
    typedoc-frontmatter.mts->>TypeDoc: remove tags from rendered comment
    typedoc-frontmatter.mts->>TypeDoc: write title/description/badges/tocBadges → page.frontmatter
    TypeDoc->>ContentDocs: write markdown with frontmatter
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

🐇 Hop hop, Docusaurus is gone,
Fumadocs blooms from dusk to dawn!
TypeDoc tags become badge pills,
The sidebar sorts with custom skills.
LLM routes and OG art,
A new docs site — a rabbit's heart! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: migrating the documentation site from Docusaurus to Fumadocs framework.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fumadocs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🧹 Nitpick comments (1)
apps/docs/lib/source/api-reference-tree-plugin.ts (1)

16-20: ⚡ Quick win

Scope API-folder detection to the actual api/ subtree.

isApiReferenceFolder currently matches by child-folder names only, and root() applies it to every top-level folder (Line 93). That can accidentally reshape non-API sections if they contain similarly named folders. Gate the transform with an explicit API-root check (folder name/ref) before applying flatten/rename logic.

Proposed tightening
 function isApiReferenceFolder(folder: Folder): boolean {
-  return folder.children.some(
+  const folderName = normalizeApiSectionKey(getNodeName(folder.name));
+  if (folderName !== 'api') return false;
+
+  return folder.children.some(
     (child) => child.type === 'folder' && API_SECTION_KEYS.has(normalizeApiSectionKey(getNodeName(child.name)))
   );
 }

Also applies to: 92-95

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/lib/source/api-reference-tree-plugin.ts` around lines 16 - 20, The
isApiReferenceFolder function currently only checks if child folders match API
section names, which can cause false positives in non-API sections that happen
to contain similarly named folders. Add an explicit check to verify the parent
folder itself is actually the API root folder (by checking its name or
reference) before applying the isApiReferenceFolder logic in the root function
around line 93. This ensures the flatten and rename transformations only apply
to the actual api/ subtree and not to unrelated sections that might contain
folders with similar names.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/app/`(home)/layout.tsx:
- Line 4: The Layout function in this file uses the undefined type
LayoutProps<'/'> which is causing a TypeScript error. Define the LayoutProps
type in a centralized layout types file or global types configuration, then
import this type into all layout files including the Layout function in
apps/docs/app/layout.tsx, apps/docs/app/(home)/layout.tsx, and
apps/docs/app/docs/layout.tsx. Apply the LayoutProps type consistently across
all these Layout function component signatures to resolve the undefined type
error across all layout files.

In `@apps/docs/app/docs/layout.tsx`:
- Line 5: The `LayoutProps` type used in the Layout function export is undefined
and needs to be properly imported or defined. Identify where the `LayoutProps`
type should come from (check other layout files or type definition files in the
project), then add the correct import statement to
apps/docs/app/docs/layout.tsx. Once fixed in this file, apply the same
import/type definition solution consistently across all other layout files that
use `LayoutProps` to resolve the cross-file TypeScript error.

In `@apps/docs/app/layout.tsx`:
- Line 26: The Layout component function parameter is using the undefined type
LayoutProps<'/'>. Determine the correct source for this type by checking if it
should be imported from Fumadocs, a custom types file, or elsewhere in the
project. If LayoutProps is not available or not the right type for a Next.js
root layout, replace it with React.PropsWithChildren or another appropriate
layout props interface. Add the necessary import statement at the top of the
file if importing LayoutProps from an external library or internal types file.

In `@apps/docs/components/ai/page-actions.tsx`:
- Around line 27-35: The fetch call for markdownUrl in the ClipboardItem does
not validate the response status before caching and copying content. Add a check
after the fetch response is received (before calling res.text()) to verify that
the response status indicates success (check res.ok or res.status). If the
response is not successful, throw an error instead of proceeding to parse and
cache the response body. This prevents error HTML or error responses from being
cached and copied to the clipboard when the fetch fails with status codes like
404 or 500.

In `@apps/docs/content/docs/index.mdx`:
- Around line 11-13: The API documentation links in lines 11-13 of this mdx file
depend on the postinstall script (typedoc --options typedoc.config.mts &&
fumadocs-mdx) completing successfully to generate the API docs. These links to
CloudStorageProvider, useCloudFile, useIsCloudAvailable, and CloudStorageScope
enumerations and functions will return 404s if the postinstall script fails. Fix
any blocking issues in the postinstall script execution so that TypeDoc can
generate the API documentation files and make these links resolvable. Once the
postinstall script runs successfully, the documentation build can proceed and
these API doc links will be validated.

In `@apps/docs/lib/badges.ts`:
- Around line 21-23: The badge value de-duplication logic in the conditional
block (checking typeof value === 'string' && value.length > 0) does not trim
whitespace from the value before checking and storing it. This allows malformed
entries like '  Android  ' or whitespace-only strings to be stored as-is. Call
the .trim() method on the value before checking its length and adding it to the
seen set, so that the trimmed version is evaluated and stored instead of the
original whitespace-padded value.

In `@apps/docs/lib/layout.shared.tsx`:
- Around line 3-7: The gitConfig object in the export statement has branch set
to 'main', but the repository's actual default branch is 'master'. Update the
branch property in the gitConfig object to use 'master' instead of 'main' to
ensure that any branch-aware links generated from this configuration point to
the correct repository branch.

In `@apps/docs/package.json`:
- Line 11: The postinstall hook in package.json is currently configured to run
TypeDoc and Fumadocs generation, which is blocking package installation when
these tools fail. Remove the postinstall script entry and instead create
separate build or docs scripts (e.g., build, docs, or generate-docs) that
contain the typedoc and fumadocs-mdx commands. This allows npm install to
complete successfully without being blocked by documentation generation
failures.

In `@apps/docs/typedoc.config.mts`:
- Around line 9-17: The typedoc configuration file uses the .mts extension which
requires an external loader and will fail at runtime. Rename typedoc.config.mts
to typedoc.config.mjs, and rename the referenced plugin file
scripts/typedoc-frontmatter.mts to scripts/typedoc-frontmatter.mjs. Update the
plugin array entry that points to the typedoc-frontmatter file to use the new
.mjs extension instead of .mts. Finally, update the postinstall script and any
other references in package.json that point to typedoc.config.mts to use
typedoc.config.mjs instead.

---

Nitpick comments:
In `@apps/docs/lib/source/api-reference-tree-plugin.ts`:
- Around line 16-20: The isApiReferenceFolder function currently only checks if
child folders match API section names, which can cause false positives in
non-API sections that happen to contain similarly named folders. Add an explicit
check to verify the parent folder itself is actually the API root folder (by
checking its name or reference) before applying the isApiReferenceFolder logic
in the root function around line 93. This ensures the flatten and rename
transformations only apply to the actual api/ subtree and not to unrelated
sections that might contain folders with similar names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 905f6d38-1999-45f6-a756-d8acb68c83fb

📥 Commits

Reviewing files that changed from the base of the PR and between eb18b00 and 4ec8d68.

⛔ Files ignored due to path filters (7)
  • apps/docs/app/favicon.ico is excluded by !**/*.ico
  • apps/docs/public/ios_installation.jpg is excluded by !**/*.jpg
  • apps/docs/public/logo.png is excluded by !**/*.png
  • apps/docs/static/img/undraw_dx.svg is excluded by !**/*.svg
  • apps/docs/static/img/undraw_easy_to_use.svg is excluded by !**/*.svg
  • apps/docs/static/img/undraw_expo.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (72)
  • apps/docs/.gitignore
  • apps/docs/README.md
  • apps/docs/app/(home)/layout.tsx
  • apps/docs/app/(home)/page.tsx
  • apps/docs/app/api/search/route.ts
  • apps/docs/app/docs/[[...slug]]/page.tsx
  • apps/docs/app/docs/layout.tsx
  • apps/docs/app/global.css
  • apps/docs/app/layout.tsx
  • apps/docs/app/llms-full.txt/route.ts
  • apps/docs/app/llms.mdx/docs/[[...slug]]/route.ts
  • apps/docs/app/llms.txt/route.ts
  • apps/docs/app/og/docs/[...slug]/route.tsx
  • apps/docs/app/robots.ts
  • apps/docs/app/sitemap.ts
  • apps/docs/components/ai/page-actions.tsx
  • apps/docs/components/badges/pills.tsx
  • apps/docs/config/api-reference.ts
  • apps/docs/config/badges.ts
  • apps/docs/content/docs/example.mdx
  • apps/docs/content/docs/guides/google-drive-files-same-name.mdx
  • apps/docs/content/docs/guides/migrating-icloud-documents.mdx
  • apps/docs/content/docs/guides/using-multiple-providers.mdx
  • apps/docs/content/docs/index.mdx
  • apps/docs/content/docs/installation/configure-google-drive.mdx
  • apps/docs/content/docs/installation/expo.mdx
  • apps/docs/content/docs/installation/react-native.mdx
  • apps/docs/content/docs/meta.json
  • apps/docs/docs/api/CloudStorage.md
  • apps/docs/docs/api/CloudStorageError.md
  • apps/docs/docs/api/_category_.json
  • apps/docs/docs/api/enums/CloudStorageErrorCode.md
  • apps/docs/docs/api/enums/CloudStorageProvider.md
  • apps/docs/docs/api/enums/CloudStorageScope.md
  • apps/docs/docs/api/enums/_category_.json
  • apps/docs/docs/api/hooks/_category_.json
  • apps/docs/docs/api/hooks/useCloudFile.md
  • apps/docs/docs/api/hooks/useIsCloudAvailable.md
  • apps/docs/docs/api/interfaces/CloudStorageFileStat.md
  • apps/docs/docs/api/interfaces/_category_.json
  • apps/docs/docs/guides/_category_.json
  • apps/docs/docs/installation/_category_.json
  • apps/docs/docs/intro.md
  • apps/docs/docusaurus.config.ts
  • apps/docs/lib/badges.ts
  • apps/docs/lib/cn.ts
  • apps/docs/lib/layout.shared.tsx
  • apps/docs/lib/mdx/headings.tsx
  • apps/docs/lib/site.ts
  • apps/docs/lib/source.ts
  • apps/docs/lib/source/api-reference-tree-plugin.ts
  • apps/docs/lib/source/badge-label-plugin.ts
  • apps/docs/lib/source/page-tree.ts
  • apps/docs/mdx-components.tsx
  • apps/docs/netlify.toml
  • apps/docs/next.config.mjs
  • apps/docs/package.json
  • apps/docs/postcss.config.mjs
  • apps/docs/scripts/typedoc-frontmatter.mts
  • apps/docs/sidebars.ts
  • apps/docs/source.config.ts
  • apps/docs/src/components/HomepageFeatures/index.tsx
  • apps/docs/src/components/HomepageFeatures/styles.module.css
  • apps/docs/src/css/custom.css
  • apps/docs/src/pages/index.module.css
  • apps/docs/src/pages/index.tsx
  • apps/docs/src/pages/markdown-page.md
  • apps/docs/static/.nojekyll
  • apps/docs/tsconfig.json
  • apps/docs/typedoc.config.mts
  • packages/react-native-cloud-storage/src/cloud-storage.ts
  • packages/react-native-cloud-storage/src/types/main.ts
💤 Files with no reviewable changes (23)
  • apps/docs/docs/intro.md
  • apps/docs/docs/api/interfaces/category.json
  • apps/docs/docs/api/hooks/useCloudFile.md
  • apps/docs/src/pages/markdown-page.md
  • apps/docs/docs/api/CloudStorageError.md
  • apps/docs/docs/api/enums/category.json
  • apps/docs/docs/api/enums/CloudStorageProvider.md
  • apps/docs/src/components/HomepageFeatures/index.tsx
  • apps/docs/docs/guides/category.json
  • apps/docs/docs/api/hooks/category.json
  • apps/docs/sidebars.ts
  • apps/docs/docs/installation/category.json
  • apps/docs/docs/api/CloudStorage.md
  • apps/docs/src/css/custom.css
  • apps/docs/docs/api/enums/CloudStorageScope.md
  • apps/docs/docs/api/interfaces/CloudStorageFileStat.md
  • apps/docs/docs/api/hooks/useIsCloudAvailable.md
  • apps/docs/docs/api/enums/CloudStorageErrorCode.md
  • apps/docs/src/components/HomepageFeatures/styles.module.css
  • apps/docs/src/pages/index.tsx
  • apps/docs/src/pages/index.module.css
  • apps/docs/docusaurus.config.ts
  • apps/docs/docs/api/category.json

import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/lib/layout.shared';

export default function Layout({ children }: LayoutProps<'/'>) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

LayoutProps<'/'>undefined — same cross-file TypeScript error as root layout.

This file also uses the undefined LayoutProps<'/'> type. Once the type is defined and imported globally (or in a layout types file), apply it consistently across all layout files: apps/docs/app/layout.tsx, apps/docs/app/(home)/layout.tsx, and apps/docs/app/docs/layout.tsx.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/app/`(home)/layout.tsx at line 4, The Layout function in this file
uses the undefined type LayoutProps<'/'> which is causing a TypeScript error.
Define the LayoutProps type in a centralized layout types file or global types
configuration, then import this type into all layout files including the Layout
function in apps/docs/app/layout.tsx, apps/docs/app/(home)/layout.tsx, and
apps/docs/app/docs/layout.tsx. Apply the LayoutProps type consistently across
all these Layout function component signatures to resolve the undefined type
error across all layout files.

import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { baseOptions } from '@/lib/layout.shared';

export default function Layout({ children }: LayoutProps<'/docs'>) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

LayoutProps<'/docs'>undefined — same cross-file TypeScript error.

This file repeats the undefined LayoutProps type used in other layouts. Fix the type definition/import once and apply consistently across all layout files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/app/docs/layout.tsx` at line 5, The `LayoutProps` type used in the
Layout function export is undefined and needs to be properly imported or
defined. Identify where the `LayoutProps` type should come from (check other
layout files or type definition files in the project), then add the correct
import statement to apps/docs/app/docs/layout.tsx. Once fixed in this file,
apply the same import/type definition solution consistently across all other
layout files that use `LayoutProps` to resolve the cross-file TypeScript error.

Comment thread apps/docs/app/layout.tsx
description: siteDescription,
};

export default function Layout({ children }: LayoutProps<'/'>) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

LayoutProps<'/'>undefined TypeScript error — layout component parameter type not imported or defined.

Line 26 declares the layout component parameter as LayoutProps<'/'>, but this type is not imported or defined anywhere in the file. This will cause a TypeScript compilation failure.

Next.js root layouts typically use React.PropsWithChildren or a custom layout props interface. Verify whether LayoutProps should be imported from a library (e.g., Fumadocs, a custom types file) or replaced with the correct type.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/app/layout.tsx` at line 26, The Layout component function parameter
is using the undefined type LayoutProps<'/'>. Determine the correct source for
this type by checking if it should be imported from Fumadocs, a custom types
file, or elsewhere in the project. If LayoutProps is not available or not the
right type for a Next.js root layout, replace it with React.PropsWithChildren or
another appropriate layout props interface. Add the necessary import statement
at the top of the file if importing LayoutProps from an external library or
internal types file.

Comment on lines +27 to +35
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text();
cache.set(markdownUrl, content);

return content;
}),
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Handle non-success fetch responses before caching clipboard content.

Line 29 currently caches/copies any response body. If the request returns 404/500, users can copy error HTML and poison the cache for that page URL.

Proposed fix
-      await navigator.clipboard.write([
-        new ClipboardItem({
-          'text/plain': fetch(markdownUrl).then(async (res) => {
-            const content = await res.text();
-            cache.set(markdownUrl, content);
-
-            return content;
-          }),
-        }),
-      ]);
+      await navigator.clipboard.write([
+        new ClipboardItem({
+          'text/plain': fetch(markdownUrl).then(async (res) => {
+            if (!res.ok) {
+              throw new Error(`Failed to fetch markdown: ${res.status}`);
+            }
+            const content = await res.text();
+            cache.set(markdownUrl, content);
+            return content;
+          }),
+        }),
+      ]);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text();
cache.set(markdownUrl, content);
return content;
}),
}),
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
if (!res.ok) {
throw new Error(`Failed to fetch markdown: ${res.status}`);
}
const content = await res.text();
cache.set(markdownUrl, content);
return content;
}),
}),
]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/components/ai/page-actions.tsx` around lines 27 - 35, The fetch
call for markdownUrl in the ClipboardItem does not validate the response status
before caching and copying content. Add a check after the fetch response is
received (before calling res.text()) to verify that the response status
indicates success (check res.ok or res.status). If the response is not
successful, throw an error instead of proceeding to parse and cache the response
body. This prevents error HTML or error responses from being cached and copied
to the clipboard when the fetch fails with status codes like 404 or 500.

Comment on lines +11 to +13
- **Two providers, one API** — [iCloud](/docs/api/enumerations/CloudStorageProvider) (via a native CloudKit module) and [Google Drive](/docs/installation/configure-google-drive) (via the REST API). Use the platform default or [switch between them at runtime](/docs/guides/using-multiple-providers).
- **React hooks** — [`useCloudFile`](/docs/api/functions/useCloudFile) and [`useIsCloudAvailable`](/docs/api/functions/useIsCloudAvailable) keep your components in sync with cloud state.
- **Scopes** — read and write in a hidden, app-private container ([`AppData`](/docs/api/enumerations/CloudStorageScope)) or the user-visible iCloud Drive / Google Drive [`Documents`](/docs/api/enumerations/CloudStorageScope) folder.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

API doc links depend on TypeDoc generation from postinstall.

Lines 11–13 link to generated API docs:

  • /docs/api/enumerations/CloudStorageProvider
  • /docs/api/functions/useCloudFile
  • /docs/api/functions/useIsCloudAvailable
  • /docs/api/enumerations/CloudStorageScope

These links will return 404s if the postinstall script (typedoc --options typedoc.config.mts && fumadocs-mdx) fails. Currently, the build is blocked by postinstall failures; unblock that to validate the API links.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/index.mdx` around lines 11 - 13, The API documentation
links in lines 11-13 of this mdx file depend on the postinstall script (typedoc
--options typedoc.config.mts && fumadocs-mdx) completing successfully to
generate the API docs. These links to CloudStorageProvider, useCloudFile,
useIsCloudAvailable, and CloudStorageScope enumerations and functions will
return 404s if the postinstall script fails. Fix any blocking issues in the
postinstall script execution so that TypeDoc can generate the API documentation
files and make these links resolvable. Once the postinstall script runs
successfully, the documentation build can proceed and these API doc links will
be validated.

Comment thread apps/docs/lib/badges.ts
Comment on lines +21 to +23
if (typeof value === 'string' && value.length > 0) {
seen.add(value);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Trim badge values before de-duplication.

Line 21 accepts strings like ' Android ' or whitespace-only entries as-is, which can leak malformed labels into rendering. Trim before checking length and storing.

Suggested change
   for (const value of values) {
-    if (typeof value === 'string' && value.length > 0) {
-      seen.add(value);
+    if (typeof value === 'string') {
+      const normalized = value.trim();
+      if (normalized.length > 0) {
+        seen.add(normalized);
+      }
     }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (typeof value === 'string' && value.length > 0) {
seen.add(value);
}
for (const value of values) {
if (typeof value === 'string') {
const normalized = value.trim();
if (normalized.length > 0) {
seen.add(normalized);
}
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/lib/badges.ts` around lines 21 - 23, The badge value de-duplication
logic in the conditional block (checking typeof value === 'string' &&
value.length > 0) does not trim whitespace from the value before checking and
storing it. This allows malformed entries like '  Android  ' or whitespace-only
strings to be stored as-is. Call the .trim() method on the value before checking
its length and adding it to the seen set, so that the trimmed version is
evaluated and stored instead of the original whitespace-padded value.

Comment on lines +3 to +7
export const gitConfig = {
user: 'kuatsu',
repo: 'react-native-cloud-storage',
branch: 'main',
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify repo default branch and compare with apps/docs/lib/layout.shared.tsx gitConfig.branch.
gh api repos/kuatsu/react-native-cloud-storage --jq '.default_branch'
rg -n "branch:\\s*'[^']+'" apps/docs/lib/layout.shared.tsx

Repository: kuatsu/react-native-cloud-storage

Length of output: 104


Update gitConfig.branch from 'main' to 'main' to match the repository's default branch.

The repository's default branch is master, but line 6 sets branch: 'main'. This mismatch will cause branch-aware links generated from this config to point to non-existent refs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/lib/layout.shared.tsx` around lines 3 - 7, The gitConfig object in
the export statement has branch set to 'main', but the repository's actual
default branch is 'master'. Update the branch property in the gitConfig object
to use 'master' instead of 'main' to ensure that any branch-aware links
generated from this configuration point to the correct repository branch.

Comment thread apps/docs/package.json Outdated
"start": "next start",
"docs:api": "typedoc --options typedoc.config.mts",
"typecheck": "pnpm run docs:api && fumadocs-mdx && next typegen && tsc --noEmit",
"postinstall": "typedoc --options typedoc.config.mts && fumadocs-mdx",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Decouple docs generation from postinstall to unblock CI installs.

Line 11 currently makes package installation fail if TypeDoc/Fumadocs generation fails, and your pipeline logs show this is already happening. Move generation to explicit build/docs scripts (or make postinstall non-blocking) so dependency install remains reliable.

Suggested change
-    "postinstall": "typedoc --options typedoc.config.mts && fumadocs-mdx",
+    "postinstall": "echo 'Skipping docs generation in postinstall'",
+    "docs:generate": "typedoc --options typedoc.config.mts && fumadocs-mdx",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"postinstall": "typedoc --options typedoc.config.mts && fumadocs-mdx",
"postinstall": "echo 'Skipping docs generation in postinstall'",
"docs:generate": "typedoc --options typedoc.config.mts && fumadocs-mdx",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/package.json` at line 11, The postinstall hook in package.json is
currently configured to run TypeDoc and Fumadocs generation, which is blocking
package installation when these tools fail. Remove the postinstall script entry
and instead create separate build or docs scripts (e.g., build, docs, or
generate-docs) that contain the typedoc and fumadocs-mdx commands. This allows
npm install to complete successfully without being blocked by documentation
generation failures.

Source: Pipeline failures

Comment on lines +9 to +17
const config = {
entryPoints: [path.join(packageRoot, 'src', 'index.ts')],
tsconfig: path.join(packageRoot, 'tsconfig.json'),
out: path.join(docsRoot, 'content', 'docs', 'api'),
plugin: [
'typedoc-plugin-markdown',
'typedoc-plugin-frontmatter',
fileURLToPath(new URL('scripts/typedoc-frontmatter.mts', import.meta.url)),
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== TypeDoc option usage =="
rg -n "typedoc --options" apps/docs/package.json

echo "== TypeDoc config files present =="
fd -a --full-path 'typedoc\.config\.(mts|mjs|js|cjs)$' apps/docs

echo "== Runtime-loaded plugin file extension references =="
rg -n "typedoc-frontmatter\.(mts|mjs|ts|js)" apps/docs/typedoc.config.*

Repository: kuatsu/react-native-cloud-storage

Length of output: 460


🏁 Script executed:

# Check if the typedoc-frontmatter.mts file exists
fd -a 'typedoc-frontmatter' apps/docs/

# Check TypeDoc version and related deps
cat apps/docs/package.json | grep -A 5 '"typedoc"'

# Look for any CI configuration that might show actual failures
fd -a '.github|\.gitlab|\.circleci|\.travis|Jenkinsfile' --max-depth 3

Repository: kuatsu/react-native-cloud-storage

Length of output: 281


🌐 Web query:

TypeDoc .mts module loading runtime support TypeScript executable

💡 Result:

TypeDoc supports.mts files as input for documentation generation [1][2][3]. Regarding runtime support for configuration files (e.g., typedoc.mts) and execution: 1. Input Handling: TypeDoc processes.mts files as TypeScript modules [4]. Recent updates have explicitly added support for.mts and.cts extensions for features like @includeCode [1][2][3]. 2. Configuration File Loading: TypeDoc does not natively execute.mts files as configuration files [5]. If you want to use a TypeScript-based configuration file (typedoc.mts), you must use a runtime loader to transpile or strip types before TypeDoc reads the config [5]. A common, recommended approach is to use the tsx package via the NODE_OPTIONS environment variable to enable this: NODE_OPTIONS="--import tsx" npx typedoc --options typedoc.mts [5] 3. Runtime Execution: If you are attempting to execute TypeScript code directly at runtime, Node.js now provides built-in support for type stripping (starting in newer versions) or you can use established third-party packages like tsx or ts-node [6][7][8]. For.mts files, which are treated as ES Modules by Node.js, ensure you are using a loader that supports the ESM resolution algorithm [6][7][9]. In summary, while TypeDoc natively understands.mts as a source file for documentation, it requires an external loader (like tsx) to process.mts configuration files at runtime [5].

Citations:


🏁 Script executed:

# Check if there's any CI configuration or environment setup
find . -type f \( -name "*.yml" -o -name "*.yaml" -o -name "*.json" \) -path "*/.github/*" -o -path "*/.gitlab*" -o -path "*/CI/*" 2>/dev/null | head -20

# Check package.json scripts more carefully for any NODE_OPTIONS or loader setup
cat apps/docs/package.json | grep -A 2 -B 2 "docs:api\|postinstall"

# Check if tsx or similar is available as a dependency
cat apps/docs/package.json | grep -i "tsx\|ts-node\|loader"

Repository: kuatsu/react-native-cloud-storage

Length of output: 806


🏁 Script executed:

# Check if any CI workflow runs the docs commands
grep -r "pnpm run\|npm run\|yarn run\|pnpm install\|npm install" .github/workflows/ 2>/dev/null | grep -E "build|dev|docs|postinstall|typecheck"

# Look for postinstall context in CI
grep -r "postinstall\|node_modules" .github/workflows/ 2>/dev/null

# Check root package.json for workspace setup and if postinstall is defined there
grep -A 10 "postinstall\|scripts" package.json 2>/dev/null | head -30

Repository: kuatsu/react-native-cloud-storage

Length of output: 873


TypeDoc .mts configuration files cannot load at runtime without external loaders.

typedoc --options typedoc.config.mts fails because TypeDoc 0.28.19 requires an external loader (e.g., tsx) to execute .mts configuration files, and no such loader is configured in the project. The same issue applies to the plugin entry at scripts/typedoc-frontmatter.mts. Both the config file and the runtime-loaded plugin must use .mjs, .cjs, or .js extensions instead.

The postinstall hook "typedoc --options typedoc.config.mts && fumadocs-mdx" will fail whenever dependencies are installed.

Suggested changes

Rename apps/docs/typedoc.config.mts to apps/docs/typedoc.config.mjs and apps/docs/scripts/typedoc-frontmatter.mts to apps/docs/scripts/typedoc-frontmatter.mjs, then update references in apps/docs/package.json scripts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/typedoc.config.mts` around lines 9 - 17, The typedoc configuration
file uses the .mts extension which requires an external loader and will fail at
runtime. Rename typedoc.config.mts to typedoc.config.mjs, and rename the
referenced plugin file scripts/typedoc-frontmatter.mts to
scripts/typedoc-frontmatter.mjs. Update the plugin array entry that points to
the typedoc-frontmatter file to use the new .mjs extension instead of .mts.
Finally, update the postinstall script and any other references in package.json
that point to typedoc.config.mts to use typedoc.config.mjs instead.

Source: Pipeline failures

@mfkrause mfkrause merged commit 08efa31 into master Jun 21, 2026
5 checks passed
@mfkrause mfkrause deleted the docs/fumadocs branch June 21, 2026 23:17
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.

1 participant