# Develop the registry

## Local development

Requirements:

- Node.js 20 or newer
- npm 10 or newer

```bash
git clone https://github.com/qentrah/DUI.git
cd DUI
npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).

Before submitting a change:

```bash
npm run lint
npm run build
npm run registry:build
npm run registry:validate
```

## Registry structure

```text
app/                 Documentation website
components/ui/       Installable component source
components/library/  Documentation previews
lib/                 Shared utilities and catalogs
public/r/            Generated registry payloads
registry.json        Registry source of truth
components.json      Local shadcn configuration
```

When adding an installable component:

1. Add its source to `components/ui`.
2. Declare the item and dependencies in `registry.json`.
3. Add its documentation metadata to `lib/catalog.ts`.
4. Add a preview and example source.
5. Build and validate the registry.

## Contributing

Contributions are welcome. Read [`CONTRIBUTING.md`](https://github.com/qentrah/DUI/blob/master/CONTRIBUTING.md) before opening a pull request. By participating, you agree to follow the [`CODE_OF_CONDUCT.md`](https://github.com/qentrah/DUI/blob/master/CODE_OF_CONDUCT.md).

For security issues, follow the private reporting process in [`SECURITY.md`](https://github.com/qentrah/DUI/blob/master/SECURITY.md).