Skip to main content

Model Catalog

Discover, share, and reuse data models.

Overview


The catalog is a free and open source repository of all data models created by the ComposeDB developer community. The catalog aims to make it as easy as possible for developers to discover, share, and reuse each others models and underlying data.

Data Model Table

Use Cases

  • Discover high-quality models for your app
  • Share and distribute your models to others

Adding models to the catalog


Models in all deployed composites are automatically available on the catalog.

How it works:

  1. A developer deploys a composite containing models to testnet or mainnet
  2. An indexer builds a catalog of all deployed models and exposes it via API
  3. The catalog is automatically available on various interfaces, including ComposeDB CLI

Using models from the catalog


Prerequisites

You need a running instance of ComposeDB server and CLI to use the catalog. See set up your environment to get started.

List all models

Using ComposeDB CLI, run the following command to list all models:

composedb model:list --table

You will see a table where each model has the following metadata properties:

  • Name - name of the model
  • ID - unique identifier (streamID) of the model
  • Description - description of the model

Using a single model

Fetch a single model from the catalog and convert it into a composite, using its model ID:

composedb composite:from-model kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 --output=my-composite.json

Using multiple models

Run the composite:from-model command depicted above for each model you want to use in your application. Remember to change the composite file name to avoid collisions. After you have multiple composite files, merge them. See Merging Composites.

Next Steps


To use your newly created composite in your app, you will need to deploy and compile your composite.


Can’t find what you’re looking for in the catalog? See Writing Models to learn how to write your own models.