Skip to content
Plotcnbeta
DocsChartsBlocksPlaygroundThemesExamples
Get started
Guide
  • Introduction
  • System Design
  • Engine Strategy
  • Installation
  • Project Setup
  • shadcn/ui Setup
  • Plotcn Registry
Fundamentals
  • Usage
  • Theming
  • Accessibility
  • Motion & Animation
  • Performance
  • TypeScript & I18n
Google Charts
  • Google Charts
  • Google GeoChart
SOURCE SPECIFICATIONSTEP 04 OF GETTING STARTED
Registry: LIVE

Plotcn Registry

Source distribution for visualization components. The Plotcn Registry packages charts, shared primitives, utilities, dependencies, and metadata into installable source items that can be resolved by the shadcn CLI and copied directly into your application.

pnpmpnpm dlx shadcn@latest add @plotcn/line-basic
ATTRIBUTES:Source-firstshadcn RegistryTypeScriptComposableInspectableEngine-aware
Registry Architecture

Plotcn Registry Distribution Architecture

How registry manifests, npm packages, and shared primitives flow from the remote catalog directly into your local codebase.

REMOTE SPECIFICATIONRemote Plotcn Registry Catalog
plotcn.vercel.app/r
ITEM: @plotcn/line-basic
Recharts
line-basic.json
Declares recharts npm package + chart-container registry dependency.
dependencies: ['recharts']
ITEM: @plotcn/google-geochart
Google Charts
google-geochart.json
Declares Google singleton loader helper + theme adapter. Zero Recharts/D3 bloat.
dependencies: [] (client loader)
resolved by shadcn CLI
RESOLVER TOOLCHAINshadcn CLI Execution & Dependency Resolution
npx shadcn add @plotcn/...
01. SOURCE FILES
components/charts/recharts/
Writes raw line-basic.tsx source file and rewrites imports to local project aliases.
Raw TSX File
02. PACKAGE DEPS
npm dependencies
Installs only recharts into your project's package.json. No unnecessary packages.
pnpm / npm / yarn / bun
03. REGISTRY DEPS
Shared Primitives
Recursively resolves chart-container into components/charts/shared/.
Source-to-Source Reuse
injected into Git repository
YOUR APPLICATION WORKSPACE
Ready100% OWNED
components/charts/
Zero external Plotcn runtime. 100% editable source code directly under your project's version control.
Local Codebase · TypeScript · Zero Lock-In

What is the Plotcn Registry?

The Plotcn Registry is the source-distribution layer for Plotcn visualizations. Instead of forcing every chart into a monolithic npm runtime package, registry items describe the source files, npm packages, shared primitives, and metadata required to install one focused piece of the visualization system.

When you install a component, the shadcn CLI fetches the JSON manifest from the registry, resolves any nested dependencies, and writes pristine, fully-typed TypeScript source files directly into your project repository.

Registry ≠ runtime

The Plotcn Registry delivers source code. It is not involved when your application renders the chart at runtime. Once installed, your charts compile locally as native code with zero ongoing connection or telemetry to Plotcn servers.

Why source distribution over an npm library?

Traditional chart libraries ship pre-bundled JavaScript with opaque internal styles, rigid markup wrappers, and heavy peer dependencies. If you need to tweak an SVG attribute, customize an axis label, or adapt an internal hook, you are blocked by the package boundary.

With the Plotcn Registry:

  • Zero wrapper abstraction: You receive raw React and SVG elements you can directly inspect and modify.
  • Selective installation: Installing a basic line chart pulls only recharts and the shared container primitive—never D3, Google Charts, or unrelated visual engines.
  • Seamless design integration: Components immediately adopt your Tailwind CSS tokens, CSS variables, and font configurations.
++

Registry mental model

Understanding the registry requires shifting from a "package dependency" mindset to a "source adoption" lifecycle:

Mental Model

Source Delivery Lifecycle

Understanding the shift from external node_modules package dependencies to direct Git-tracked source code adoption.

  1. 01Done
    Discovery & Catalog

    Browse chart primitives or query registry catalog index for Cartesian, D3, or Google choropleths.

  2. 02Done
    shadcn CLI Resolution

    CLI parses @plotcn/<item>, fetches static manifest from https://plotcn.vercel.app/r/{name}.json, and audits dependencies.

  3. 03Active
    Local Materialization

    Writes pure TypeScript source to components/charts/, resolves chart-container primitive, and rewrites aliases.

  4. 04Done
    Native App Compilation

    Your Next.js or Vite bundler compiles standard React components. Zero telemetry or ongoing server dependency.

