Documentation
Getting Started

Registry

Fragiola UI's registry, in shadcn's format: a static directory of JSON that the shadcn CLI reads, with no server and no compute.

Fragiola publishes a registry in shadcn's format, consumed by their CLI. The registry is a static directory of JSON on a CDN: no server, no compute, edge-cacheable.

Two formats

lives athas content?read by
sourceregistry.jsonno — only paththe build
servedhttps://fragiola.com/r/<name>.jsonyes, inlinedthe CLI

The CLI fetches one JSON per item and has everything it needs. It resolves registryDependencies recursively, with a visited set that both deduplicates and prevents cycles.

The dependency chain

theme  ←  palette-*  ←  atom  ←  ui

Declare only direct dependencies. dropdown-menu will not restate cn or tailwind-variants because menu already pulls them; the graph resolves the rest, and restating is noise that goes stale.

Dependencies are namespaced

Every registryDependencies entry is written @fragiola/<name>. The CLI resolves a bare name ("cn") against its own default registry, never ours: it either fails, or — when shadcn has an item of the same name, like field — silently installs shadcn's file instead. The build rejects bare names; only @namespace/name or a full URL is accepted.

target

Each file declares where it lands, using the placeholders the CLI resolves against the user's components.json aliases:

placeholderused for
@ui/registry/ui/
@components/registry/atoms/, registry/families/
@lib/registry/lib/
@hooks/registry/hooks/

Stylesheets use a relative target (styles/…), which the CLI places under src/ when the project has one. ~/ is the project root, not the source root — in a project with src/ it writes outside it — so the build rejects it.

The placement must match the import rewrite in scripts/build-registry.ts (#/atoms/ → @/components/atoms/, …): a file anywhere else installs "successfully" and breaks every import pointing at it.

CSS is not merged

global.css and each palette are separate files. The CLI does not edit the project's CSS entry; the user imports them, and adding an item again does not overwrite a file they have edited.

No versioning, therefore no update

The format has no version field. Whoever installs keeps a frozen copy. That is inherent to copy-paste distribution, it is accepted deliberately, and pretending otherwise would be worse than saying it plainly.

Adding a new item

  1. Add the source file under packages/registry/registry/ at the right path.
  2. Add an entry to registry.json with type, files (with path and target), registryDependencies (direct only, as @fragiola/<name>), and dependencies (npm packages).
  3. Run pnpm registry:build to emit packages/registry/dist/r/<name>.json, then pnpm registry:smoke to install every item with the real CLI.
  4. The guard tests run over registry/** — adding a family or palette means the tests are the check, not review.