---
title: Share a component with the official repository
project: Flow
version: 11.1
section: development
language: en
license: MIT
url: https://totaljs.es/docs/flow/11-1/development/share/
updated: 2026-11-19T10:58:53.655Z
---

# Share a component with the official repository

> Prepare a component for the official catalogue and offer it to the Total.js repository.

The official components live in the public GitHub repository [totaljs/flowstreamcomponents](https://github.com/totaljs/flowstreamcomponents). When your component is useful to others, you can offer it there, and after it is accepted it appears in the catalogue of every Flow.

## How the repository is organized

| Path | What it holds |
|---|---|
| `components/` | One HTML file for each component. The name of the file is the id of the component in the catalogue. |
| `db.json` | The catalogue. |
| `db.js` | The script that builds `db.json` from the files in `components/`. |
| `tester.js` and `tests/` | The [tester](../testing/) and the tests. |

## Prepare your component

1. Name the file after the component, in lowercase, for example `components/uppercase.html`.
2. Write each of `exports.id`, `exports.name`, `exports.group`, `exports.version`, `exports.icon`, `exports.author`, `exports.color` and `exports.kind` on one line that ends with a semicolon. `db.js` reads these lines one by one to build the catalogue entry.
3. Write a `<readme>`. `db.js` copies it into the catalogue, and users read it under **Read me** and in [Official components](../../components/introduction/).
4. Put your name in `exports.author`. Components whose author is not Total.js show a **Community** badge.
5. Add a test in `tests/`, and run it.
6. Follow the coding standards that the repository links in its README.

## Build the catalogue entry

`db.js` reads every file in `components/` and writes `db.json`, sorted by name. The address of each file in the catalogue is:

```text
https://cdn.totaljs.com/flowstream/webcomponents/<file name>
```

Run it from the repository folder after `npm install total4`:

```bash
node db.js
```

Check that `db.json` has an entry for your component with the right name, group, version and readme.

## Offer it

Fork the repository on GitHub, add your component and its test on a branch, and open a pull request with a short description of what the component does. Total.js publishes the catalogue at the address above.

## Change a component later

Raise `exports.version` with every change. Flow compares the version in the catalogue with the installed one, and shows an **update** badge in the **Download components** window when the catalogue has a newer version.
