How huntabyte/shadcn-svelte works
Project type and purpose
• This is an open-source, community-led component library monorepo with three main deliverables:
– packages/cli: a command-line tool to scaffold and update Svelte component projects
– packages (implicit): the shared shadcn-svelte component registry (under sites/docs/src/lib/registry)
– sites/docs: a SvelteKit documentation site (and playgrounds) showcasing components
• Additional “playground” apps under /playgrounds allow live testing of components in JS and TS.
File structure
• Top-level directories:
– packages/cli: CLI entrypoint, commands, utils, templates, tests, build config
– playgrounds/*: two sample SvelteKit apps consuming the components in JS & TS
– sites/docs: SvelteKit docs site with MDsX content, registry files, static assets, scripts, tests, build configs
– .github/workflows: CI, release, preview deploys, reproduction workflows
– pnpm-workspace.yaml: monorepo dependency management via pnpm
• Architectural patterns:
– Monorepo with isolated package (CLI) and a docs site that imports the shared registry
– The component registry follows a directory structure by “style” (default, new-york) and type (block, example, ui)
– SvelteKit for server-side route generation in docs site
• Config files: pnpm-lock.yaml, package.json, tsconfig.json, eslint.config.js, Prettier, Vite, Tailwind, Svelte configs
README for additional insights
• Project description: “Unofficial community-led Svelte port of shadcn/ui”
• CLI exists to help users copy & paste components into their own apps
• Docs site runs on SvelteKit (routes, content, registry modules)
• Continuous integration and deployment via GitHub Actions