This repository publishes a custom shadcn registry with a documentation site, live component previews, generated registry JSON, and machine-readable docs for AI coding assistants.
The app is a static-hostable TanStack Start SPA deployed to Cloudflare Workers with Worker Static Assets. Component docs are authored in MDX with Fumadocs, registry items are built from registry.json, and generated files are served from stable public URLs.
What this repo includes
- Fumadocs documentation in
content/docs, discovered from the filesystem. - shadcn registry output generated from
registry.jsonintopublic/r. - Live component previews that can render examples from
examplesor inline MDX. - A default
lumaregistry style for new components, plus the current placeholder item. - Static AI documentation endpoints such as
/llms.txt,/llms-full.txt, and/llms.md/.... - Cloudflare Workers deployment using Worker Static Assets.
Tech Stack
TanStack StartTanStack RouterReact 19+TypeScriptViteTailwind CSS 4Fumadocsshadcn/uimotionshiki+rehype-pretty-codeCloudflare Workers
How It Works
- Add or edit registry source in
src/registry/luma. - Add the registry item to
registry.json. - Document the component in
content/docs/components. - Render a preview with
ComponentPreview. - Build the generated registry files with
pnpm registry:build. - Build generated docs and agent files with
pnpm static:build.
Once deployed, users can install registry items with the shadcn CLI:
$ pnpm dlx shadcn@latest add https://tanstartercn.tsu.moe/r/button.json
Important Paths
content/docs- MDX documentation pages.examples- reusable preview examples.src/registry/luma- installable registry component source.src/shared/components- app and docs UI.src/shared/components/ui- complete shadcn/ui primitives used by the site.src/shared/lib/registry.ts- preview/component lookup wiring.registry.json- shadcn registry manifest.public/r- generated registry JSON files.scripts/generate-static-assets.mjs- generated docs, LLM, sitemap, and discovery files.
Do not edit generated output by hand. Regenerate it with the matching script instead.
Public Endpoints
/r/registry.json- registry index./r/button.json- individual registry item./llms.txt- quick AI docs index./llms-full.txt- complete generated docs./openapi.json- machine-readable endpoint catalog./.well-known/agent-skills/index.json- agent skill discovery.
The production origin comes from FALLBACK_SITE_ORIGIN in src/shared/constants/site.ts, unless SITE_URL is provided at build time.
Common Commands
pnpm dev
pnpm registry:build
pnpm static:build
pnpm typecheck
pnpm check
pnpm build
pnpm deployUse pnpm registry:build after registry changes, pnpm static:build after docs or static endpoint changes, and pnpm build before deploy.
Next Steps
Read Installation to install registry components, Styling to customize tokens, Components to browse registry items, and Extending to add new docs pages or components.