Private shadcn registry — source of truth for Hartateya UI components.
Namespace: @hartateya
pnpm install
cp .env.example .env.local
# set REGISTRY_TOKEN to a shared secret
pnpm registry:generate
REGISTRY_TOKEN=your-token pnpm dev
# optional: PORT=3001 pnpm devEndpoints (require Authorization: Bearer $REGISTRY_TOKEN):
GET /r/registry.json— catalogGET /r/{name}.json— item (e.g./r/button.json; rewritten to/r/{name}in Next.js)
- Edit files under
src/_components/ui,src/_lib,src/_hooks pnpm registry:generate- Deploy this app with
REGISTRY_TOKENset on the host
Consumer components.json aliases should match the design system layout (lib → @/_lib, hooks → @/_hooks, ui → @/_components/ui).
In the consumer components.json:
{
"registries": {
"@hartateya": {
"url": "https://<HARTATEYA_UI_HOST>/r/{name}.json",
"headers": {
"Authorization": "Bearer ${REGISTRY_TOKEN}"
}
}
}
}In the consumer .env.local (same token as the registry host):
REGISTRY_TOKEN=your-tokenInstall shared shadcn config (theme CSS, cn(), useIsMobile()):
pnpm dlx shadcn@latest add @hartateya/configInstall the full UI suite (shadcn will list the files and ask you to confirm unless you pass -y):
pnpm dlx shadcn@latest add @hartateya/uiInstall a single component:
pnpm dlx shadcn@latest add @hartateya/button
pnpm dlx shadcn@latest list @hartateyaLocal registry URL example: http://localhost:3001/r/{name}.json.
- 61 UI components in
src/_components/ui config—@hartateya/configinstallsglobals.css,utils, anduse-mobileui—@hartateya/uiinstalls every UI component (confirm in the CLI)utils(cn)use-mobile
@hartateya/config does not install tsconfig.json, next.config.ts, biome.json, or postcss.config.mjs.