Skip to content

feat(docs): separate docs from web#469

Merged
luxass merged 6 commits intomainfrom
separate-docs
Jan 15, 2026
Merged

feat(docs): separate docs from web#469
luxass merged 6 commits intomainfrom
separate-docs

Conversation

@luxass
Copy link
Member

@luxass luxass commented Jan 15, 2026

🔗 Linked issue

📚 Description

This will make the website build faster, and more performant.

Summary by CodeRabbit

Release Notes

  • New Features

    • Launched a standalone documentation application deployed at docs.ucdjs.dev
  • Refactor

    • Migrated documentation from the main application to an independent service
    • Updated deployment workflow to manage documentation as a separate deployable component
    • Documentation links now direct to the dedicated external documentation service

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

Copilot AI review requested due to automatic review settings January 15, 2026 17:09
@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

⚠️ No Changeset found

Latest commit: 8fa833b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Warning

Rate limit exceeded

@luxass has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d9507eb and 8fa833b.

📒 Files selected for processing (1)
  • apps/web/src/components/layout/sidebar/app-sidebar.tsx

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Extracts the documentation system from the web app into a new standalone docs application deployed via Cloudflare Workers, adds deployment infrastructure to the CI/CD workflow, removes fumadocs dependencies and docs routes from the web app, and updates the root gitignore patterns.

Changes

Cohort / File(s) Summary
New docs app setup
apps/docs/package.json, apps/docs/tsconfig.json, apps/docs/eslint.config.js, apps/docs/vite.config.ts, apps/docs/wrangler.jsonc
Establishes build, TypeScript, linting, and Cloudflare Worker configuration for the new docs app with Vite, TanStack Router/React, Tailwind, Fumadocs, and markdown support. Wrangler configured for production and preview environments at docs.ucdjs.dev and preview.docs.ucdjs.dev.
Docs app routing & core
apps/docs/src/router.tsx, apps/docs/src/routeTree.gen.ts, apps/docs/src/routes/__root.tsx, apps/docs/src/routes/index.tsx, apps/docs/src/routes/$.tsx, apps/docs/src/routes/api/search.ts
Implements TanStack Router with typed route tree, root document shell with Devtools, and three routes (index redirect, splat catch-all, API search endpoint). Root path is "/" instead of nested "(docs)/docs/" pattern.
Docs app styling & components
apps/docs/src/globals.css, apps/docs/src/components/not-found.tsx
Defines global Tailwind + Fumadocs theme with dark mode CSS variables; adds NotFoundLayout and DocsNotFound components for 404 pages.
Docs app metadata & documentation
apps/docs/public/manifest.json, apps/docs/public/robots.txt, apps/docs/README.md, apps/docs/src/lib/docs-layout.ts, apps/docs/src/lib/docs-loader.ts
Adds PWA manifest, robots.txt, and comprehensive README; updates navigation metadata (title changed to "UCD.js Docs") and loader baseUrl from "/Docs" to "/".
Deployment infrastructure
.github/ucdjs-apps.json, .github/workflows/reusable-deploy-app.yml
Registers "docs" app as deployable in apps registry; adds conditional deploy-docs step using Cloudflare Wrangler and captures deployment URL in workflow output.
Web app refactoring
apps/web/package.json, apps/web/src/globals.css, apps/web/vite.config.ts, apps/web/tsconfig.json, apps/web/src/routeTree.gen.ts, apps/web/src/routes/__root.tsx, apps/web/src/components/not-found.tsx
Removes fumadocs dependencies (core, mdx, ui), strips mdx plugin from Vite, removes docs route imports from routeTree, removes fumadocs path mapping from tsconfig, simplifies root layout from conditional docs/app layout to fixed sidebar layout, and updates 404 links to external docs URL.
Web app gitignore cleanup
apps/web/.gitignore
Removes 13 ignore patterns (node_modules, .DS_Store, dist, .tanstack, .output, .wrangler, etc.), centralizing ignores to root .gitignore.
Root gitignore updates
.gitignore
Adds .output and .tanstack patterns.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Wrangler as Cloudflare Wrangler
    participant Builder as Build System
    participant Worker as Workers Runtime

    GHA->>GHA: Determine app (api/web/docs)
    alt matrix.app == 'docs'
        GHA->>Builder: Run build for docs app
        Builder->>Builder: Compile routes, components, CSS
        Builder-->>GHA: Output .output/server/index.mjs
        GHA->>Wrangler: Deploy with wrangler-action
        Wrangler->>Wrangler: Read wrangler.jsonc config
        Wrangler->>Worker: Upload to Cloudflare Workers
        Worker-->>Wrangler: Return deployment URL
        Wrangler-->>GHA: Output deployment-url
        GHA->>GHA: Capture docs deployment URL
    else matrix.app == 'api' or 'web'
        GHA->>Builder: Build respective app
        Builder-->>GHA: Deployment artifacts
    end
    GHA->>GHA: Aggregate all deployment URLs
    GHA-->>GHA: Return combined result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through docs with glee,
New routes and routes, all wild and free!
From web to workers, Cloudflare's call,
One app stands alone, no longer in thrall!
Let the docs flutter forth on the air,
Clean and separate, a change most fair!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the main objective: separating the documentation into an independent application from the main web app to improve build performance.

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


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.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions github-actions bot added apps: web Changes related to the Website. 🚨 ci Changes related to our CI pipelines labels Jan 15, 2026
@luxass luxass enabled auto-merge January 15, 2026 17:10
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

🌏 Preview Deployments

Application Status Preview URL
API ⏳ In Progress N/A
Website ⏳ In Progress N/A
Documentation ⏳ In Progress N/A

Built from commit: 8fa833b352088899ec9d62736808a28a2d6dfd70


🤖 This comment will be updated automatically when you push new commits to this PR.

Copy link
Contributor

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 separates the documentation site from the main web application into a standalone apps/docs application. This architectural change will improve build performance and maintainability by isolating documentation concerns.

Changes:

  • Created new apps/docs app with fumadocs dependencies and configuration
  • Removed fumadocs dependencies from apps/web
  • Updated route paths from /docs/* to /* in the docs app
  • Added docs deployment to CI/CD workflows

Reviewed changes

Copilot reviewed 27 out of 67 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/docs/package.json New docs app package with fumadocs dependencies
apps/docs/vite.config.ts Vite configuration for docs app with MDX support
apps/docs/wrangler.jsonc Cloudflare Workers configuration for docs deployment
apps/docs/src/* Complete docs app source code and routes
apps/docs/content/docs/* Documentation content migrated from web app
apps/web/package.json Removed fumadocs dependencies
apps/web/vite.config.ts Removed MDX plugin and configuration
apps/web/src/routes/__root.tsx Removed docs-specific routing logic
.github/workflows/* Added docs app to deployment workflows
pnpm-lock.yaml Updated dependency resolutions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

apps/docs/src/lib/docs-layout.ts:13

  • The nav title includes "Docs" suffix, which may be redundant since this is a documentation-only site. Consider using just "UCD.js" for consistency with the web app's navigation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 15, 2026

- Added `routeTree.gen.ts` for automatic route generation.
- Created `router.tsx` to initialize the router with context and scroll restoration.
- Developed dynamic route handling in `routes/$` for Fumadocs integration.
- Established root route in `routes/__root.tsx` with meta tags and devtools.
- Implemented API search functionality in `routes/api/search.ts`.
- Set up index route redirection in `routes/index.tsx`.
- Configured TypeScript settings in `tsconfig.json`.
- Integrated Vite configuration in `vite.config.ts` for enhanced development experience.
- Added `wrangler.jsonc` for Cloudflare Workers configuration.
- Updated package dependencies in `package.json` and `pnpm-lock.yaml`.
Copy link
Contributor

@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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/package.json (1)

43-43: Remove @types/mdx from dependencies.

No MDX type references exist in the codebase, no .mdx files are present, and no other MDX-related dependencies remain. This type dependency is a leftover and can be safely removed.

🤖 Fix all issues with AI agents
In `@apps/docs/public/manifest.json`:
- Around line 1-25: Update the manifest's placeholder "short_name" and "name"
fields to reflect the UCD documentation app instead of the TanStack template
values: replace the value for "short_name" (currently "TanStack App") with a
concise label like "UCD Docs" and replace the value for "name" (currently
"Create TanStack App Sample") with a full descriptive name like "UCD
Documentation" so the web manifest accurately represents the app.

In `@apps/docs/README.md`:
- Line 132: Fix the typo in the README sentence: change "you" to "your" so the
line reads "React-Query is an excellent addition or alternative to route loading
and integrating it into your application is a breeze." Update the text in
apps/docs/README.md accordingly.

In `@apps/docs/src/routes/__root.tsx`:
- Around line 59-69: TanStackDevtools is rendered unconditionally
(TanStackDevtools / TanStackRouterDevtoolsPanel), causing it to be bundled in
production; wrap the JSX that returns <TanStackDevtools ... /> in a
development-only guard (e.g., check import.meta.env.DEV or process.env.NODE_ENV
=== 'development') so the devtools and TanStackRouterDevtoolsPanel are only
included and rendered in dev builds, or alternatively lazy-load the panel and
render it only when the dev flag is true.
🧹 Nitpick comments (5)
apps/docs/wrangler.jsonc (1)

9-21: Consider reducing head_sampling_rate for production.

The observability configuration has head_sampling_rate: 1 (100% sampling) at the top level. While this is excellent for debugging, it may increase costs and overhead in production at scale. Consider overriding with a lower sampling rate (e.g., 0.1 or 0.01) specifically in the production environment.

💡 Optional: Add production-specific sampling rate
     "production": {
       "name": "docs-ucdjs-dev",
       "preview_urls": false,
       "route": {
         "custom_domain": true,
         "pattern": "docs.ucdjs.dev"
       },
       "vars": {
         "ENVIRONMENT": "production",
-      }
+      },
+      "observability": {
+        "head_sampling_rate": 0.1
+      }
     },
apps/docs/src/router.tsx (1)

6-16: Router factory pattern is appropriate for SSR.

The getRouter factory function correctly creates new router instances, which is necessary for server-side rendering scenarios to avoid sharing state between requests. Based on learnings, this aligns with the expected TanStack Router usage.

One consideration: defaultPreloadStaleTime: 0 means preloaded data is immediately considered stale, causing refetches on navigation. If the docs content is relatively static, you might benefit from a small positive value (e.g., 30000 for 30 seconds) to reduce redundant network requests.

apps/docs/src/components/not-found.tsx (1)

38-55: Extract the default docs route to a shared constant to avoid duplication.

The value "ucdjs" is hardcoded in three locations: apps/docs/src/routes/index.tsx (line 8), apps/docs/src/components/not-found.tsx (line 47), and apps/docs/src/lib/docs-layout.ts (line 20). While this is the correct intended default landing page, consolidating it into a single constant would prevent inconsistencies if the default changes in the future.

apps/docs/README.md (1)

1-290: Consider customizing this boilerplate README.

This appears to be a standard TanStack starter template README. Consider tailoring it to the actual docs application specifics (e.g., remove sections about features not used like TanStack Store, add fumadocs-specific information, update the project description).

apps/docs/src/routes/__root.tsx (1)

11-11: Use a type alias for the empty context.

An empty interface is equivalent to {}. Use a type alias instead, and consider adding properties (like queryClient, apiBaseUrl) if this docs app needs context similar to the web app.

♻️ Suggested fix
-export interface AppRouterContext {}
+export type AppRouterContext = Record<string, never>;

Or, if you plan to add context properties later:

export interface AppRouterContext {
  // TODO: Add context properties as needed (e.g., queryClient, apiBaseUrl)
}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a044f76 and d2b7fdb.

⛔ Files ignored due to path filters (7)
  • apps/docs/public/favicon.ico is excluded by !**/*.ico
  • apps/docs/public/logo192.png is excluded by !**/*.png
  • apps/docs/public/logo512.png is excluded by !**/*.png
  • apps/docs/public/tanstack-circle-logo.png is excluded by !**/*.png
  • apps/docs/public/tanstack-word-logo-white.svg is excluded by !**/*.svg
  • apps/docs/src/logo.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (60)
  • .github/ucdjs-apps.json
  • .github/workflows/reusable-deploy-app.yml
  • apps/docs/.cta.json
  • apps/docs/.gitignore
  • apps/docs/README.md
  • apps/docs/content/docs/core/cli.mdx
  • apps/docs/content/docs/core/client/index.mdx
  • apps/docs/content/docs/core/fs-bridge/bridges/http.mdx
  • apps/docs/content/docs/core/fs-bridge/bridges/node.mdx
  • apps/docs/content/docs/core/fs-bridge/hooks.mdx
  • apps/docs/content/docs/core/fs-bridge/index.mdx
  • apps/docs/content/docs/core/fs-bridge/meta.json
  • apps/docs/content/docs/core/fs-bridge/specification/capabilities.mdx
  • apps/docs/content/docs/core/fs-bridge/specification/errors.mdx
  • apps/docs/content/docs/core/fs-bridge/specification/index.mdx
  • apps/docs/content/docs/core/fs-bridge/specification/meta.json
  • apps/docs/content/docs/core/index.mdx
  • apps/docs/content/docs/core/meta.json
  • apps/docs/content/docs/core/ucd-store.mdx
  • apps/docs/content/docs/index.mdx
  • apps/docs/content/docs/schemas/index.mdx
  • apps/docs/content/docs/schemas/meta.json
  • apps/docs/content/docs/schemas/schema-gen.mdx
  • apps/docs/content/docs/schemas/schemas.mdx
  • apps/docs/content/docs/ucdjs/index.mdx
  • apps/docs/content/docs/ucdjs/installation.mdx
  • apps/docs/content/docs/ucdjs/meta.json
  • apps/docs/content/docs/utilities/env.mdx
  • apps/docs/content/docs/utilities/index.mdx
  • apps/docs/content/docs/utilities/meta.json
  • apps/docs/content/docs/utilities/path-utils/errors.mdx
  • apps/docs/content/docs/utilities/path-utils/examples.mdx
  • apps/docs/content/docs/utilities/path-utils/index.mdx
  • apps/docs/content/docs/utilities/path-utils/platform.mdx
  • apps/docs/content/docs/utilities/path-utils/security.mdx
  • apps/docs/content/docs/utilities/shared.mdx
  • apps/docs/content/docs/utilities/utils.mdx
  • apps/docs/package.json
  • apps/docs/public/manifest.json
  • apps/docs/public/robots.txt
  • apps/docs/source.config.ts
  • apps/docs/src/components/not-found.tsx
  • apps/docs/src/globals.css
  • apps/docs/src/lib/docs-layout.ts
  • apps/docs/src/lib/docs-loader.ts
  • apps/docs/src/routeTree.gen.ts
  • apps/docs/src/router.tsx
  • apps/docs/src/routes/$.tsx
  • apps/docs/src/routes/__root.tsx
  • apps/docs/src/routes/api/search.ts
  • apps/docs/src/routes/index.tsx
  • apps/docs/tsconfig.json
  • apps/docs/vite.config.ts
  • apps/docs/wrangler.jsonc
  • apps/web/package.json
  • apps/web/src/globals.css
  • apps/web/src/routeTree.gen.ts
  • apps/web/src/routes/__root.tsx
  • apps/web/tsconfig.json
  • apps/web/vite.config.ts
💤 Files with no reviewable changes (3)
  • apps/web/src/globals.css
  • apps/web/vite.config.ts
  • apps/web/src/routeTree.gen.ts
🧰 Additional context used
📓 Path-based instructions (1)
apps/web/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use React, Vite, and TanStack Router for apps/web application

Files:

  • apps/web/src/routes/__root.tsx
🧠 Learnings (18)
📓 Common learnings
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/web/content/docs/**/*.{md,mdx} : Place documentation content in apps/web/content/docs/ using fumadocs framework
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Use React, Vite, and TanStack Router for apps/web application
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Use React, Vite, and TanStack Router for apps/web application

Applied to files:

  • apps/docs/src/router.tsx
  • apps/web/src/routes/__root.tsx
  • apps/docs/src/routes/$.tsx
  • apps/docs/README.md
  • apps/docs/vite.config.ts
  • apps/web/tsconfig.json
  • apps/docs/.cta.json
  • apps/docs/tsconfig.json
  • apps/web/package.json
  • apps/docs/src/routes/api/search.ts
  • apps/docs/src/routes/__root.tsx
  • apps/docs/package.json
  • apps/docs/src/routes/index.tsx
  • apps/docs/src/routeTree.gen.ts
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/api/src/routes/**/*.{ts,tsx} : Organize API routes by version and type: /api/v1/files, /api/v1/versions, /api/v1/schemas, /_tasks, /.well-known/

Applied to files:

  • apps/web/src/routes/__root.tsx
  • apps/docs/src/routes/$.tsx
  • apps/web/tsconfig.json
  • apps/docs/tsconfig.json
  • apps/docs/src/routes/api/search.ts
  • apps/docs/src/routes/__root.tsx
  • apps/docs/src/routes/index.tsx
  • apps/docs/src/routeTree.gen.ts
📚 Learning: 2025-06-09T05:10:32.105Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 45
File: packages/ucd-store/src/download.ts:24-24
Timestamp: 2025-06-09T05:10:32.105Z
Learning: In the ucd-store package refactor, picomatch was moved from direct usage in download.ts to internal usage within the createPathFilter function in filter.ts. The pattern format is still picomatch-compatible, so JSDoc comments referencing picomatch pattern format remain correct.

Applied to files:

  • apps/docs/src/routes/$.tsx
  • apps/web/tsconfig.json
  • apps/docs/src/routes/api/search.ts
  • apps/docs/package.json
  • apps/docs/src/routes/index.tsx
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/api/src/routes/**/*.{ts,tsx} : Use Hono web framework with hono/zod-openapi plugin for API routes

Applied to files:

  • apps/docs/src/routes/$.tsx
  • apps/docs/src/routes/api/search.ts
  • apps/docs/src/routes/index.tsx
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/web/content/docs/**/*.{md,mdx} : Place documentation content in apps/web/content/docs/ using fumadocs framework

Applied to files:

  • apps/docs/README.md
  • apps/web/tsconfig.json
  • apps/web/package.json
  • apps/docs/src/routes/__root.tsx
  • apps/docs/src/lib/docs-loader.ts
  • .github/ucdjs-apps.json
  • .github/workflows/reusable-deploy-app.yml
📚 Learning: 2025-06-29T11:20:13.668Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 87
File: packages/worker-shared/tsconfig.build.json:1-4
Timestamp: 2025-06-29T11:20:13.668Z
Learning: In the ucdjs/ucd project, the packages use tsdown instead of tsc for building libraries. The tsconfig.build.json files are primarily for IDE experience and type checking, not for direct compilation, so including "test" directories in these configs doesn't affect build output.

Applied to files:

  • apps/web/tsconfig.json
  • apps/docs/tsconfig.json
  • apps/docs/wrangler.jsonc
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to packages/*/tsconfig.json : Use ucdjs-tooling/tsconfig for TypeScript configuration in new packages

Applied to files:

  • apps/web/tsconfig.json
  • apps/docs/tsconfig.json
  • apps/docs/package.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to packages/*/tsdown.config.ts : Use ucdjs-tooling/tsdown-config for build configuration in new packages

Applied to files:

  • apps/web/tsconfig.json
  • apps/docs/tsconfig.json
  • apps/docs/wrangler.jsonc
  • apps/docs/package.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to packages/*/tsdown.config.ts : Use tsdown for building TypeScript packages with each package having its own tsdown.config.ts using ucdjs-tooling/tsdown-config

Applied to files:

  • apps/docs/tsconfig.json
📚 Learning: 2025-07-20T05:37:40.565Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 131
File: tooling/eslint-plugin/package.json:0-0
Timestamp: 2025-07-20T05:37:40.565Z
Learning: In the ucdjs/ucd project, internal tooling packages (private packages in the tooling/ directory) export TypeScript files directly without requiring a build step, unlike published packages which use tsdown to build and export from ./dist/. Examples include ucdjs/tsdown-config and ucdjs/eslint-plugin.

Applied to files:

  • apps/docs/tsconfig.json
  • apps/docs/package.json
📚 Learning: 2025-09-13T05:33:48.323Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 249
File: .github/scripts/compare-openapi.ts:1-1
Timestamp: 2025-09-13T05:33:48.323Z
Learning: Node.js v22.6.0+ supports running TypeScript files directly using the --experimental-strip-types flag, and Node v23+ enables type stripping by default. This allows .ts files to execute without prior transpilation, though it only strips type annotations and doesn't perform type checking.

Applied to files:

  • apps/docs/tsconfig.json
📚 Learning: 2025-09-13T05:33:48.323Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 249
File: .github/scripts/compare-openapi.ts:1-1
Timestamp: 2025-09-13T05:33:48.323Z
Learning: As of late 2024, Node.js 22.x is the Active LTS version and supports running TypeScript files directly via the --experimental-strip-types flag (introduced in v22.6.0), so .ts files can execute without transpilation in current Node LTS environments.

Applied to files:

  • apps/docs/tsconfig.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Use pnpm catalogs for centralized dependency version management organized by purpose (monorepo, testing, linting, prod, dev, workers, types, web, vscode, docs)

Applied to files:

  • apps/web/package.json
  • apps/docs/package.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Note that ucdjs-internal/shared package may not follow semantic versioning as it's only for internal use, and changes may require coordinated updates in other packages

Applied to files:

  • apps/docs/package.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Require Node.js >= 22.18 and pnpm 10.26.1 (enforced via packageManager field in root package.json)

Applied to files:

  • apps/docs/package.json
📚 Learning: 2025-06-28T08:01:22.596Z
Learnt from: luxass
Repo: ucdjs/ucd PR: 85
File: packages/fetch/package.json:37-38
Timestamp: 2025-06-28T08:01:22.596Z
Learning: In the ucdjs/ucd project, relative paths in npm scripts within packages (like `../../apps/api/.generated/openapi.json` in packages/fetch/package.json) resolve correctly even when run via Turborepo from the repo root, contrary to initial concerns about working directory changes.

Applied to files:

  • apps/docs/package.json
📚 Learning: 2026-01-08T03:33:34.195Z
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Use Moonbeam (ucdjs/moonbeam) ESM loader to resolve workspace packages to their source files instead of built versions when running build scripts

Applied to files:

  • apps/docs/src/lib/docs-loader.ts
🧬 Code graph analysis (7)
apps/web/src/routes/__root.tsx (2)
apps/web/src/components/ui/sidebar.tsx (2)
  • SidebarProvider (716-716)
  • SidebarInset (706-706)
apps/web/src/components/layout/sidebar/app-sidebar.tsx (1)
  • AppSidebar (38-157)
apps/docs/src/routes/$.tsx (3)
apps/docs/src/routes/__root.tsx (1)
  • Route (13-49)
apps/docs/src/routes/api/search.ts (1)
  • Route (10-16)
apps/docs/src/routes/index.tsx (1)
  • Route (3-12)
apps/docs/vite.config.ts (1)
vscode/src/config.ts (1)
  • config (4-7)
apps/docs/src/routes/api/search.ts (1)
apps/docs/src/lib/docs-loader.ts (1)
  • source (4-7)
apps/docs/src/routes/__root.tsx (1)
apps/web/src/routes/__root.tsx (2)
  • AppRouterContext (16-20)
  • Route (22-73)
apps/docs/src/routes/index.tsx (1)
apps/docs/src/routes/$.tsx (1)
  • Route (55-64)
apps/docs/src/routeTree.gen.ts (1)
apps/docs/src/router.tsx (1)
  • getRouter (6-16)
🪛 Biome (2.1.2)
apps/docs/src/routes/__root.tsx

[error] 11-11: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)

🪛 LanguageTool
apps/docs/README.md

[grammar] ~36-~36: Use a hyphen to join words.
Context: ...com/router). The initial setup is a file based router. Which means that the route...

(QB_NEW_EN_HYPHEN)


[grammar] ~66-~66: Use a hyphen to join words.
Context: ...onent). ### Using A Layout In the File Based Routing setup the layout is locate...

(QB_NEW_EN_HYPHEN)


[grammar] ~128-~128: Use a hyphen to join words.
Context: ... }, }); ``` Loaders simplify your data fetching logic dramatically. Check out m...

(QB_NEW_EN_HYPHEN)


[grammar] ~132-~132: Ensure spelling is correct
Context: ...o route loading and integrating it into you application is a breeze. First add you...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~215-~215: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...ting point for your project. First you need to add TanStack Store as a dependency: ``...

(REP_NEED_TO_VB)


[style] ~290-~290: Consider removing “of” to be more concise
Context: ... # Learn More You can learn more about all of the offerings from TanStack in the [TanStac...

(ALL_OF_THE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Upload results
  • GitHub Check: typecheck
  • GitHub Check: test (windows-latest)
  • GitHub Check: test (macos-latest)
  • GitHub Check: test (ubuntu-latest)
🔇 Additional comments (27)
apps/web/tsconfig.json (1)

12-14: LGTM!

The removal of the fumadocs-mdx:collections/* path alias is consistent with the PR's objective of separating documentation into a standalone app. The remaining @/* path alias for internal source imports is correctly preserved.

apps/web/package.json (1)

10-11: LGTM!

The removal of fumadocs-mdx && from the lint and typecheck scripts correctly reflects the docs separation. This simplifies the scripts now that fumadocs preprocessing is no longer needed in the web app.

apps/docs/public/robots.txt (1)

1-3: LGTM!

Standard robots.txt configuration allowing all crawlers access to the documentation site, which is appropriate for public documentation.

apps/docs/src/lib/docs-loader.ts (1)

4-7: LGTM!

The baseUrl change to "/" correctly reflects that documentation is now served from the root of the dedicated docs app rather than a /docs subpath within the web app.

apps/docs/.cta.json (1)

1-16: LGTM - scaffolding configuration looks appropriate.

The configuration correctly specifies pnpm, TypeScript, Tailwind, and file-router mode which aligns with the project's tooling. The chosen add-ons (nitro, start, compiler) support the SSR deployment requirements.

apps/docs/.gitignore (1)

1-13: LGTM!

Comprehensive .gitignore covering all relevant build artifacts for the Vite/Nitro/Cloudflare Workers toolchain used by this docs app.

apps/docs/src/lib/docs-layout.ts (1)

11-36: LGTM! Navigation paths correctly updated for standalone docs app.

The URL changes from /docs/* to /* are consistent with the docs app now being served from its own domain/root. The title change to "UCD.js Docs" appropriately distinguishes this from the main web app.

apps/web/src/routes/__root.tsx (1)

82-87: LGTM! Layout simplified after docs separation.

The removal of conditional isDocsPage logic and streamlined layout structure is a clean simplification now that docs routes are handled by a separate app. As per coding guidelines, this correctly uses React with TanStack Router.

apps/docs/package.json (2)

6-42: Dependencies and scripts are well-organized.

The use of pnpm catalogs (catalog:web, catalog:docs, catalog:types, etc.) for centralized dependency version management follows project conventions. The scripts appropriately chain fumadocs-mdx before lint/typecheck to ensure generated files are available. Based on learnings, this aligns with the project's catalog-based dependency management.


5-5: No issues found. The packageManager version in apps/docs/package.json (pnpm@10.27.0) is consistent with the root package.json, both enforcing the same version.

Likely an incorrect or invalid review comment.

.github/workflows/reusable-deploy-app.yml (2)

212-220: LGTM! Docs deployment step correctly mirrors existing patterns.

The deploy-docs job follows the established pattern used by deploy-api and deploy-web, using the same Wrangler action version with appropriate working directory. The conditional matrix.app == 'docs' ensures it only runs for docs deployments.


226-226: LGTM! Deployment URL extraction correctly extended.

The || chaining works correctly here since only one deploy step executes per matrix run (api, web, or docs), so exactly one will have an output URL.

apps/docs/vite.config.ts (1)

1-29: Fix mdx plugin configuration pass-through in vite.config.ts.

The source.config.ts file exists and is properly configured, but the vite.config.ts has an issue with how the fumadocs-mdx plugin is invoked. The import statement uses import * as MdxConfig from "./source.config", which creates a namespace object { docs: {...} }. However, the mdx plugin is called with mdx(MdxConfig) instead of mdx(MdxConfig.docs).

Change line 14 from:

mdx(MdxConfig),

to:

mdx(MdxConfig.docs),

The plugin expects the docs configuration object directly, not the namespace wrapper.

⛔ Skipped due to learnings
Learnt from: CR
Repo: ucdjs/ucd PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T03:33:34.195Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Use React, Vite, and TanStack Router for apps/web application
Learnt from: luxass
Repo: ucdjs/ucd PR: 45
File: packages/ucd-store/src/download.ts:24-24
Timestamp: 2025-06-09T05:10:32.105Z
Learning: In the ucd-store package refactor, picomatch was moved from direct usage in download.ts to internal usage within the createPathFilter function in filter.ts. The pattern format is still picomatch-compatible, so JSDoc comments referencing picomatch pattern format remain correct.
.github/ucdjs-apps.json (1)

12-17: LGTM!

The new "docs" app entry follows the established pattern and is consistent with the existing "api" and "web" entries.

apps/docs/tsconfig.json (1)

1-29: Configuration looks solid for a Vite + React app.

The TypeScript configuration is well-suited for the docs app setup with appropriate strict checks and path aliases for the fumadocs integration. Based on learnings, this aligns with the expected React, Vite, and TanStack Router stack used in the web app.

One consideration: verbatimModuleSyntax: false (line 13) is explicitly disabled. For ESM projects, verbatimModuleSyntax: true is often preferred to ensure type-only imports are explicitly marked, but this may have been intentional to accommodate certain fumadocs or TanStack patterns.

apps/docs/wrangler.jsonc (1)

22-63: Well-structured Wrangler configuration.

The environment-specific configurations for production and preview are properly set up with custom domains. The assets binding, compatibility flags, and module rules are appropriate for a Vite-built application deployed to Cloudflare Workers.

apps/docs/src/components/not-found.tsx (1)

10-36: Clean and reusable NotFoundLayout component.

The component is well-structured with appropriate props interface and conditional rendering. The Tailwind classes provide good visual hierarchy for the 404 state.

apps/docs/src/routes/$.tsx (2)

16-17: Import path updates align with the new docs app structure.

The flattened import paths (@/lib/docs-layout and @/lib/docs-loader) are consistent with the standalone docs app architecture being introduced in this PR.


55-64: Route path simplification looks correct.

The route path change from "/(docs)/docs/$" to "/$" is appropriate for a standalone docs application. The splat route correctly handles all documentation paths, and the integration with the index route's redirect (redirecting / to /$ with _splat: "ucdjs") ensures proper initial navigation.

apps/docs/src/routes/api/search.ts (2)

3-3: Import path update is consistent with the docs app restructuring.


10-16: Route path simplification looks good.

The route path change from "/(docs)/api/search" to "/api/search" is consistent with the standalone docs app architecture. The server handler configuration is properly structured for handling search requests.

apps/docs/src/globals.css (3)

1-5: Tailwind v4 setup with fumadocs integration looks correct.

The import structure and @custom-variant dark syntax are appropriate for Tailwind CSS v4. The integration with fumadocs-ui's shadcn and preset stylesheets follows the recommended pattern.


7-48: Well-structured CSS custom properties for theming.

The oklch color format provides perceptually uniform colors and is well-suited for Tailwind v4. Both light and dark theme variables are comprehensive and cover all the standard semantic color roles.


50-83: Theme inline mapping and base layer are properly configured.

The @theme inline block correctly maps CSS variables to Tailwind's color system, and the base layer appropriately sets default border, outline, and body styles using @apply.

apps/docs/src/routes/index.tsx (1)

3-12: Route simplification and redirect logic are correct.

The route path change from "/(docs)/docs/" to "/" and redirect target from "/docs/$" to "/$" properly align with the standalone docs app structure. The beforeLoad redirect pattern ensures users landing on the root path are immediately directed to the default documentation page (ucdjs).

apps/docs/src/routes/__root.tsx (1)

13-49: LGTM on the route configuration.

The head metadata (charset, viewport, title, description, keywords, favicon, stylesheet) is well-structured and consistent with the web app's approach.

apps/docs/src/routeTree.gen.ts (1)

1-104: Auto-generated file — skipping detailed review.

This file is automatically generated by TanStack Router and will be overwritten. The route tree structure (index, splat, and API search routes) appears correctly generated and aligns with the docs app's routing needs.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

- Added new entries to `.gitignore` for `.output` and `.tanstack`.
- Removed unused `.cta.json` and `.gitignore` files from `apps/docs`.
- Introduced a new `eslint.config.js` file for linting configuration.
- Updated `package.json` to include `@luxass/eslint-config` and `eslint` dependencies.
- Modified documentation links in `not-found.tsx` to point to the new documentation site.
@luxass luxass merged commit 7ab4d49 into main Jan 15, 2026
26 of 27 checks passed
@luxass luxass deleted the separate-docs branch January 15, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps: web Changes related to the Website. 🚨 ci Changes related to our CI pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant