Creating a directory linking to other tiles

Hello, I’m new to Ceramic and I have a few questions that might be a bit basic:

I have an application submitting a tile to a local node with information about products (for simpliying things, we can assume it’s just ID and price). I’m using the JS HTTP client and the TileDocument object from the @ceramicnetwork/stream-tile package in this manner: TileDocument.create(ceramic, content)

I need, however, sort of an “entry point” for all the products submitted, a sort of directory to keep track of all the products. How should I approach this? Also relatedly, would a tile representing this directory change IDs after updating it?.. What is the recommended way to treat linked data on Ceramic?

I’d appreciate any help. Thanks!

1 Like

have you considered using the composedb libraries yet instead of the lower level http client?

It would allow you to better model your data and its relations and then write queries against it

2 Likes

@zfer That’s a fair suggestion, so far I haven’t been successful using composeDB programmatically, maybe I should give it a try with the latest updates… The JS http client though is working very well.

1 Like

Yeah I’ll echo Zach’s recommendation. The use case you describe of being able to query across all the documents created of a given type is exactly what ComposeDB was built for. ComposeDB’s build-in indexing and querying capabilities will allow you to easily find all all product documents that have been created.

2 Likes