# Module list

The module registry is the file `apps/web/data/modules.json`. This page renders every entry of it. A module is a package that [extends Hamur at build time](/modules); `hamur module add <name>` installs one and lists it in `modules`.

The first-party modules release in lock step with `hamur`, so their version is the version of the core. Each row names the libraries the module supports; `all` is html, preact, react, solid, svelte and vue.

Neither `hamur module add` nor `hamur module search` reads the registry. They keep a built-in list of the first-party modules, and `search` adds the npm packages that carry the `hamur-module` keyword.

## The list

Type in the box to filter by name, package or description, or pick a category.

## Add a module to the registry

Add an entry to `apps/web/data/modules.json`:

| Key           | Is                                                                       |
| ------------- | ------------------------------------------------------------------------ |
| `name`        | the short name, unique in the file                                       |
| `npm`         | the package name, required                                               |
| `description` | one line                                                                 |
| `category`    | the group the filter offers                                              |
| `frameworks`  | `"all"` or a list of `html`, `preact`, `react`, `solid`, `svelte`, `vue` |
| `repo`        | the URL of the source                                                    |
| `firstParty`  | `true` for a package of `@hamur/` that Hamur releases                    |

`bun scripts/check-modules.ts`, part of `bun run check`, fails on a mistake in the file: an entry without `npm`, a repeated `name`, an unknown library, a first-party entry outside `@hamur/`, a first-party module of the built-in list that the file lacks, or a first-party entry whose `frameworks` differ from the built-in list's.
