Skip to Content
RegistrySchema

Schema

The Mukoko Registry uses a JSON schema based on the shadcn registry schema . This document details the schema structure and item types.

Registry manifest

The registry.json file at the project root is the single source of truth for all registry items:

{ "$schema": "https://ui.shadcn.com/schema/registry.json", "name": "mukoko", "homepage": "https://registry.mukoko.com", "items": [ // ... registry items ] }
FieldTypeDescription
$schemastringSchema URL for validation
namestringRegistry name identifier
homepagestringRegistry homepage URL
itemsarrayArray of registry item objects

Registry item schema

Each item in the items array follows this structure:

{ "name": "button", "type": "registry:ui", "description": "Displays a button or a component that looks like a button.", "dependencies": ["radix-ui", "class-variance-authority"], "registryDependencies": [], "files": [ { "path": "components/ui/button.tsx", "type": "registry:ui" } ] }

Fields

FieldTypeRequiredDescription
namestringYesUnique kebab-case identifier
typestringYesItem type (see below)
descriptionstringYesHuman-readable description
dependenciesstring[]Yesnpm package names required
registryDependenciesstring[]YesOther registry item names required
filesobject[]YesFiles that compose this item

File object

FieldTypeDescription
pathstringRelative path from project root
typestringFile type (matches parent item type)
contentstringSource code (populated by the API, not in manifest)

Item types

registry:ui

UI components installed to components/ui/. These are React components with CVA variants, Radix primitives, and cn() composition.

{ "name": "dialog", "type": "registry:ui", "files": [{ "path": "components/ui/dialog.tsx", "type": "registry:ui" }] }

82 items of this type in the registry.

registry:hook

React hooks installed to hooks/. These are custom hooks that manage state, side effects, or browser APIs.

{ "name": "use-toast", "type": "registry:hook", "files": [{ "path": "hooks/use-toast.ts", "type": "registry:hook" }] }

3 items: use-toast, use-mobile, use-memory-pressure

registry:lib

Library utilities installed to lib/. These are pure functions, patterns, and infrastructure code.

{ "name": "circuit-breaker", "type": "registry:lib", "files": [{ "path": "lib/circuit-breaker.ts", "type": "registry:lib" }] }

9 items: utils, observability, circuit-breaker, retry, timeout, fallback-chain, chaos, ai-safety, architecture

API response format

When the API serves a component at /api/v1/ui/{name}, it returns the manifest data enriched with inline source code:

{ "name": "button", "type": "registry:ui", "description": "Displays a button or a component that looks like a button.", "dependencies": ["radix-ui", "class-variance-authority"], "registryDependencies": [], "files": [ { "path": "components/ui/button.tsx", "type": "registry:ui", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n..." } ] }

The content field contains the complete, installable source code.

Registry index

The index endpoint at /api/v1/ui returns all items without source code:

{ "$schema": "https://ui.shadcn.com/schema/registry.json", "name": "mukoko", "homepage": "https://registry.mukoko.com", "items": [ { "name": "accordion", "type": "registry:ui", "description": "..." }, { "name": "alert", "type": "registry:ui", "description": "..." }, // ... all 94 items ] }

Static build output

Running pnpm registry:build generates individual JSON files:

public/r/ button.json card.json dialog.json use-toast.json circuit-breaker.json ...

Each file contains the full item data including inline source code, identical to the API response format.

Last updated on