Schema
The Mzizi portal uses a JSON schema based on the shadcn registry schema. This document details the schema structure and item types.
Registry manifest
Section titled “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://mzizi.dev", "items": [ // ... registry items ]}| Field | Type | Description |
|---|---|---|
$schema |
string | Schema URL for validation |
name |
string | Registry name identifier |
homepage |
string | Registry homepage URL |
items |
array | Array of registry item objects |
Registry item schema
Section titled “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
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Unique kebab-case identifier |
type |
string | Yes | Item type (see below) |
description |
string | Yes | Human-readable description |
dependencies |
string[] | Yes | npm package names required |
registryDependencies |
string[] | Yes | Other registry item names required |
files |
object[] | Yes | Files that compose this item |
File object
Section titled “File object”| Field | Type | Description |
|---|---|---|
path |
string | Relative path from project root |
type |
string | File type (matches parent item type) |
content |
string | Source code (populated by the API, not in manifest) |
Item types
Section titled “Item types”registry:ui
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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://mzizi.dev", "items": [ { "name": "accordion", "type": "registry:ui", "description": "..." }, { "name": "alert", "type": "registry:ui", "description": "..." }, // … every registry item (live count: GET /api/v1/stats) ]}Static build output
Section titled “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.