Skip to content

Repository files navigation

Hartateya UI

Private shadcn registry — source of truth for Hartateya UI components.

Namespace: @hartateya

Develop

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 dev

Endpoints (require Authorization: Bearer $REGISTRY_TOKEN):

  • GET /r/registry.json — catalog
  • GET /r/{name}.json — item (e.g. /r/button.json; rewritten to /r/{name} in Next.js)

Publish components

  1. Edit files under src/_components/ui, src/_lib, src/_hooks
  2. pnpm registry:generate
  3. Deploy this app with REGISTRY_TOKEN set on the host

Consume from another repo

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-token

Install shared shadcn config (theme CSS, cn(), useIsMobile()):

pnpm dlx shadcn@latest add @hartateya/config

Install the full UI suite (shadcn will list the files and ask you to confirm unless you pass -y):

pnpm dlx shadcn@latest add @hartateya/ui

Install a single component:

pnpm dlx shadcn@latest add @hartateya/button
pnpm dlx shadcn@latest list @hartateya

Local registry URL example: http://localhost:3001/r/{name}.json.

Scope (v1)

  • 61 UI components in src/_components/ui
  • config@hartateya/config installs globals.css, utils, and use-mobile
  • ui@hartateya/ui installs 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.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages