Skip to content

feat: add shadcn component registry#723

Draft
ntatoud wants to merge 3 commits into
mainfrom
ntatoud/shadcn-registry
Draft

feat: add shadcn component registry#723
ntatoud wants to merge 3 commits into
mainfrom
ntatoud/shadcn-registry

Conversation

@ntatoud

@ntatoud ntatoud commented Mar 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a registry.json defining all 62 UI components, form fields, hooks, and utilities as a shadcn-compatible registry
  • Add pnpm registry:build script that generates JSON files in public/r/ (served at https://demo.start-ui.com/r/<name>.json)
  • Add a Claude rule (.claude/rules/registry.md) to enforce registry updates when components are modified
  • Document registry usage in README.md and maintenance instructions in CONTRIBUTING.md

Test plan

  • pnpm registry:build succeeds and generates 62 JSON files in public/r/
  • Verify a component can be installed from the registry in a consumer project: pnpm dlx shadcn@latest add https://demo.start-ui.com/r/button.json
  • Verify registry is accessible at https://demo.start-ui.com/r/button.json after deployment

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a Component Registry so users can browse, install, and share individual UI components via the shadcn-compatible workflow.
  • Documentation

    • Added comprehensive registry guidance in README and CONTRIBUTING, including usage, build/run instructions, update procedures, and translation notes.
  • Chores

    • Registry build added to the project build scripts and generated registry output excluded from version control.

Expose UI components, form fields, hooks, and utilities as a shadcn-compatible
registry so they can be installed individually in other projects via the CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Mar 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
start-ui-web-v3 Ready Ready Preview, Comment Mar 14, 2026 1:51pm

Request Review

@coderabbitai

coderabbitai Bot commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a shadcn-compatible component registry: new registry.json with components/dependencies, documentation and rules (.claude/rules/registry.md, CONTRIBUTING.md, README.md), a registry:build script invoked from build, and /public/r ignored in .gitignore.

Changes

Cohort / File(s) Summary
Registry metadata
registry.json
Adds a comprehensive registry manifest enumerating libs, hooks, UI and form components, file-to-target mappings, and inter-item dependencies.
Documentation & contributor rules
.claude/rules/registry.md, CONTRIBUTING.md, README.md
New docs and contributor guidance describing registry.json structure, synchronization checklist, item types, build steps, and usage instructions for the shadcn-compatible registry.
Build scripts
package.json
Adds registry:build script (pnpm dlx shadcn@latest build) and updates the main build script to run the registry build step before vite build.
Ignored output
.gitignore
Adds /public/r to ignore generated registry JSON output.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant PNPM as pnpm
  participant Shadcn as shadcn CLI
  participant FS as File System (public/r)
  participant Consumer as Consumer (dlx / browser)

  Dev->>PNPM: run `pnpm registry:build` or `pnpm build`
  PNPM->>Shadcn: invoke `shadcn build`
  Shadcn->>FS: generate JSON files under `public/r/`
  FS-->>PNPM: files available
  Dev->>Consumer: share URL `http://localhost:3000/r/<component>.json`
  Consumer->>FS: fetch component JSON (install via `pnpm dlx shadcn add <url>`)
  Consumer-->>Dev: component installed
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • yoannfleurydev
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add shadcn component registry' accurately summarizes the main change in the PR, which introduces a new shadcn-compatible component registry system with registry.json, build scripts, and documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ntatoud/shadcn-registry
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Ensures public/r/ JSON files are generated before vite build so the
registry is included in every deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 52: Fix the typographical error in CONTRIBUTING.md: replace the string
"you PR" with "your PR" so the sentence reads "You only need to maintain the
english and french translations for your PR." Locate the sentence in
CONTRIBUTING.md and update the wording accordingly, keeping capitalization and
punctuation consistent with surrounding text.

In `@package.json`:
- Line 22: Update the package.json "registry:build" npm script so it doesn't
assume a globally installed shadcn binary; replace the current "registry:build"
script command with one that uses pnpm dlx to fetch and run the CLI (i.e.,
change the command invoked by the "registry:build" script to use pnpm dlx
shadcn@latest build) so the script works in environments without a global shadcn
installation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c9dd0b82-c6c5-40e5-9401-6bf684c3e87e

📥 Commits

Reviewing files that changed from the base of the PR and between aa4edfd and 9a18d61.

📒 Files selected for processing (6)
  • .claude/rules/registry.md
  • .gitignore
  • CONTRIBUTING.md
  • README.md
  • package.json
  • registry.json

Comment thread CONTRIBUTING.md
## Translations

You only need to maintain the english and french translations for you PR.
You only need to maintain the english and french translations for you PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix typo: "you PR" → "your PR".

✏️ Proposed fix
-You only need to maintain the english and french translations for you PR.
+You only need to maintain the English and French translations for your PR.
📝 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
You only need to maintain the english and french translations for you PR.
You only need to maintain the English and French translations for your PR.
🧰 Tools
🪛 LanguageTool

[grammar] ~52-~52: Ensure spelling is correct
Context: ...the english and french translations for you PR. Other language translations are not...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CONTRIBUTING.md` at line 52, Fix the typographical error in CONTRIBUTING.md:
replace the string "you PR" with "your PR" so the sentence reads "You only need
to maintain the english and french translations for your PR." Locate the
sentence in CONTRIBUTING.md and update the wording accordingly, keeping
capitalization and punctuation consistent with surrounding text.

Comment thread package.json Outdated
shadcn is not in devDependencies, so invoke it via pnpm dlx to avoid
relying on a global installation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

22-22: Pin the shadcn version to ensure reproducible builds.

Using shadcn@latest means builds are not fully reproducible—if shadcn releases a breaking change, CI builds could unexpectedly fail. Pin to a specific version instead.

♻️ Suggested change
-    "registry:build": "pnpm dlx shadcn@latest build",
+    "registry:build": "pnpm dlx shadcn@3.2.1 build",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 22, The "registry:build" npm script currently uses
shadcn@latest which makes builds unreproducible; update the script value in
package.json (the "registry:build" entry) to use a pinned shadcn version (e.g.,
replace shadcn@latest with shadcn@<specific-version>) and commit the updated
package.json (and regenerate lockfile if applicable) so CI uses that exact
version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@package.json`:
- Line 22: The "registry:build" npm script currently uses shadcn@latest which
makes builds unreproducible; update the script value in package.json (the
"registry:build" entry) to use a pinned shadcn version (e.g., replace
shadcn@latest with shadcn@<specific-version>) and commit the updated
package.json (and regenerate lockfile if applicable) so CI uses that exact
version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e3b2c50b-9d18-4387-b818-d88fea3489d4

📥 Commits

Reviewing files that changed from the base of the PR and between dac7426 and bb908d8.

📒 Files selected for processing (1)
  • package.json

Comment thread .gitignore
/dist
/build
/public/storybook
/public/r

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.

?

@ntatoud ntatoud Mar 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the standard way of exposing registry components:

When building the registry, json files are created and placed in public/r/<comp>.json

Since it is generated automatically via the registry.json file, no need to push it on the repo

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants