Skip to content

#244 into main👽 init docs package#249

Merged
Camon-fi07 merged 19 commits intomainfrom
#244
Feb 15, 2026
Merged

#244 into main👽 init docs package#249
Camon-fi07 merged 19 commits intomainfrom
#244

Conversation

@Camon-fi07
Copy link
Copy Markdown
Collaborator

@Camon-fi07 Camon-fi07 commented Nov 17, 2025

Summary by CodeRabbit

  • New Features
    • Added a comprehensive documentation website for Mock Config Server
    • Implemented search functionality for documentation pages
    • Created a home page with quick-start guide link

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 17, 2025

Walkthrough

Introduces a new documentation package at packages/docs containing a complete Next.js-based documentation site. Includes configuration files (Next.js, ESLint, PostCSS, TypeScript), MDX documentation content, API routes for search functionality, layout components for docs and home pages, helper utilities for source management and MDX component assembly, and package dependencies for Fumadocs integration.

Changes

Cohort / File(s) Summary
Configuration files
packages/docs/.gitignore, packages/docs/tsconfig.json, packages/docs/eslint.config.mjs, packages/docs/next.config.mjs, packages/docs/postcss.config.mjs
Environment and build tool configuration. Adds ESLint setup with TypeScript/React/Next.js support, Next.js config with MDX support via fumadocs, PostCSS/Tailwind integration, TypeScript compiler options with path aliases, and gitignore patterns for dependencies and build artifacts.
Package and documentation metadata
packages/docs/package.json, packages/docs/README.md, packages/docs/source.config.ts
Defines package dependencies (fumadocs, lucide-react, Tailwind, TypeScript), documentation build scripts, lint-staged hooks, and Fumadocs configuration for MDX processing with code highlighting (with Twoslash support) and Git-based last modified tracking.
Content
packages/docs/content/docs/index.mdx
Initial MDX documentation page with frontmatter (title, description), welcome content, links section, and code block placeholder.
App root and global styling
packages/docs/src/app/layout.tsx, packages/docs/src/app/global.css
Root layout component with Google Fonts (Mulish), RootProvider from fumadocs-ui, HTML/body setup, and global CSS imports (Tailwind, fumadocs-ui styles, Twoslash CSS).
Home route
packages/docs/src/app/(home)/layout.tsx, packages/docs/src/app/(home)/page.tsx
Home page layout wrapping content with HomeLayout and base options; home page component with "Hello World" heading and link to documentation.
Docs route
packages/docs/src/app/docs/layout.tsx, packages/docs/src/app/docs/\[\[...slug\]\]/page.tsx
Docs layout component connecting to page tree from source; docs page with static params generation, metadata composition (title, description, OG image), MDX rendering with component mapping and relative link customization.
Open Graph image route
packages/docs/src/app/og/docs/\[\[...slug\]\]/route.tsx
API route generating OG images for documentation pages using DefaultImage renderer and Next.js ImageResponse, with static params generation from page tree.
Search API route
packages/docs/src/app/api/search/route.ts
Search API endpoint wiring fumadocs-core createFromSource with revalidate disabled.
Utility and helper modules
packages/docs/src/lib/layout.shared.tsx, packages/docs/src/lib/source.ts, packages/docs/src/mdx-components.tsx
Shared layout configuration with base options (logo and nav title); source loader initialization with baseUrl, lucide icons plugin, and helpers for page image URLs and LLM text extraction; MDX component assembly function merging default, Twoslash, Tabs, and custom components.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Configuration correctness: Verify all Next.js, TypeScript, ESLint, and PostCSS configurations follow project standards and fumadocs integration patterns.
  • Route structure and metadata: Check that catch-all routes ([[...slug]]), static generation, and metadata functions properly integrate with the source loader and page tree.
  • MDX and component integration: Validate MDX component mapping, Twoslash transformer setup, and proper import/export of Fumadocs utilities.
  • Type safety: Ensure TypeScript path aliases and type annotations align with fumadocs types and the overall monorepo structure.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main objective: initializing a new docs package as indicated by '#244 into main' and 'init docs package', which aligns with all file additions under packages/docs/.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch #244

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@Camon-fi07 Camon-fi07 changed the title #244 into #243 🐘 init docs package #244 into #243 👽 init docs package Nov 17, 2025
@MiaInturi
Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 30, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab353ae and 133684b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (20)
  • packages/docs/.gitignore (1 hunks)
  • packages/docs/README.md (1 hunks)
  • packages/docs/content/docs/index.mdx (1 hunks)
  • packages/docs/eslint.config.mjs (1 hunks)
  • packages/docs/next.config.mjs (1 hunks)
  • packages/docs/package.json (1 hunks)
  • packages/docs/postcss.config.mjs (1 hunks)
  • packages/docs/source.config.ts (1 hunks)
  • packages/docs/src/app/(home)/layout.tsx (1 hunks)
  • packages/docs/src/app/(home)/page.tsx (1 hunks)
  • packages/docs/src/app/api/search/route.ts (1 hunks)
  • packages/docs/src/app/docs/[[...slug]]/page.tsx (1 hunks)
  • packages/docs/src/app/docs/layout.tsx (1 hunks)
  • packages/docs/src/app/global.css (1 hunks)
  • packages/docs/src/app/layout.tsx (1 hunks)
  • packages/docs/src/app/og/docs/[...slug]/route.tsx (1 hunks)
  • packages/docs/src/lib/layout.shared.tsx (1 hunks)
  • packages/docs/src/lib/source.ts (1 hunks)
  • packages/docs/src/mdx-components.tsx (1 hunks)
  • packages/docs/tsconfig.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
packages/docs/src/app/(home)/layout.tsx (1)
packages/docs/src/lib/layout.shared.tsx (1)
  • baseOptions (10-25)
packages/docs/src/lib/source.ts (1)
packages/docs/source.config.ts (1)
  • docs (5-12)
packages/docs/src/app/docs/layout.tsx (2)
packages/docs/src/lib/source.ts (1)
  • source (9-13)
packages/docs/src/lib/layout.shared.tsx (1)
  • baseOptions (10-25)
packages/docs/src/app/og/docs/[...slug]/route.tsx (2)
packages/docs/src/lib/source.ts (2)
  • source (9-13)
  • getPageImage (15-22)
packages/docs/src/app/docs/[[...slug]]/page.tsx (1)
  • generateStaticParams (10-12)
packages/docs/src/app/docs/[[...slug]]/page.tsx (3)
packages/docs/src/app/og/docs/[...slug]/route.tsx (1)
  • generateStaticParams (23-28)
packages/docs/src/lib/source.ts (2)
  • source (9-13)
  • getPageImage (15-22)
packages/docs/src/mdx-components.tsx (1)
  • getMDXComponents (8-15)
🪛 Biome (2.1.2)
packages/docs/src/lib/layout.shared.tsx

[error] 15-15: Alternative text title element cannot be empty

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

(lint/a11y/noSvgWithoutTitle)

🔇 Additional comments (16)
packages/docs/src/mdx-components.tsx (1)

8-15: LGTM!

The component aggregation pattern is well-structured with the correct spread order. Custom components passed as arguments will properly override the default, Twoslash, and Tabs components, which is the expected behavior.

packages/docs/src/app/global.css (1)

1-4: LGTM!

The CSS import structure correctly uses Tailwind CSS v4's new import syntax and properly integrates Fumadocs styling. The import order establishes the appropriate cascade for theme overrides.

packages/docs/postcss.config.mjs (1)

1-5: LGTM!

The PostCSS configuration correctly integrates Tailwind CSS v4 using the @tailwindcss/postcss plugin. The empty configuration object uses default settings, which is appropriate for standard setups.

packages/docs/eslint.config.mjs (2)

11-11: Verify the meta name for this configuration.

The meta name is set to @mock-config-server/docs/rewrites, which references "rewrites" despite this being an ESLint configuration. This may be a copy-paste artifact or placeholder.

Consider updating to a more descriptive name:

-    name: '@mock-config-server/docs/rewrites',
+    name: '@mock-config-server/docs/eslint-overrides',

3-16: Configuration is appropriate for the docs package.

The ESLint setup correctly enables TypeScript, React, JSX, and Next.js support. The ts/ban-ts-comment rule set to 'warn' provides a reasonable balance between strictness and flexibility during development.

packages/docs/.gitignore (1)

1-28: LGTM!

The gitignore file provides comprehensive coverage for a Next.js documentation project, including build artifacts, dependencies, environment files, and content generation outputs specific to Fumadocs tooling.

packages/docs/tsconfig.json (1)

1-30: TypeScript configuration is well-structured for Next.js 15.

The configuration correctly uses:

  • moduleResolution: "bundler" for Next.js 15 compatibility
  • Strict type checking with appropriate compiler options
  • Path mappings for source organization
  • Next.js TypeScript plugin integration

The noEmit: true setting is appropriate since Next.js handles the build process.

packages/docs/package.json (1)

21-23: The React 19 compatibility is confirmed. Both fumadocs-ui 15.8.2 and fumadocs-core 15.8.2 are compatible with React 19, and Next.js 15.5.4 supports React 19. No action required.

packages/docs/source.config.ts (1)

1-26: LGTM!

The fumadocs configuration is well-structured:

  • Proper schema definitions for frontmatter and meta
  • Comprehensive language support for code blocks
  • Light/dark theme support with GitHub themes
  • Twoslash integration for enhanced TypeScript examples
  • Git-based last modified time tracking
packages/docs/src/app/docs/layout.tsx (1)

1-12: Layout structure looks good.

The DocsLayout integration with page tree and shared base options is well-organized. The separation of concerns between source configuration and layout options follows fumadocs patterns.

packages/docs/next.config.mjs (1)

8-8: Verify built-in search is prebuilt and configured for static mode.

Fumadocs supports static export with output: 'export', but if using the built-in Orama search, it must be prebuilt and explicitly set to static mode in the RootProvider. Cloud-based search has no such requirement. Navigation works without additional configuration.

packages/docs/src/app/(home)/layout.tsx (1)

1-9: LGTM!

Clean integration with fumadocs-ui's HomeLayout and proper use of Next.js 15.5's globally available LayoutProps type. The component correctly composes shared layout options.

packages/docs/src/app/api/search/route.ts (1)

1-6: LGTM!

Clean search API implementation using fumadocs-core. The revalidate = false setting is consistent with the static generation approach used throughout this docs package.

packages/docs/src/lib/layout.shared.tsx (1)

10-25: Well-structured shared layout configuration.

The baseOptions() function provides a clean, centralized configuration for both Home and Docs layouts. The inline documentation and fumadocs reference link are helpful.

packages/docs/src/lib/source.ts (1)

1-30: LGTM!

Excellent source utilities module. The implementation correctly:

  • Configures the fumadocs loader with the lucide icons plugin
  • Provides helper functions for OG image URL generation
  • Includes an LLM-friendly text extraction utility

The code is clean, well-organized, and follows fumadocs patterns.

packages/docs/src/app/docs/[[...slug]]/page.tsx (1)

1-51: LGTM!

Excellent Next.js 15 App Router page implementation. The code correctly:

  • Uses async params access as required by Next.js 15
  • Implements static generation with generateStaticParams
  • Generates proper metadata including Open Graph images
  • Handles missing pages with notFound()
  • Customizes MDX components for relative linking
  • Integrates fumadocs-ui components properly

The implementation follows Next.js 15 best practices and fumadocs patterns.

Comment on lines +1 to +4
---
title: Introduction
description: Welcome
---
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider enhancing the frontmatter description.

The description "Welcome" is minimal and may not be optimal for SEO or when the page appears in search results.

 ---
 title: Introduction
-description: Welcome
+description: Get started with Mock Config Server - a tool for mocking API configurations
 ---
📝 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
---
title: Introduction
description: Welcome
---
---
title: Introduction
description: Get started with Mock Config Server - a tool for mocking API configurations
---
🤖 Prompt for AI Agents
In packages/docs/content/docs/index.mdx lines 1-4, the frontmatter description
is too short ("Welcome"); replace it with a more descriptive, SEO-friendly
summary of the page (2–3 concise sentences or a clear phrase describing the
documentation content and main value) that includes relevant keywords and intent
to improve search snippets and UX.

Comment on lines +15 to +17
```package-install
my-package
```
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

Update placeholder package name.

The package-install block contains a placeholder my-package that should be replaced with the actual package name for this project.

 ```package-install
-my-package
+mock-config-server

<details>
<summary>🤖 Prompt for AI Agents</summary>

In packages/docs/content/docs/index.mdx around lines 15 to 17, the
package-install code block uses a placeholder package name "my-package"; replace
it with the project's actual package name "mock-config-server" so the example
installs the correct package and update any surrounding text if it references
the old placeholder.


</details>

<!-- fingerprinting:phantom:medusa:ocelot -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment thread packages/docs/next.config.mjs Outdated
Comment thread packages/docs/package.json Outdated
Comment thread packages/docs/package.json
Comment on lines +1 to +17
import { RootProvider } from 'fumadocs-ui/provider/next';
import { Mulish } from 'next/font/google';

import './global.css';

const mulish = Mulish({
weight: ['400', '500', '700'],
subsets: ['latin']
});

const Layout = ({ children }: LayoutProps<'/'>) => (
<html className={mulish.className} lang='en' suppressHydrationWarning>
<body className='flex flex-col min-h-screen'>
<RootProvider>{children}</RootProvider>
</body>
</html>
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider adding metadata export for SEO.

Root layouts in Next.js App Router typically export metadata for SEO purposes.

Consider adding a metadata export:

import type { Metadata } from 'next';

export const metadata: Metadata = {
  title: 'Mock Config Server Docs',
  description: 'Documentation for Mock Config Server',
};
🤖 Prompt for AI Agents
In packages/docs/src/app/layout.tsx around lines 1 to 17, the root layout lacks
an exported metadata object for SEO; add an exported const named metadata typed
as Next's Metadata that includes title and description (and any other relevant
SEO fields) so the App Router can use it for page metadata — import the Metadata
type from 'next' and export the metadata object at module scope with values like
the site title and description.

Comment thread packages/docs/src/app/layout.tsx Outdated
subsets: ['latin']
});

const 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

Missing import for LayoutProps type.

LayoutProps<'/'> is used but not imported, which will cause a TypeScript compilation error.

Apply this diff to fix the missing import:

 import { RootProvider } from 'fumedocs-ui/provider/next';
 import { Mulish } from 'next/font/google';
+import type { LayoutProps } from 'fumadocs-core/types';

 import './global.css';

Alternatively, if this is intended to be a standard Next.js layout, use the built-in typing:

-const Layout = ({ children }: LayoutProps<'/'>) => (
+const Layout = ({ children }: { children: React.ReactNode }) => (

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In packages/docs/src/app/layout.tsx around line 11, the code uses
LayoutProps<'/'> but does not import the type; add a top-level import for
LayoutProps (e.g., import type { LayoutProps } from 'next') or replace the
explicit type with the built-in Next.js layout typing approach so the TypeScript
compiler recognizes the type.

Comment thread packages/docs/src/app/og/docs/[...slug]/route.tsx Outdated
Comment on lines +23 to +28
export function generateStaticParams() {
return source.getPages().map((page) => ({
lang: page.locale,
slug: getPageImage(page).segments
}));
}
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
# Check for locale/i18n configuration and page type definitions

echo "=== Checking source configuration files ==="
find packages/docs -name "source.config.*" -o -name "source.ts" | head -20

echo ""
echo "=== Searching for locale/i18n references ==="
rg -n "locale|i18n|language" packages/docs/src/lib/ --type ts --type tsx 2>/dev/null | head -30

echo ""
echo "=== Checking fumadocs imports and types ==="
rg -n "fumadocs|InferPageType" packages/docs/src -B 2 -A 2 --type ts --type tsx 2>/dev/null | head -40

echo ""
echo "=== Looking at the route file context ==="
head -35 packages/docs/src/app/og/docs/\[...\]slug\]/route.tsx 2>/dev/null || find packages/docs -path "*og/docs*route.tsx" -exec head -35 {} \;

Repository: siberiacancode/mock-config

Length of output: 1079


🏁 Script executed:

#!/bin/bash
# Read source configuration and type definitions

echo "=== Content of source.config.ts ==="
cat packages/docs/source.config.ts

echo ""
echo "=== Content of source.ts ==="
cat packages/docs/src/lib/source.ts

echo ""
echo "=== Check for locale in route parameters ==="
rg -n "lang:" packages/docs/src -A 2 -B 2 --type ts --type tsx

Repository: siberiacancode/mock-config

Length of output: 1727


🏁 Script executed:

#!/bin/bash
# Check full route file and locale references

echo "=== Full route file content ==="
find packages/docs -path "*/og/docs/*route.tsx" -exec cat {} \;

echo ""
echo "=== Search for locale anywhere in packages/docs ==="
rg -n "locale" packages/docs --type ts 2>/dev/null || rg -n "locale" packages/docs 2>/dev/null | head -20

echo ""
echo "=== Check package.json for fumadocs version ==="
rg -n "fumadocs" packages/docs/package.json

Repository: siberiacancode/mock-config

Length of output: 1222


Remove page.locale access or add i18n configuration.

The generateStaticParams function accesses page.locale on line 25, but this property does not exist on the page type. The fumadocs configuration has no multi-language setup, and locale is not provided by fumadocs-core without explicit i18n configuration. This will result in lang: undefined in the returned parameters.

Either remove the lang property if the app doesn't support multiple languages, or configure fumadocs with i18n support and ensure pages have locale data.

🤖 Prompt for AI Agents
In packages/docs/src/app/og/docs/[...slug]/route.tsx around lines 23 to 28, the
generateStaticParams call reads page.locale which does not exist in the current
fumadocs config and yields lang: undefined; either remove the lang property from
the returned object (so return only slug using getPageImage(page).segments) or
enable i18n in fumadocs and ensure page objects include a locale field before
mapping it here (if you choose i18n, add the proper config and guard/validate
page.locale when building params).

Comment thread packages/docs/src/lib/layout.shared.tsx Outdated
Comment on lines +15 to +17
<svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg'>
<circle cx={12} cy={12} fill='currentColor' r={12} />
</svg>
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

Add title element to SVG for accessibility.

The SVG logo is missing a <title> element, which is required for proper screen reader support and WCAG compliance. While aria-label is present, SVG elements should include a <title> child element.

Apply this diff to fix the accessibility issue:

-        <>
-          <svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg'>
-            <circle cx={12} cy={12} fill='currentColor' r={12} />
-          </svg>
+        <>
+          <svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg' role='img'>
+            <title>Logo</title>
+            <circle cx={12} cy={12} fill='currentColor' r={12} />
+          </svg>
           Mock config server
         </>

Based on static analysis hints from Biome.

📝 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
<svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg'>
<circle cx={12} cy={12} fill='currentColor' r={12} />
</svg>
<svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg' role='img'>
<title>Logo</title>
<circle cx={12} cy={12} fill='currentColor' r={12} />
</svg>
🧰 Tools
🪛 Biome (2.1.2)

[error] 15-15: Alternative text title element cannot be empty

For accessibility purposes, SVGs should have an alternative text, provided via title element. If the svg element has role="img", you should add the aria-label or aria-labelledby attribute.

(lint/a11y/noSvgWithoutTitle)

🤖 Prompt for AI Agents
In packages/docs/src/lib/layout.shared.tsx around lines 15-17, the SVG logo
lacks a <title> element for screen readers; add a descriptive <title> child
(e.g. "Logo" or more specific text) with a unique id (e.g. logo-title) inside
the SVG and reference it by replacing or supplementing aria-label with
aria-labelledby="logo-title" (or keep aria-label and also include the <title>),
ensuring the title text matches the accessible name.

Comment thread packages/docs/README.md Outdated
Comment thread packages/docs/README.md
@@ -0,0 +1,3 @@
# 🎉 Mock Config Server

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

добавить github actions

Comment thread packages/docs/eslint.config.mjs Outdated
Comment thread packages/docs/next.config.mjs Outdated
Comment thread packages/docs/next.config.mjs Outdated
Comment thread packages/docs/src/lib/layout.shared.tsx Outdated
Comment on lines +15 to +17
<svg aria-label='Logo' height='24' width='24' xmlns='http://www.w3.org/2000/svg'>
<circle cx={12} cy={12} fill='currentColor' r={12} />
</svg>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

лого сразу вынести хлопушку в компоненты или даже icons

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Вынес хлопушку в svg иконку, но не как реакт компонент, потому что у fumadocs какая-то проблема с цветами возникает, если импортить просто как изображение то все ок

Comment thread packages/docs/src/lib/source.ts Outdated
Comment thread packages/docs/src/lib/source.ts Outdated
Comment thread packages/docs/src/lib/source.ts Outdated
Comment thread packages/docs/src/mdx-components.tsx Outdated
Comment on lines +7 to +9
// use this function to get MDX components, you will need it for rendering MDX
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

arrow fn сделать + можно сразу сделать Markdown компонент

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Не понял про Markdown компонент

Comment thread packages/docs/package.json Outdated
Comment thread packages/docs/eslint.config.mjs Outdated
Comment thread packages/docs/next.config.ts
Comment thread packages/docs/postcss.config.js
Comment thread packages/docs/src/lib/source.ts
Comment thread packages/docs/package.json Outdated
"scripts": {
"build": "next build",
"dev": "next dev --turbo",
"start": "next start",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  1. у нас же просто html,css,js генерится, т.е. next start вообще не работает
  2. в сгенерированных файлах в урлах на js,css и тд есть /mock-config префикс. Надо это учесть при запуске, а то на 404 ведет сейчас

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  1. да, согласен
  2. можно создать page.tsx в app для редиректа мб

Copy link
Copy Markdown
Collaborator Author

@Camon-fi07 Camon-fi07 Dec 4, 2025

Choose a reason for hiding this comment

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

а хотя сейчас ктати подумал, редирект как-будто useless потому что github pages буквально даст нам урлу с названием проекта и у нас челы будут заходить как раз на /mock-config, то есть только в dev режиме проблема остается

Comment thread packages/docs/package.json Outdated
Comment thread packages/docs/package.json Outdated
Comment thread .github/workflows/deploy.yaml Outdated
Comment thread .github/workflows/deploy.yaml Outdated
Comment thread .github/workflows/deploy.yaml Outdated
Comment thread .github/workflows/deploy.yaml
Comment thread .github/workflows/deploy.yaml Outdated
Comment thread .github/workflows/deploy.yaml Outdated
Comment thread .github/workflows/deploy.yaml Outdated
@MiaInturi
Copy link
Copy Markdown
Collaborator

@coderabbitai review please, especially github actions. Content in files just a temporary placeholder — so dont waste your time for it

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 5, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for GitHub Actions workflow files
echo "=== Searching for GitHub Actions workflow files ==="
fd -t f . .github/workflows/

echo -e "\n=== Listing all YAML files in .github directory ==="
fd -e yml -e yaml . .github/

echo -e "\n=== Checking if .github/workflows exists ==="
ls -la .github/workflows/ 2>/dev/null || echo ".github/workflows directory does not exist"

Length of output: 382


🏁 Script executed:

#!/bin/bash
# Read the GitHub Actions workflow file
echo "=== Content of .github/workflows/deploy.yaml ==="
cat .github/workflows/deploy.yaml

echo -e "\n=== Checking if this file was modified in this PR ==="
git diff --name-only origin/#243...HEAD | grep -E "\.github/workflows"

echo -e "\n=== Files changed in this PR ==="
git diff --name-only origin/#243...HEAD

Length of output: 1767


🏁 Script executed:

#!/bin/bash
# Try different approaches to see what changed in this PR
echo "=== Checking current branch ==="
git branch --show-current

echo -e "\n=== Checking recent commits on current branch ==="
git log --oneline -10

echo -e "\n=== Check if deploy.yaml is a new file ==="
git log --follow --diff-filter=A --find-renames=40% -- .github/workflows/deploy.yaml | head -20

echo -e "\n=== Show the content of package.json for the docs package ==="
cat packages/docs/package.json | jq '.name, .scripts'

echo -e "\n=== Check if basePath is configured in next.config.mjs ==="
grep -A 2 -B 2 "basePath" packages/docs/next.config.mjs

Length of output: 1308


🏁 Script executed:

#!/bin/bash
# Check what files actually exist in packages/docs
echo "=== Files in packages/docs ==="
fd -t f . packages/docs/ | head -30

echo -e "\n=== Check Next.js config file ==="
cat packages/docs/next.config.ts 2>/dev/null || cat packages/docs/next.config.js 2>/dev/null || cat packages/docs/next.config.mjs 2>/dev/null || echo "No Next.js config found"

echo -e "\n=== Check package.json to see build output configuration ==="
cat packages/docs/package.json | jq '.scripts.build, .dependencies.next'

echo -e "\n=== Review the deploy workflow more carefully for potential issues ==="
cat .github/workflows/deploy.yaml | grep -E "(node-version|pnpm|version|filter|path:)"

echo -e "\n=== Check root package.json for workspace or monorepo setup ==="
cat package.json 2>/dev/null | jq '.workspaces, .packageManager' || echo "No root package.json"

Length of output: 1688


🏁 Script executed:

#!/bin/bash
# Check pnpm and Node.js version requirements
echo "=== Check if pnpm-lock.yaml exists ==="
ls -lh pnpm-lock.yaml 2>/dev/null || echo "No pnpm-lock.yaml found"

echo -e "\n=== Check .nvmrc or .node-version for Node.js version ==="
cat .nvmrc 2>/dev/null || cat .node-version 2>/dev/null || echo "No Node.js version file found"

echo -e "\n=== Check if there's a packageManager field in root package.json ==="
cat package.json | jq '.packageManager, .engines'

echo -e "\n=== Verify the Next.js app configuration for static export ==="
cat packages/docs/next.config.ts

echo -e "\n=== Check if there are any environment-specific settings that might be needed ==="
fd -t f "^\.env" packages/docs/

echo -e "\n=== Check if basePath is used correctly in the code ==="
rg -n "basePath" packages/docs/src/ --type ts --type tsx 2>/dev/null || rg -n "basePath" packages/docs/src/

Length of output: 993


🏁 Script executed:

#!/bin/bash
# Check latest available versions and potential issues
echo "=== Check if Node.js v24 exists (latest is v23) ==="
echo "Node.js v24 does not exist yet. Latest LTS is v22, latest current is v23."

echo -e "\n=== Check pnpm v10 availability ==="
echo "pnpm v10 is in development. Latest stable is v9.x"

echo -e "\n=== Check if the repository name might affect basePath ==="
gh repo view --json nameWithOwner,isPrivate 2>/dev/null || echo "Cannot fetch repo info"

echo -e "\n=== Verify GitHub Pages configuration requirements ==="
cat .github/workflows/deploy.yaml | grep -A 5 "configure-pages"

echo -e "\n=== Check for any other workflow files or Pages config ==="
fd -t f . .github/ | grep -v workflows || echo "Only workflows found"

echo -e "\n=== Check the build command and see if there are any issues ==="
cat packages/docs/package.json | jq -r '.scripts.build, .scripts.postinstall'

Length of output: 719


@MiaInturi, I've reviewed the GitHub Actions workflow. Here are my findings:

🚨 Critical Issues in .github/workflows/deploy.yaml

1. Node.js Version Doesn't Exist

Line 26: node-version: 24

Node.js v24 does not exist yet. The latest versions available are:

  • v23.x (current)
  • v22.x (LTS - recommended)
  • v20.x (LTS)

Recommendation:

- name: Setup Node
  uses: actions/setup-node@v4
  with:
    node-version: 22  # Use LTS version
    cache: 'pnpm'

2. pnpm Version May Not Be Stable

Line 19: version: 10

pnpm v10 is currently in development. The latest stable version is v9.x. This could cause workflow failures.

Recommendation:

- name: Install pnpm
  uses: pnpm/action-setup@v4
  with:
    version: 9  # Use stable version

✅ Positive Aspects

  1. Correct basePath configuration: /mock-config matches your repository name for GitHub Pages
  2. Proper static export setup: Next.js config correctly uses output: 'export'
  3. Correct artifact path: packages/docs/out matches Next.js static export output
  4. Good permissions setup: Appropriate permissions for Pages deployment
  5. Concurrency control: Prevents multiple simultaneous deployments
  6. Workspace filter: pnpm --filter mock-config-docs build correctly targets the docs package

💡 Optional Improvements

Consider adding a step to verify the build output before upload:

- name: Verify build output
  run: ls -la packages/docs/out

The workflow structure is solid, but those version issues will cause immediate failures. Fix the Node.js and pnpm versions, and you should be good to go! 🚀

Comment thread packages/docs/package.json Outdated
Comment thread packages/docs/server.ts Outdated
Comment thread packages/docs/server.ts Outdated
Comment thread packages/docs/public/icons/logo.svg
Comment thread packages/docs/server.ts
Comment thread packages/docs/package.json Outdated
"scripts": {
"build": "next build",
"dev": "next dev --turbo",
"prod": "next build && node server.ts",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ну и опять на гитхаб страницу мы можем выкладывать только статику, там не запустить се рвер, ну он нам и не нужен< опять же все можно глянуть тут https://github.com/siberiacancode/google-recaptcha/blob/main/packages/docs/package.json

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

так а в deploy вызывается как раз команда build, а не prod

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

думаешь переименовать prod в какой-нибудь prod-test?

Comment thread packages/docs/server.ts Outdated
Comment on lines 17 to 19
if (req.url) {
req.url = `/${req.url}`;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А почем условие изменилось? Я в целом я думаю это условие можно убрать

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

потому что я вечером дурак не так понял это условие, убрал его

@Camon-fi07 Camon-fi07 changed the base branch from #243 to main February 15, 2026 04:12
@Camon-fi07 Camon-fi07 changed the title #244 into #243 👽 init docs package #244 into main👽 init docs package Feb 15, 2026
@Camon-fi07 Camon-fi07 merged commit ba885a2 into main Feb 15, 2026
1 check 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.

4 participants