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.
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:
- A developer deploys a composite containing models to testnet or mainnet
- An indexer builds a catalog of all deployed models and exposes it via API
- 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 modelID
- unique identifier (streamID) of the modelDescription
- 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.
Related Guides
Can’t find what you’re looking for in the catalog? See Writing Models to learn how to write your own models.