The 4-step mental flow

  1. Discovery & Catalog: You browse available chart primitives or search the registry index for specific layout needs (Cartesian line, bar, D3 force simulation, Google GeoChart).
  2. Item Resolution: The shadcn CLI parses the item address (e.g. @plotcn/line-basic), resolves the registry endpoint from your components.json, and downloads the static JSON manifest.
  3. Local Source Materialization: The CLI verifies required npm dependencies, resolves shared registry primitives (chart-container.tsx), and writes the code into your designated @/components/charts directory.
  4. Independent Application Compilation: From this point onward, your bundler (Turbopack, Vite, Webpack) compiles the code like any other component in your project.

A critical distinction for Google Charts

While Recharts and D3.js components compile and execute entirely from local code and npm dependencies, Google Charts components rely on Google's hosted google.visualization runtime. The registry item for a Google chart provides the local React wrapper, lifecycle hook, and container styling, while the underlying chart rendering engine is loaded on-demand in the client browser from Google's secure CDN.

++

Registry namespace

Modern shadcn CLI supports namespaced registries using the @namespace/item convention configured in components.json.

For Plotcn, the intended public namespace format is:

Terminal
@plotcn/<item>

For example, @plotcn/line-basic resolves to the basic Cartesian line chart manifest.

Resolution Pipeline

Namespace Anatomy & CLI URL Resolution

How the shadcn CLI maps the namespaced command to the remote manifest endpoint.

INPUT COMMAND
CLI Invocation
shadcn add @plotcn/line-basic
The developer executes the namespaced CLI command in their local project terminal.
CLI parses namespace & item identifier
01. NAMESPACE (@plotcn)
components.json Lookup
Matched against registries dictionary: '@plotcn': 'https://plotcn.vercel.app/r/{name}.json'
registries['@plotcn']
02. ITEM NAME (line-basic)
URL Template Substitution
Replaces the {name} placeholder to construct the exact manifest URL: /r/line-basic.json
{name} -> line-basic
fetches over secure HTTPS
RESOLVED MANIFEST ENDPOINT
JSON Manifest
https://plotcn.vercel.app/r/line-basic.json
Downloads the verified JSON specification containing TypeScript source, npm dependencies, and shared primitives.
HTTP 200 · application/json

Configuring the namespace in components.json

To enable the @plotcn namespace in your project, declare it under the registries dictionary in your components.json:

JSON
{  "$schema": "https://ui.shadcn.com/schema.json",  "style": "new-york",  "rsc": true,  "tsx": true,  "tailwind": {    "config": "tailwind.config.ts",    "css": "app/globals.css",    "baseColor": "zinc",    "cssVariables": true  },  "aliases": {    "components": "@/components",    "utils": "@/lib/utils",    "ui": "@/components/ui",    "lib": "@/lib",    "hooks": "@/hooks"  },  "registries": {    "@plotcn": "https://plotcn.vercel.app/r/{name}.json"  }}

The {name} parameter acts as a URL template. When you request @plotcn/line-basic, the CLI substitutes {name} with line-basic and requests https://plotcn.vercel.app/r/line-basic.json.

Official Shadcn Registry Directory

The @plotcn namespace is officially merged into the shadcn/ui community registry directory! The shadcn CLI natively resolves @plotcn components out of the box with zero manual configuration.
++

Browse and inspect items

The shadcn CLI provides built-in discovery and auditing tools for configured registries:

shadcn CLI Registry Commands

Installs the line chart component source and required Recharts dependency directly into your application.

$pnpm dlx shadcn@latest add @plotcn/line-basic
// Terminal output simulation
✔ Resolving @plotcn/line-basic
✔ Installing dependencies: recharts
✔ Creating components/charts/recharts/line-basic.tsx
✔ Creating components/charts/shared/chart-container.tsx
✔ Installation complete.

Inspecting before installation with view

Transparency is central to Plotcn's philosophy. Before writing any files to your project or installing npm packages, you can inspect the exact manifest payload:

PLOTCN/REGISTRY/LINE-BASIC/SOURCE
pnpm dlx shadcn@latest add @plotcn/line-basic

