A modern React component registry platform built with Vite, TypeScript, and shadcn/ui. Showcase your UI components and dashboards with live previews, code examples, and one-click copy functionality.
src/
├── components/
│ ├── layout/ # App shell (sidebar, navbar, routes)
│ ├── registry/ # Registry cards and modals
│ ├── mdx/ # Code blocks, installation commands
│ ├── ui/ # shadcn/ui base components
│ └── animate-ui/ # Animated UI primitives
├── data/
│ ├── registry.tsx # Component registry loader
│ ├── dashboards.tsx # Dashboard registry loader
│ └── contents/
│ ├── components/ # Individual component folders
│ ├── registry/ # Component MDX metadata
│ └── dashboards/ # Dashboard folders
├── pages/ # Route pages
└── lib/ # Utilities
Create a new folder in src/data/contents/components/[component-name]/:
src/data/contents/components/my-button/
├── index.tsx # Main component file
└── demo.tsx # Demo/usage example
index.tsx)// src/data/contents/components/my-button/index.tsx
import { cn } from '@/lib/utils';
interface MyButtonProps {
children: React.ReactNode;
variant?: 'primary' | 'secondary';
className?: string;
}
export function MyButton({
children,
variant = 'primary',
className,
}: MyButtonProps) {
return (
<button
className={cn(
'rounded-lg px-4 py-2 font-medium transition-colors',
variant === 'primary' &&
'bg-primary text-primary-foreground hover:bg-primary/90',
variant === 'secondary' &&
'bg-secondary text-secondary-foreground hover:bg-secondary/90',
className,
)}
>
{children}
</button>
);
}
export default MyButton;
demo.tsx)// src/data/contents/components/my-button/demo.tsx
import { MyButton } from './index';
export default function MyButtonDemo() {
return (
<MyButton variant="primary">Primary</MyButton>
<MyButton variant="secondary">Secondary</MyButton>
);
}
Create src/data/contents/registry/my-button.mdx:
---
title: My Button
slug: my-button
category: buttons
description: A customizable button component with multiple variants.
image: https://example.com/preview.png
video: ''
featured: true
featuredOrder: 1
componentNumber: 10
dependencies:
- clsx
inspiredByName: Apple
inspiredByLink: https://apple.com
install:
- npx shadcn@latest add https://registry.watermelon.sh/r/my-button.json
---
# My Button
A beautiful button component with smooth animations.
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | ✅ | Display name of the component |
slug |
string | ✅ | URL-safe identifier (must match folder name) |
category |
string | ✅ | Category for grouping (buttons, cards, inputs, etc.) |
description |
string | ✅ | Short description shown in cards |
image |
string | ❌ | Preview image URL |
video |
string | ❌ | Preview video URL (takes priority over image) |
featured |
boolean | ❌ | Show on homepage |
featuredOrder |
number | ❌ | Order in featured list |
componentNumber |
number | ❌ | Display badge number |
dependencies |
string[] | ❌ | npm packages required |
inspiredByName |
string | ❌ | Credit/inspiration source |
inspiredByLink |
string | ❌ | Link to inspiration |
install |
string[] | ✅ | CLI install commands |
The component will automatically appear in:
Create a new folder in src/data/contents/dashboards/[dashboard-name]/:
src/data/contents/dashboards/my-dashboard/
├── my-dashboard.mdx # Metadata file
├── demo.tsx # Main dashboard wrapper
├── dashboardLayout.tsx # Layout component (optional)
├── dashboardView.tsx # Main content view
└── components/ # Dashboard-specific components
├── MetricCard.tsx
└── Chart.tsx
dashboardView.tsx (Main content):
// src/data/contents/dashboards/my-dashboard/dashboardView.tsx
import { Card } from '@/components/ui/card';
const metrics = [
{ label: 'Total Users', value: '12,345', change: '+12%' },
{ label: 'Revenue', value: '$45,678', change: '+8%' },
{ label: 'Orders', value: '1,234', change: '+23%' },
];
export function DashboardView() {
return (
<h1 className="text-2xl font-bold">My Dashboard</h1>
{metrics.map((metric) => (
<Card key={metric.label} className="p-4">
{metric.label}
{metric.value}
{metric.change}
</Card>
))}
{/* Add charts, tables, etc. */}
);
}
demo.tsx (Main entry point):
// src/data/contents/dashboards/my-dashboard/demo.tsx
import { DashboardView } from './dashboardView';
export default function MyDashboardDemo() {
return (
<DashboardView />
);
}
Create src/data/contents/dashboards/my-dashboard/my-dashboard.mdx:
---
title: My Dashboard
slug: my-dashboard
category: dashboard
description: A comprehensive analytics dashboard with real-time metrics and charts.
image: /dashboards/my-dashboard.png
featured: true
comingSoon: false
dependencies:
- recharts
- @tabler/icons-react
---
# My Dashboard
A fully featured dashboard with:
- **Metrics Cards** - Key performance indicators with trends
- **Charts** - Interactive data visualizations
- **Tables** - Data grids with sorting and filtering
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | ✅ | Display name |
slug |
string | ✅ | URL-safe identifier (must match folder name) |
category |
string | ✅ | Usually "dashboard" |
description |
string | ✅ | Short description |
image |
string | ❌ | Preview image path |
featured |
boolean | ❌ | Featured in dashboard listings |
comingSoon |
boolean | ❌ | Mark as placeholder (disables click) |
dependencies |
string[] | ❌ | npm packages required |
The dashboard will automatically appear in:
/dashboards listing page/dashboard/[slug]src/data/contents/components/gradient-card/
├── index.tsx # GradientCard component
└── demo.tsx # Demo usage
src/data/contents/registry/gradient-card.mdx # Metadata
src/data/contents/dashboards/e-commerce/
├── e-commerce.mdx # Metadata
├── demo.tsx # Entry point
├── dashboardLayout.tsx # Layout wrapper
├── dashboardView.tsx # Main content
├── card.tsx # Custom Card component
├── revenueChart.tsx # Revenue chart
├── transactionTable.tsx # Transactions list
└── trafficChannel.tsx # Traffic pie chart
bun install
bun dev
bun run build
main: Production-ready code. Only merged from dev after verification.dev: Primary development branch. All feature branches target this branch.feature/*: Individual component or feature development.dev: git checkout dev && git pullgit checkout -b feature/my-featuredev.my-button, the slug must be my-buttoncomingSoon: true for placeholdersMIT MIT License
$ claude mcp add watermelon-platform \
-- python -m otcore.mcp_server <graph>