{"id":21019451,"url":"https://github.com/ceramicnetwork/feature-models","last_synced_at":"2026-01-29T21:05:19.825Z","repository":{"id":248024217,"uuid":"771107879","full_name":"ceramicnetwork/feature-models","owner":"ceramicnetwork","description":"Set of model definitions that demonstrate features of ComposeDB","archived":false,"fork":false,"pushed_at":"2024-07-11T21:19:52.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-20T18:31:41.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceramicnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-12T17:44:51.000Z","updated_at":"2024-07-11T21:19:55.000Z","dependencies_parsed_at":"2024-07-12T00:25:02.533Z","dependency_job_id":null,"html_url":"https://github.com/ceramicnetwork/feature-models","commit_stats":null,"previous_names":["ceramicnetwork/feature-models"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ceramicnetwork/feature-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicnetwork%2Ffeature-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicnetwork%2Ffeature-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicnetwork%2Ffeature-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicnetwork%2Ffeature-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceramicnetwork","download_url":"https://codeload.github.com/ceramicnetwork/feature-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicnetwork%2Ffeature-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T10:32:20.059Z","updated_at":"2026-01-29T21:05:19.788Z","avatar_url":"https://github.com/ceramicnetwork.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feature Models\n\nThis repo contains model definitions that demonstrate features of ComposeDB.\nWith each model you can deploy it and then list existing documents for that model.\nAdditionally you can create new models that demonstrate new features.\n\n\u003eNOTE: All models in the repo are deployed to Testnet Clay and so many documents may already exist.\nIn order to experiment with the model you must run a local node connected to Clay.\n\n## Using a Model\n\nA model defines a common schema for all documents within the model.\nUsing the Ceramic network we can create new documents and read existing documents for a model.\n\n### Deploy a Model\n\nTo be able to create or read documents for a model we must first deploy it to a local node.\nThis repo contains many different models, pick one from the composites directory and deploy it using the following command.\n\n    composedb composite:deploy composites/hello_world.json\n\n\u003eNOTE: You must have an admin DID configured in your environment in order to deploy models to a local node.\nSee https://developers.ceramic.network/docs/composedb/set-up-your-environment#developer-account\n\n### Creating a Document\n\nNow we can create a new document within that model. We need to use the stream Id for the model and specify its content.\nFor the `Hello World` model this looks like:\n\n    composedb document:create kjzl6hvfrbw6c5217gm158l4qvwet3h19pftloh07ier7sir9l55t9n7zvj9n0u '{\"greeting\":\"hello world\"}'\n\n\u003eNOTE: The stream Id for a model can be found in its composite file.\nFor example use jq to extract the stream Id: `jq -r '(.models | keys)[0]' composites/hello_world.json`.\n\n### Listing Existing Documents\n\nFinally we can list existing documents for a model.\nWe do this using GraphQL from the comand line.\n\nList to first 10 instances of the HelloWorld model.\n\n    composedb graphql:execute 'query{ helloWorldIndex(first:10){ edges{ node{ id greeting } } } }'\n\nHowever since this is a publicly shared model its likely that the model you just created is not among the first 10 ever created.\nWe can instead use graphql to query the first 10 instances that we created.\n\n    composedb graphql:execute 'query($did: ID!) {\n      node(id: $did) {\n        ...on CeramicAccount {\n          helloWorldConnection (first: 10) {\n            edges {\n              node {\n                id\n                greeting\n              }\n            }\n          }\n        }\n      }\n    }'\n\nNote the `did` parameter is automatically supplied by the command.\nOther query parameters need to be supplied using `--vars`.\n\nSee https://developers.ceramic.network/docs/composedb/guides/data-interactions/queries for a full explanation of GraphQL queries.\n\n## Create a Model\n\nTo create a new model add a graphQL Schema Definition into the `models` directory.\nName the output composite with the same name as the model file, renaming the extension from `.graphql` to `.json`.\nThen create the model against a running js-ceramic node using this command.\n\n    composedb composite:create model/hello_world.graphql --output composites/hello_world.json\n\n\n## Makefile\n\nWe provide a Makefile that provides targets for creating composites from models and then deploying all models to a node.\n\n    make composites/hello_world.json # Creates the model composite\n    make deploy # Deploys all models to the node\n\n## License\n\nFully open source and dual-licensed under MIT and Apache 2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicnetwork%2Ffeature-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceramicnetwork%2Ffeature-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicnetwork%2Ffeature-models/lists"}