Backend design feedback multiple collection

Hello,

Imagine you want to build a movie database app using Strapi as backend.

You get the movies from external APIs by producer (eg: Marvel API, Warner Bros API).

But it would be great for your app to use Strapi API endpoints by genre (eg: Fantasy).

Would be correct to create a collection type per producer to get the movies, and also a collection type per genre, and then, when creating the movies in the producer table, also create it in the genre table but doing this in the producer controller?

I could not figure out the best way to do it.

Thanks!!!

Not sure if I completely understand what you are asking? Can you give a more detailed example?

Hi DMehaffy, thank you for your reply!

Imagine you obtain the movie data per producer from an external API, but you need an endpoint per category.

What would be the best practice to create an endpoint for category?

Is this possible?

Thanks!

Best option would be to have a model to store the categories with a relation to movies.

Then you filter movies based on that relation like http://localhost:1337/movies?category.name=someName Depends on the structure but you could have multiple also and use the _in filter.

Thank you!