Spark is a custom shadcn/ui component registry for building web apps.
Start from a project that has already been initialized with shadcn. If it has not been initialized yet, run:
pnpm dlx shadcn@latest initThen add a registry item directly from Spark:
pnpm dlx shadcn@latest add https://spark.surge.studio/r/surge-logo.jsonInstall dependencies:
pnpm installRun the docs app locally:
pnpm devBuild the registry JSON files:
pnpm registry:buildVerify the generated /packages/registry/public/r output matches packages/registry/registry.json:
pnpm registry:checkBuild everything for production:
pnpm buildpnpm build regenerates and verifies the registry artifacts before running the Next.js production build.
Spark serves a flat registry endpoint from the docs app at:
/r/registry.json/r/surge-logo.json
Registry source files live in packages/registry/registry/** and are transformed into public JSON payloads in packages/registry/public/r by shadcn build. The docs build then syncs those files into apps/docs/public/r so they are shipped as static assets at /r/*.json.
apps/docscontains the deployable Next.js docs and marketing app.packages/contentcontains editorial docs content and docs-only metadata layered on top of the registry.packages/registrycontains registry source and generated registry output.packages/uicontains shared presentational components used by the docs app.
- Keep
packages/registry/registry.jsonas the source of truth for item metadata. - Regenerate
packages/registry/public/rwhenever a registry item changes. - The landing page is only a preview site. The actual distribution contract is the JSON served from
/r.