Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Description

Adds fumadocs-based documentation site to the monorepo at apps/docs. Documentation built on Next.js 16 with MDX support, search, and Tailwind CSS styling.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Changes Made

  • Created apps/ directory and updated pnpm-workspace.yaml to include apps/*
  • Initialized fumadocs via pnpm create fumadocs-app at apps/docs
  • Configured package as @hotcrm/docs following monorepo naming convention
  • Added dev:docs and build:docs scripts to root package.json
  • Included sample MDX content in content/docs/ with proper frontmatter and configuration

Testing

  • Unit tests pass (npm test)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build) - requires network access to Google Fonts in CI
  • Manual testing completed
  • New tests added (if applicable)

Screenshots

N/A - Documentation infrastructure only

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

The docs site uses:

  • Next.js 16.1.4 with App Router
  • fumadocs-core 16.4.9 and fumadocs-ui 16.4.9 for documentation framework
  • Tailwind CSS 4.1.18 for styling
  • TypeScript 5.9.3 with strict type checking

Start dev server: pnpm dev:docs
Content location: apps/docs/content/docs/*.mdx

Build may fail in restricted network environments due to Google Fonts dependency in layout.tsx.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/hotcrm/hotcrm/apps/docs/node_modules/.bin/../next/dist/bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

在 apps/docs 中初始化 fumadocs, 使用pnpm create fumadocs-app


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Initialize fumadocs in apps/docs Initialize fumadocs documentation site in apps/docs Jan 27, 2026
Copilot AI requested a review from hotlong January 27, 2026 11:56
@hotlong hotlong marked this pull request as ready for review January 27, 2026 12:01
Copilot AI review requested due to automatic review settings January 27, 2026 12:01
@hotlong hotlong merged commit 292f8a7 into main Jan 27, 2026
7 of 9 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR initializes a fumadocs-based documentation site within the HotCRM monorepo at apps/docs. The documentation is built on Next.js 16.1.4 with MDX support, providing a modern, searchable documentation platform with AI-friendly features like LLM text endpoints.

Changes:

  • Added apps/* workspace to pnpm-workspace.yaml and created the @hotcrm/docs package
  • Initialized fumadocs documentation framework with TypeScript, Tailwind CSS 4, and React 19
  • Configured development and build scripts in root package.json for easy access to docs commands

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Added apps/* to workspace packages for docs app
package.json Added dev:docs and build:docs scripts for documentation site
apps/docs/tsconfig.json TypeScript configuration with Next.js plugin and strict mode
apps/docs/source.config.ts Fumadocs MDX configuration for content processing
apps/docs/postcss.config.mjs PostCSS configuration for Tailwind CSS 4
apps/docs/package.json Package dependencies including Next.js 16, fumadocs, and Tailwind CSS 4
apps/docs/next.config.mjs Next.js configuration with MDX support and LLM content rewrites
apps/docs/mdx-components.tsx MDX component configuration integrating fumadocs UI components
apps/docs/lib/source.ts Content source adapter with page metadata and LLM text utilities
apps/docs/lib/layout.shared.tsx Shared layout configuration for documentation navigation
apps/docs/lib/cn.ts Utility for Tailwind CSS class merging
apps/docs/content/docs/test.mdx Sample MDX documentation with components demonstration
apps/docs/content/docs/index.mdx Documentation homepage with welcome content
apps/docs/components/ai/page-actions.tsx AI-powered page actions for copying markdown and opening in AI tools
apps/docs/app/og/docs/[...slug]/route.tsx Dynamic Open Graph image generation for documentation pages
apps/docs/app/llms.txt/route.ts LLM-friendly documentation index endpoint
apps/docs/app/llms.mdx/docs/[[...slug]]/route.ts Individual page markdown endpoint for LLM access
apps/docs/app/llms-full.txt/route.ts Full documentation export endpoint for LLMs
apps/docs/app/layout.tsx Root layout with Inter font and fumadocs provider
apps/docs/app/global.css Global styles importing Tailwind and fumadocs themes
apps/docs/app/docs/layout.tsx Documentation layout with navigation tree
apps/docs/app/docs/[[...slug]]/page.tsx Dynamic documentation page component with metadata generation
apps/docs/app/api/search/route.ts Search API endpoint using Orama search engine
apps/docs/app/(home)/page.tsx Documentation site homepage
apps/docs/app/(home)/layout.tsx Homepage layout configuration
apps/docs/README.md Documentation site setup and usage instructions
apps/docs/.gitignore Git ignore rules for Next.js and fumadocs artifacts

export function baseOptions(): BaseLayoutProps {
return {
nav: {
title: 'My App',
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The navigation title is set to the generic placeholder "My App" instead of "HotCRM". This should be updated to match the project branding.

Suggested change
title: 'My App',
title: 'HotCRM',

Copilot uses AI. Check for mistakes.
if (!page) notFound();

return new ImageResponse(
<DefaultImage title={page.data.title} description={page.data.description} site="My App" />,
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The site name in the Open Graph image is set to the generic placeholder "My App" instead of "HotCRM". This should be updated to match the project branding for consistent social media previews.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +30
const gitConfig = {
user: 'username',
repo: 'repo',
branch: 'main',
};

return (
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription className="mb-0">{page.data.description}</DocsDescription>
<div className="flex flex-row gap-2 items-center border-b pb-6">
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
<ViewOptions
markdownUrl={`${page.url}.mdx`}
// update it to match your repo
githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/docs/content/docs/${page.path}`}
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The git configuration uses placeholder values ('username', 'repo') instead of the actual repository information. Based on the repository badges in README.md, this should be updated to use 'hotcrm' for both user and repo. Additionally, the GitHub URL path is incorrect - it should be 'apps/docs/content/docs' instead of 'docs/content/docs' to match the actual file structure in this monorepo.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +13
npm run dev
# or
pnpm dev
# or
yarn dev
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The README suggests running 'npm run dev' as the first option, but this is a pnpm monorepo (as indicated by pnpm-workspace.yaml and the root package.json's engines field requiring pnpm >= 9.0.0). The documentation should prioritize pnpm commands or remove npm/yarn alternatives to avoid confusion, especially since the monorepo structure requires pnpm workspace features.

Suggested change
npm run dev
# or
pnpm dev
# or
yarn dev
pnpm dev

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +40
const [checked, onClick] = useCopyButton(async () => {
const cached = cache.get(markdownUrl);
if (cached) return navigator.clipboard.writeText(cached);

setLoading(true);

try {
await navigator.clipboard.write([
new ClipboardItem({
'text/plain': fetch(markdownUrl).then(async (res) => {
const content = await res.text();
cache.set(markdownUrl, content);

return content;
}),
}),
]);
} finally {
setLoading(false);
}
});
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The fetch call in the clipboard copy function doesn't include error handling. If the fetch fails (e.g., network error, 404), the promise will reject but the error won't be caught, potentially leaving the loading state stuck. Consider wrapping the entire try block to handle fetch errors and provide user feedback.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants