uikit-registry
by captainy7
README.md
# uikit-registry ๐จ
**Registry 13 UI library + MCP server untuk AI.**
Cari, bandingin, dan dapetin detail komponen UI dari 13 library populer โ langsung dari AI agent (OpenCode, Claude, dll).
```
npm run mcp-server โ search_component + get_component + compare_components
```
---
## โจ Fitur
| Fitur | Tools MCP |
|-------|-----------|
| ๐ Cari komponen di semua library | `search_component(query)` |
| ๐ฆ Ambil detail komponen + source code + props | `get_component(library, component)` |
| โ๏ธ Bandingin komponen antar library | `compare_components(component, libraries?)` |
| 13 library UI | shadcn, MUI, Chakra, Antd, Mantine, NextUI, Radix, DaisyUI, PrimeReact, Neobrutalism, Aceternity, Magic UI, Origin UI |
| Props real dari TypeScript `.d.ts` | MUI โ
, shadcn โ
|
| 0 runtime dependencies | Node.js aja |
---
## ๐ Quick Start
### 1. Clone & Setup
```bash
git clone https://github.com/captainy7/uikit-registry.git
cd uikit-registry
npm install
npm run build
```
### 2. Jalankan MCP Server
```bash
npm run mcp-server
```
Output:
```
๐ uikit-registry MCP server v2 (data: ./data)
Tools: search_component, get_component, compare_components
Libraries: 13
```
### 3. Daftarin di OpenCode / Claude
Edit `~/.config/opencode/opencode.json`:
```json
{
"mcpServers": {
"uikit-registry": {
"command": "node",
"args": ["/home/satria/Development/uikit-registry/dist/mcp-server.js"],
"env": {
"UIKIT_DATA_DIR": "/home/satria/Development/uikit-registry/data"
}
}
}
}
```
Restart OpenCode, langsung bisa pake tools `uikit-registry`.
---
## ๐ฆ Data
| Library | Komponen | Props | Version |
|---------|----------|-------|---------|
| shadcn/ui | 358 | โ
source code + CVA props | โ |
| MUI | 131 | โ
14+ props dari `.d.ts` | v9.1.2 |
| Chakra UI | 115 | โ | v3.36.0 |
| Ant Design | 80 | โ | v6.4.5 |
| Mantine | 114 | โ | v9.4.0 |
| NextUI / Heroui | 85 | โ | v3.2.1 |
| Radix UI | 59 | โ | โ |
| DaisyUI | 46 | โ | v5.5.23 |
| PrimeReact | 124 | โ | โ |
| Aceternity UI | 88 | โ | โ |
| Magic UI | 47 | โ | โ |
| Origin UI | 76 | โ | โ |
| Neobrutalism | 16 | โ | โ |
| **Total** | **1339** | โ | โ |
---
## ๐ ๏ธ Usage Examples (via AI Agent)
**Cari komponen:**
```
search_component("button")
โ 11 library punya button
```
**Lihat detail:**
```
get_component("shadcn", "button")
โ import, 4 props (variant, size, className, asChild), source code
```
**Bandingkan:**
```
compare_components("dialog", "shadcn,mui")
โ shadcn: 0 props
โ mui: 20 props (transition, paper, container, backdrop, ...)
```
---
## ๐ Scraping Manual
```bash
# Scrape semua library
npm run scrape
# Scrape satu library aja
tsx src/scraper.ts --lib shadcn
# Output: data/{library}/{component}.json
# Index: data/index.json
```
Scraping otomatis tiap minggu via GitHub Actions (`.github/workflows/scrape.yml`).
---
## ๐งช Tests
```bash
npm test
# 125 tests, 0 fail
```
```bash
npm run typecheck
# TypeScript strict, 0 errors
```
---
## ๐๏ธ Arsitektur
```
src/
โโโ scrapers/ # 13 scraper, masing-masing file sendiri
โโโ mcp/ # MCP server + tools
โโโ data/ # Data access layer (ComponentStore)
โโโ shared/ # Types, constants, utils
```
- **TypeScript strict** โ semua tipe aman
- **Zero runtime deps** โ cuma node.js
- **100% local** โ gak perlu GitHub API / internet
- **Parallel scraper** โ 13 library selesai ~1 menit
---
## ๐ License
MIT
TDQS
A4.2/5.0
Scored across 3 tools
Disambiguation5/5
Each tool has a distinct purpose: search finds components across libraries, get retrieves details from a specific library, compare contrasts same component across libraries. No overlap.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern (compare_components, get_component, search_component) with snake_case.
Tool Count5/5
Three tools is appropriate for a focused UI component registry, covering search, retrieval, and comparison without unnecessary bloat.
Completeness4/5
Covers core operations well, but a tool to list all libraries or components directly might be missing; however, search can approximate this.