āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/crafter-station/elements/registry_migration_summary ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
Successfully migrated your Elements registry from a custom structure to follow official shadcn registry conventions.
From:
src/registry/
āāā clerk/registry.json
āāā tinte/registry.json
āāā polar/registry.json
āāā ...
To:
registry/
āāā index.ts # Central export
āāā utils.ts # Utility functions
āāā default/
āāā blocks/
āāā clerk/
ā āāā clerk-sign-in-shadcn/
ā ā āāā registry-item.json
ā ā āāā components/
ā ā ā āāā sign-in.tsx
ā ā āāā page.tsx
ā āāā ...
āāā tinte/
ā āāā tinte-editor/
ā āāā registry-item.json
ā āāā components/
ā āāā lib/
ā āāā api/
āāā ...
64 components successfully migrated across 6 providers:
scripts/migrate-to-shadcn-structure.tsMigrates all components from old structure to new structure:
registry/default/blocks/[provider]/[component]/registry-item.json for each componentscripts/generate-registry-index.tsGenerates registry/index.ts from all registry-item.json files:
scripts/build-registry.tsComplete build process:
registry/index.tspublic/r/registry.jsonshadcn build to create individual JSON filesscripts/update-registry-imports.tsUpdates imports to use @/registry pattern:
scripts/fix-registry-paths.tsUtility to fix paths in registry-item.json files
{
"scripts": {
"prebuild": "bun run build:registry",
"build": "bun run preview:generate && next build --turbopack",
"build:registry": "bun run scripts/build-registry.ts",
"registry:index": "bun run scripts/generate-registry-index.ts"
}
}
{
"compilerOptions": {
"paths": {
"@/*": ["./*"],
"@/registry/*": ["./registry/*"]
}
}
}
The build process generates:
public/r/
āāā registry.json # Main registry index
āāā clerk-sign-in-shadcn.json # Individual components
āāā clerk-sign-up-shadcn.json
āāā tinte-editor.json
āāā ... (64 total files)
Each JSON file contains:
Each component has a registry-item.json following shadcn schema:
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "clerk-sign-in-shadcn",
"type": "registry:ui",
"title": "Clerk Sign In (ShadCN)",
"description": "Complete sign-in form with Clerk integration",
"registryDependencies": ["button", "input", "@elements/clerk-middleware"],
"dependencies": ["@clerk/nextjs"],
"files": [
{
"path": "registry/default/blocks/clerk/clerk-sign-in-shadcn/components/sign-in.tsx",
"type": "registry:component",
"target": "app/elements/clerk/sign-in/sign-in.tsx"
}
],
"envVars": {
"NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_test_"
},
"docs": "Usage instructions..."
}
Components are organized by type:
components/ - React componentslib/ - Utilities and librarieshooks/ - Custom React hooksapi/ - API route filesbun run build:registry
This will:
Users can install your components using:
npx shadcn add https://tryelements.dev/r/clerk-sign-in-shadcn
Or with the @elements namespace:
npx shadcn add @elements/clerk-sign-in-shadcn
# Start dev server
bun dev
# In another terminal, test installation
npx shadcn add http://localhost:3000/r/clerk-sign-in-shadcn.json
All components use the @elements/ namespace prefix:
clerk-sign-in-shadcn@elements/clerk-sign-in-shadcnComponents use @/registry for internal imports:
// Correct
import { ClerkLogo } from "@/registry/default/blocks/logos/clerk-logo/components/clerk-logo"
// External dependencies use standard @/
import { Button } from "@/components/ui/button"
registry/default/blocks/public/r/src/registry/ for referenceregistry/index.ts - Main registry exportregistry/utils.ts - Helper functions (registryItemAppend, combine)registry/default/blocks/*/registry-item.json - Component manifestsscripts/build-registry.ts - Main build orchestratorscripts/generate-registry-index.ts - Index generatorscripts/migrate-to-shadcn-structure.ts - Migration toolscripts/update-registry-imports.ts - Import updaterpublic/r/registry.json - Registry indexpublic/r/*.json - Individual component payloadsMigration completed successfully! š
Your Elements registry now follows shadcn best practices and is ready for production use.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā