Read OSS

shadcn-ui/ui

7 articles

01

Series Introduction

An introduction to the complete 6-article series covering the source material.

02

shadcn/ui Architecture: How a Component Distribution System Works

A high-level tour of the shadcn/ui monorepo explaining the 'copy-paste not package' philosophy, the registry protocol, and how the CLI, documentation site, and build pipeline interconnect.

03

The Registry Protocol: Namespace Resolution, Fetching, and Dependency Trees

Deep dive into the registry subsystem — namespace parsing, URL construction, HTTP fetching with caching, recursive dependency resolution, and topological sort.

04

AST-Level Code Transformation: How shadcn/ui Adapts Components to Your Project

Explores the ts-morph-powered transformer pipeline that rewrites component source code to match your project's configuration.

05

Building the Registry: From Authored Components to Static JSON API

Covers the build pipeline that transforms authored component source into the static JSON API served at ui.shadcn.com/r/.

06

Project Initialization: From Empty Directory to Configured Component System

Traces the init command flow from invocation to a fully configured project, covering templates, framework detection, presets, and monorepo routing.

07

AI-First Component Discovery: The MCP Server and Programmatic Registry API

How shadcn/ui exposes its registry to AI coding assistants via the Model Context Protocol, the programmatic API, and the triple-surface design.