Checking public registry…

View local registry JSON
REGISTRY direct URL·ENGINE Recharts·FILES 1·DEPENDENCIES 6

Copied as source into your project (requires recharts).

This outputs the complete JSON manifest, allowing you to audit:

  • All required npm packages (dependencies)
  • All required shared Plotcn primitives (registryDependencies)
  • Every source file and target destination (files)
++

Anatomy of a registry item

Every installable Plotcn visualization is described by a single static JSON manifest following the official shadcn Registry specification.

Registry Item JSON Schema Explorer

Click any field to inspect its role in dependency resolution and file copying.

Official shadcn format
// /r/line-basic.json
{
  "name": "line-basic",
  "type": "registry:component",
  "description": "Responsive cartesian line chart with tooltip and hover state.",
  "dependencies": ["recharts"],
  "registryDependencies": ["chart-container", "chart-theme"],
  "files": [
    {
      "path": "components/charts/recharts/line-basic.tsx",
      "type": "registry:component",
      "target": "components/charts/recharts/line-basic.tsx"
    }
  ]
}
Field: "dependencies"

Standard npm packages that must be installed in package.json for this chart to run.

Plotcn Rule

Strictly isolated per engine. A Recharts chart installs 'recharts' only. D3 charts install granular packages like 'd3-shape'.

Complies with official shadcn Registry item specification.

Core schema fields

  • name: The kebab-case identifier for the item (e.g. line-basic, d3-force-network).
  • type: The resource type, typically "registry:block" for standalone charts or "registry:ui" for shared primitives like chart-container.
  • description: A concise technical summary used by CLI search and developer tooling.
  • dependencies: Array of npm package dependencies that must be present or installed in package.json.
  • registryDependencies: Array of other registry item names required by this component.
  • files: Array of file objects specifying local content or remote source URLs and target installation paths.

Catalog metadata separation

Plotcn maintains rich catalog metadata (engine category, accessibility tags, complexity tier) in our internal documentation catalog. However, in strict adherence to shadcn standards, we never inject non-standard fields into the published registry JSON manifests. This guarantees 100% compatibility with standard shadcn tooling.

++

Files

A well-architected registry item declares only the source files actually required for that visualization. Plotcn avoids bundling massive monolithic utilities when installing a single chart.

Filesystem Evolution (Pre vs Post Install)

Zero Framework Bloat
BEFORE INSTALLStandard shadcn project
components/
ui/
└── button.tsx, card.tsx, ...
AFTER INSTALL (@plotcn/line-basic)+2 files added
components/
ui/
charts/
shared/
chart-container.tsx(shared primitive)
recharts/
line-basic.tsx(chart source)

Target aliases resolve directly from your components.json configuration. Source files are written directly into your designated directory, never into an inaccessible node_modules package.

File destination mapping

The CLI maps registry source paths to your application structure based on your components.json alias settings:

Path Resolution

File Destination & Alias Path Mapping

The shadcn CLI maps registry manifest source paths to your local project structure based on your components.json aliases.

Resolves viacomponents.json
01 · Chart Componentaliases.charts→@/components/charts
REGISTRY MANIFEST SOURCEplotcn.vercel.app/r/line-basic.json
Manifest Payload
registry/recharts/line-basic.tsx
Pure React + SVG chart implementation declared in registry manifest.
CLI alias rewrite:@/components/charts
CONSUMER PROJECT TARGET@/components/charts/recharts/line-basic.tsx
Direct Local Source
components/charts/recharts/line-basic.tsx
Editable source file inside your application. Completely customizable.
02 · Shared Primitivealiases.ui / shared→@/components/charts/shared
REGISTRY MANIFEST SOURCEplotcn.vercel.app/r/chart-container.json
Primitive Payload
registry/base/chart-container.tsx
Responsive ResizeObserver container & CSS bridge declared as registry dependency.
CLI alias rewrite:@/components/charts/shared
CONSUMER PROJECT TARGET@/components/charts/shared/chart-container.tsx
Shared Local Code
components/charts/shared/chart-container.tsx
Shared primitive reused across all installed Plotcn charts with zero duplicate code.
Files are written directly into your designated workspace, not into an opaque runtime package.
Configure aliases in components.json →

Files are written with standard UTF-8 encoding and immediately formatted according to your project's TypeScript and linting rules.

++

Package dependencies

Plotcn distinguishes between ordinary npm dependencies (dependencies) and registry source dependencies (registryDependencies).

Package Dependencies

Modular Engine Dependencies

Strict engine isolation: each chart declares only the minimal npm packages required for its runtime.

RECHARTS CHARTS
recharts ^2.15
Single Package
Declares only 'recharts'. Never imports D3 selection or Google CDN scripts.
1 npm dependency
D3.JS CHARTS
d3-* micro-pkgs
Granular Micro-Modules
Only imports 'd3-shape', 'd3-scale', or 'd3-force'. Avoids 500KB+ monolithic d3 package.
2-3 focused modules
GOOGLE CHARTS
0 npm packages
Zero npm Packages
Google loader script loaded asynchronously on-demand from secure Google CDN. Zero npm bundle bloat.
Dynamic client loader

Modular D3 packaging

Plotcn never installs the monolithic d3 package. Instead, D3 components declare only the granular micro-modules they actually invoke:

  • Scale calculations: d3-scale
  • SVG path generation: d3-shape
  • Data array transformations: d3-array
  • Force simulation algorithms: d3-force

This ensures your client bundle remains lean and avoids pulling unused layout algorithms or obsolete DOM manipulation code.

++

Registry dependencies

Registry dependencies enable shared source code reuse without duplicating identical utility files across multiple chart installations.

Registry Dependencies

Shared Primitive Reuse Architecture

How multiple charts share chart-container without duplicated files or deep dependency chains.

CHART 01
Recharts
@plotcn/line-basic
Cartesian line chart requiring responsive container & theme observer.
registryDependencies: ['chart-container']
CHART 02
D3.js
@plotcn/d3-force-network
D3 force layout simulation requiring same responsive viewport bridge.
registryDependencies: ['chart-container']
both declare single shared primitive
SHARED SOURCE PRIMITIVE
Resolved Once
components/charts/shared/chart-container.tsx
Materialized once in your local codebase. No duplicate files, no monolithic node_modules runtime wrapper.
Direct Local Source · Shared Viewport

Shared primitives in Plotcn

Plotcn maintains a focused set of reusable registry primitives:

  • chart-container: Provides responsive SVG sizing, CSS variable bridge, and dark/light theme observer.
  • chart-state: Standardized loading skeleton, error boundary, and empty state wrapper.
  • chart-accessibility: Off-screen ARIA tables, summary captions, and keyboard navigation helpers.

Preventing dependency explosions

We adhere to a strict rule: No deep dependency graphs. A chart item may depend on 1 or 2 shared base primitives, but we never create multi-tier cascades (chart → wrapper → sub-wrapper → helper → util) that obscure code ownership.

++

Engine isolation

One of Plotcn's foundational architectural rules is strict engine isolation.

Hard Architecture Rule

Engine-specific registry items must stay engine-specific. Installing a Recharts component must never pull D3 modules. Installing a D3 component must never pull Recharts. Installing a Google chart must never pull Recharts or D3.
Engine Isolation

Strict Engine Boundary Enforcement

Plotcn components never leak dependencies across engines. Each visualization stack remains completely independent.

ISOLATED STACK 01
SVG / React
Recharts Stack
Pure React SVG. Only imports recharts. Never touches D3 DOM or Google CDN.
recharts only
ISOLATED STACK 02
Math / SVG
D3.js Stack
Mathematical calculations. Only uses modular d3-* micro-packages. Zero Recharts dependencies.
d3-* only
ISOLATED STACK 03
CDN Loader
Google Charts
Client-side dynamic loader. Fully encapsulated, zero Recharts or D3 dependencies.
0 npm bloat
unified through engine-agnostic contracts
SHARED ARCHITECTUREEngine-Agnostic Plotcn Foundation
Zero Engine Coupling
SHARED PRIMITIVE
chart-container.tsx
Provides ResizeObserver viewport dimensions and CSS variable bridge to all 3 engines.
Native React DOM
SHARED TOKENS
CSS Variables (--chart-1..5)
Consistent semantic color variables and typography inherited from Tailwind CSS.
hsl(var(--chart-*))

Shared primitives (container, theme, loading states) are completely agnostic of the underlying visualization engine. They interact solely with standard React DOM elements and CSS variables.

++

Installation lifecycle

When you run an install command, the shadcn CLI executes a deterministic, multi-phase installation lifecycle:

Installation Lifecycle

Deterministic 8-Step CLI Installation Sequence

The deterministic, step-by-step execution path executed by the shadcn CLI when installing a Plotcn chart.

  1. 01Done
    Parse Item Address

    CLI parses '@plotcn/line-basic' into namespace '@plotcn' and name 'line-basic'.

  2. 02Done
    Resolve Registry Endpoint

    Matches @plotcn in components.json to generate URL: https://plotcn.vercel.app/r/line-basic.json.

  3. 03Done
    Fetch JSON Manifest

    Downloads verified component manifest payload over secure HTTPS.

  4. 04Done
    Resolve registryDependencies

    Recursively downloads shared primitives (e.g. chart-container) to assemble full file list.

  5. 05Active
    Audit Package Dependencies

    Compares manifest 'dependencies' against local package.json to identify missing packages.

  6. 06Active
    Map Target Paths

    Resolves destination directory paths using configured aliases (@/components/charts/...).

  7. 07Active
    Materialize Source Files

    Writes pure TypeScript files directly to your repo and rewrites import statements.

  8. 08Done
    Install npm Packages

    Executes detected package manager (pnpm, npm, yarn, bun) to install missing engine dependencies.

Step-by-step CLI execution

  1. Parse Item Address: Evaluates the input string (e.g. @plotcn/line-basic or direct URL).
  2. Resolve Registry: Looks up @plotcn in components.json under registries to determine the manifest URL template.
  3. Fetch Manifest: Performs an HTTP GET request to retrieve line-basic.json.
  4. Resolve Registry Dependencies: Recursively resolves any referenced registry items (e.g. chart-container) to assemble the complete list of files.
  5. Resolve Package Dependencies: Reads dependencies and compares them against your local package.json.
  6. Determine Target Paths: Calculates destination filesystem paths using your configured aliases (@/components/...).
  7. Write Source Files: Emits clean TypeScript files into your codebase.
  8. Install Packages: Uses your detected package manager (pnpm, npm, yarn, bun) to install any missing npm dependencies.
++

What gets added

Here is a concrete example of the exact modifications made to your project when installing a typical Plotcn visualization (@plotcn/line-basic):

Project Modification Summary (@plotcn/line-basic)Clean Materialization
NEW FILEcomponents/charts/recharts/line-basic.tsx
142 lines
NEW FILEcomponents/charts/shared/chart-container.tsx
88 lines
PACKAGErecharts ^2.15.0 added to package.json
npm dependency
2 files written1 package installed0 telemetry scripts
Zero runtime overhead

No hidden side-effects

  • No background telemetry scripts.
  • No global stylesheet modifications (Plotcn uses your existing --chart-1 through --chart-5 variables).
  • No unrequested npm dependencies.
++

Source ownership

Once a Plotcn component is written into your repository, the source code belongs entirely to you.

Ownership Transition

The Source Ownership Model

Components move from the remote registry into your Git repository as native source code with 100% developer control.

DISTRIBUTION SPECIFICATION
Distribution Only
Plotcn Registry Catalog
Remote catalog delivering static JSON manifests and clean TypeScript source over HTTPS.
plotcn.vercel.app/r
shadcn add
shadcn add
YOUR APPLICATION REPOSITORY
100% Owned
Your Codebase (Full Ownership)
Native React files in components/charts/. Commit to Git, edit styles, customize SVG, zero vendor lock-in.
Git Versioned · No Telemetry
  • Direct Editing: You can change colors, modify TypeScript interfaces, adjust SVG responsive viewBoxes, or add custom annotations directly in the code.
  • Zero Lock-In: You never need to wait for an upstream pull request or library release to fix an edge case or adjust chart behavior.
  • Git Versioned: Changes to your charts are committed directly to your application's Git repository, giving your team complete review control.

Underlying library ownership

While Plotcn source files belong to your project:

  • Recharts and D3 dependencies remain governed by their respective open-source licenses (MIT/BSD).
  • Google Charts components execute Google's hosted visualization library subject to Google's terms of service.
++

Updates and upgrades

Because installed components live as source code in your repository, Plotcn never silently overwrites your local files.

The update philosophy: Intentional adoption

Lifecycle Model

The Update Philosophy: Intentional Adoption

Plotcn never silently overwrites your production code. You intentionally inspect and adopt upstream improvements.

  1. 01Done
    01. Install

    CLI downloads verified TypeScript source directly into components/charts/.

  2. 02Done
    02. Own

    Source becomes part of your Git repository. Zero external runtime dependencies or callbacks.

  3. 03Active
    03. Modify

    Freely change SVG layout, theme tokens, animations, or data interfaces to fit your product.

  4. 04Done
    04. Review Upstream

    Use shadcn view to compare upstream improvements, diff changes, and cherry-pick enhancements.

When Plotcn publishes updates to a component (such as performance optimizations or new accessibility features), your local implementation is protected:

  1. Inspect upstream changes: Run shadcn view @plotcn/<item> to see the current published manifest and code.
  2. Compare with local code: Diff upstream changes against your customized local implementation.
  3. Cherry-pick improvements: Manually or semi-automatically merge improvements that benefit your project.
  4. Run typecheck & tests: Validate that your updated chart continues to compile cleanly.

Plotcn does not provide opaque upgrade or migrate CLI scripts that risk breaking customized production code.

++

Local development

For contributors, teams building custom internal registries, or developers testing in offline environments, the shadcn CLI supports testing against local HTTP endpoints.

Local Development

Local Contributor & Registry Testing Pipeline

How contributors and teams author, build, serve, and test Plotcn registry items locally before release.

  1. 01Done
    Author Source Component

    Develop chart inside registry/recharts/ or registry/d3/ with strict TypeScript and accessibility attributes.

  2. 02Done
    Compile Static Manifests

    Execute pnpm build:registry to extract metadata, audit dependencies, and output public/r/*.json.

  3. 03Active
    Serve Locally

    Run pnpm dev to expose local registry endpoint at http://localhost:3000/r for testing.

  4. 04Done
    Fresh App Verification

    Run shadcn add http://localhost:3000/r/line-basic.json in clean consumer project to verify install & compilation.

Serving registry items locally

  1. Run the local Plotcn development server:
Terminal
pnpm dev
  1. In a separate test application, add the component using the local endpoint URL:
Terminal
pnpm dlx shadcn@latest add http://localhost:3000/r/line-basic.json

Local namespace testing

You can also temporarily map the @plotcn namespace to your local server in your test application's components.json:

JSON
{  "registries": {    "@plotcn": "http://localhost:3000/r/{name}.json"  }}

This lets you test the exact production command shadcn add @plotcn/line-basic against your locally running dev server.

++

Publishing

Plotcn's registry is compiled from modular source files into static JSON artifacts during the build process:

Publishing Pipeline

Registry Build & Publishing Architecture

How raw chart source code in the monorepo compiles into static JSON artifacts deployed to the global CDN.

PHASE 01: AUTHORINGMonorepo Source Code
registry/
SHARED PRIMITIVES
registry/base/
ChartContainer, state boundaries, theme bridges, and accessibility helpers.
RECHARTS CHARTS
registry/recharts/
Cartesian line, bar, area, radar, and radial components.
D3 & GOOGLE
registry/d3/ & google/
Force simulations, tree hierarchies, and Google GeoChart wrappers.
pnpm build:registry compile pipeline
PHASE 02: AUTOMATED CI BUILD
CI / Build Step
Static Manifest Compiler & Quality Gates
Extracts source files, parses AST dependencies, enforces shadcn JSON schema, and runs strict TypeScript check.
Zero Schema Violations · AST Verified
deploys static JSON payloads
PHASE 03: STATIC HOSTINGGlobal CDN Distribution
plotcn.vercel.app/r
INDEX CATALOG
Catalog Index
public/r/registry.json
Searchable catalog index of all available visualization components and tags.
ITEM MANIFESTS
Item Payloads
public/r/*.json
Self-contained JSON manifests resolved and downloaded by shadcn add commands.

Build validation pipeline

Before any registry manifest is published, our automated CI pipeline enforces strict quality checks:

  • Schema Validation: Ensures all JSON files conform to the official shadcn Registry specification.
  • Dependency Audit: Verifies that every imported package is declared in dependencies and that no circular registryDependencies exist.
  • Type Checking: Compiles all component source with TypeScript in strict mode.
  • Target Integrity: Verifies that file target paths map to valid directory structures without colliding with user code.

Registry Integrity Invariant

A component is not considered published until it installs, compiles, and passes rendering tests in a completely clean, isolated consumer project.
++

GitHub installation

In addition to HTTP registry endpoints, the shadcn CLI supports installing components directly from public GitHub repositories without requiring namespace configuration in components.json.

Comparison: Namespaced Registry vs. GitHub Direct

Feature Configured Namespace (`@plotcn/...`) GitHub Direct Address
FeatureConfigured Namespace (@plotcn/...)GitHub Direct Address
Command Syntaxshadcn add @plotcn/line-basicshadcn add https://github.com/.../line-basic.json
BrandingClean, branded developer experienceRepository URL path
ConfigurationHandled automatically by shadcn CLI (or in components.json)Zero configuration required
Best Used ForProduction apps, teams, standard DXFast prototyping, branch previews, testing PRs

Plotcn recommendation

For standard projects, use shadcn add @plotcn/<chart> for concise, native installations. Use direct GitHub or local URLs when testing unpublished branches or preview builds.

++

Security

Installing source code from external registries requires the same diligence as adding any third-party dependency to your project.

Core security principles

  • Audit Before Installing: Always run shadcn view @plotcn/<item> before running add on unfamiliar registry items.
  • Enforce HTTPS: Production registry endpoints must always use encrypted HTTPS to prevent man-in-the-middle tampering.
  • Zero Secrets Rule: Plotcn registry manifests never include API keys, access tokens, or private credentials.
  • Engine Verification: Inspect package dependencies to ensure no extraneous or suspicious packages are being installed.
++

Troubleshooting

Common registry resolution issues and their immediate solutions:

Unknown Registry Namespace

CAUSE:components.json does not register the @plotcn namespace.

FIX:Add "@plotcn": "https://plotcn.vercel.app/r/{name}.json" under "registries" in components.json.

Item Not Found (404)

CAUSE:The component name is misspelled or not yet published to the registry catalog.

FIX:Run `shadcn list @plotcn` or verify the component name in docs.

Missing Package Dependency

CAUSE:The component imports an npm package (e.g. recharts) not declared in item dependencies.

FIX:Install the missing dependency manually or report it as a Plotcn registry manifest bug.

Broken Registry Dependency

CAUSE:A shared primitive (e.g. chart-container) failed to resolve or download.

FIX:Run `shadcn add @plotcn/chart-container` explicitly to restore the missing shared file.

TypeScript Alias Resolution Error

CAUSE:Target component was copied into components/charts/ but tsconfig.json lacks @/* mapping.

FIX:Configure "@/*": ["./*"] in compilerOptions.paths in tsconfig.json.

Cross-Engine Package Leakage

CAUSE:Installing a Recharts component unexpectedly pulls D3 packages.

FIX:Ensure the component registry manifest does not declare unneeded packages. Report as a bug.
++

Verify the registry

Plotcn enforces a comprehensive quality matrix across all visualization engines before items are eligible for public release:

Plotcn Registry Quality & Validation Standards

Quality Invariants
Manifest Schema

JSON adheres to official shadcn schema with valid types and URLs.

Clean Install

Installs in a brand new project without manual file movement.

Typecheck

TypeScript compiles with zero errors on strict mode.

Engine Isolation

Does not install or import unrelated visualization engines.

Theme Coherence

Reads --chart-1 through --chart-5 CSS variables correctly in dark/light mode.

Accessibility

Includes ARIA roles, descriptive summaries, and keyboard focus states.

++

Next steps

Now that you understand the registry architecture and distribution pipeline, explore how to use and customize your installed components:

Installation

Prepare a React or Next.js project and install required dependencies.

shadcn/ui Setup

Configure components.json and integrate Plotcn with the shadcn Registry.

Registry Workflow

Learn how visualization components enter your local source tree.

Previousshadcn/ui SetupNextUsage

On this page

  • What is the Plotcn Registry?
  • Registry mental model
  • Registry namespace
  • Browse and inspect items
  • Anatomy of a registry item
  • Files
  • Package dependencies
  • Registry dependencies
  • Engine isolation
  • Installation lifecycle
  • What gets added
  • Source ownership
  • Updates and upgrades
  • Local development
  • Publishing
  • GitHub installation
  • Security
  • Troubleshooting
  • Verify the registry
  • Next steps