Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Turn a public GitHub repo into a registry. Users install with `npx shadcn add <o
npx create-scn-stack my-toolkit --github acme/toolkit
```

Commit and push is the publish step. See [GitHub Registries](https://scnstack.sh/docs/cli/github-registries).
Commit and push is the publish step. See [GitHub Registries](https://scnstack.sh/docs/distribution/github-registries).

### Add to an existing project

Expand Down
2 changes: 1 addition & 1 deletion www/content/docs/cli/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "CLI",
"pages": ["options", "init", "github-registries", "eject", "prompts"]
"pages": ["options", "init", "eject", "prompts"]
}
4 changes: 2 additions & 2 deletions www/content/docs/cli/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ When you run `npx create-scn-stack`, you'll be guided through these options:
|--------|-------------|---------|
| **Registry name** | Identifier for your registry (e.g., `my-ui`) | `my-ui` |
| **Project location** | Folder to create the registry in | `./<registry-name>` |
| **Distribution** | Hosted (build + host) or [GitHub source registry](/docs/cli/github-registries) | `Hosted` |
| **Distribution** | [Hosted](/docs/distribution/hosted) (build + host) or [GitHub source registry](/docs/distribution/github-registries) | `Hosted` |
| **GitHub repo** | `owner/repo` slug (GitHub target only) | — |
| **Style** | shadcn/ui style variant | `New York` |
| **Homepage** | URL where the registry will be hosted | `https://<name>.com` |
Expand Down Expand Up @@ -55,7 +55,7 @@ npx create-scn-stack my-ui --yes --no-skills
| `--style <style>` | `new-york` \| `default` |
| `--homepage <url>` | Registry homepage URL |
| `--target <target>` | `hosted` \| `github` (default: `hosted`) |
| `--github [owner/repo]` | Shorthand for `--target github` — see [GitHub registries](/docs/cli/github-registries) |
| `--github [owner/repo]` | Shorthand for `--target github` — see [GitHub registries](/docs/distribution/github-registries) |
| `--github-slug <slug>` | `owner/repo` for GitHub source registries |
| `--framework <fw>` | `nextjs` \| `vite` \| `react-router` \| `tanstack-start` |
| `--docs <engine>` | `fumadocs` \| `mintlify` \| `starlight` \| `none` |
Expand Down
2 changes: 1 addition & 1 deletion www/content/docs/cli/prompts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ build step, and a homepage URL. **GitHub** produces a minimal repo that *is*
the registry — users install with `npx shadcn add <owner>/<repo>/<item>` and
there's no build or server. Picking GitHub asks for an `owner/repo` slug and
skips the framework, docs, namespace, and monorepo prompts. See
[GitHub Registries](/docs/cli/github-registries).
[GitHub Registries](/docs/distribution/github-registries).

### Style

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ npx create-scn-stack add-component input
| Install form | `@ns/item` or URL | `owner/repo/item` |
| Publish step | deploy | `git push` |

Pick **hosted** when you want docs, previews, and a branded site. Pick
**GitHub** when you just want to share items from a repo.
Pick [**hosted**](/docs/distribution/hosted) when you want docs, previews, and
a branded site. Pick **GitHub** when you just want to share items from a repo.
65 changes: 65 additions & 0 deletions www/content/docs/distribution/hosted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: Hosted Registry
description: The classic shadcn build-and-host model — a framework app builds your registry JSON and serves it from a URL.
---

A **hosted registry** is the default distribution model. `create-scn-stack`
scaffolds a framework app that builds your `registry.json` into static JSON
files and serves them from a homepage URL. Users install via a namespace
handle or the full registry URL.

```bash
# Default target — no extra flags needed
npx create-scn-stack my-ui
```

Pick hosted when you want a branded docs site, live component previews, v0
integration, and full control over where the registry lives. If you only want
to share items from a public repo with no build step, use a
[GitHub source registry](/docs/distribution/github-registries) instead.

## How it works

1. You author items in `registry/<style>/ui/` and declare them in
`registry.json` (via the `include` pattern).
2. `shadcn build` (or the `registry:build` script) generates static JSON files
into `public/r/`.
3. Your framework app serves those files from your homepage URL.
4. Users install with the shadcn CLI.

```bash
# Build the registry output
npm run registry:build

# Users install via namespace…
npx shadcn@latest add @my-ui/button

# …or the full URL
npx shadcn@latest add https://my-ui.com/r/button.json
```

## What you get

A hosted scaffold wires up the pieces a GitHub source registry intentionally
skips:

- A **framework** app shell — see [Frameworks](/docs/frameworks)
(Next.js, Vite, React Router, TanStack Start).
- A **docs engine** — see [Docs Engines](/docs/docs-engines)
(Fumadocs, Mintlify, Starlight).
- A `registry:build` script and `public/r/` output.
- A **namespace** (e.g. `@my-ui`) for short install handles.
- Component previews, v0 integration, and `llms.txt`.

See [Project Structure](/docs/project-structure) for the full layout, and the
[options reference](/docs/cli/options) for every prompt and flag.

## Publishing

Deploy the app anywhere (Vercel, Netlify, Cloudflare, self-hosted). Each time
you add or change an item, rebuild and redeploy so `public/r/` stays in sync.

## Hosted vs GitHub

For a side-by-side comparison of the two distribution models, see
[Hosted vs GitHub](/docs/distribution/github-registries#hosted-vs-github).
4 changes: 4 additions & 0 deletions www/content/docs/distribution/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Distribution",
"pages": ["hosted", "github-registries"]
}
2 changes: 1 addition & 1 deletion www/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Follow the interactive prompts to configure your registry. Or skip prompts entir
npx create-scn-stack my-ui --yes
```

Want to share items straight from a public repo with **no build, no host, and no server**? Scaffold a [GitHub source registry](/docs/cli/github-registries) instead — users install with `npx shadcn add <owner>/<repo>/<item>`:
Want to share items straight from a public repo with **no build, no host, and no server**? Scaffold a [GitHub source registry](/docs/distribution/github-registries) instead — users install with `npx shadcn add <owner>/<repo>/<item>`:

```bash
npx create-scn-stack my-toolkit --github acme/toolkit
Expand Down
2 changes: 2 additions & 0 deletions www/content/docs/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"title": "scn-stack",
"pages": [
"index",
"---Distribution---",
"...distribution",
"---CLI---",
"...cli",
"---Output---",
Expand Down
Loading