Multi product with single strapi instance

I have to run 5 products with same collection types just the content getting changed. So is it possible to do this in strapi?
**First method: **I had tried a method in which I create two environments in config product1 and product2 and connect them to different databases, but for running that I have to start two servers which is not what I want. Is it possible to run it in one strapi server?
Second method: to all collection types I can add a field called product, and creating custom policy in strapi allow only those users to access the content who are related to product1 or product2, not both. Is this thing possible

This topic has been created from a Discord post (1276103696920346664) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

1 Like

The second method is probably the best way to do what you want.

Id

  1. Add a field to your User entity to specify what “catalog” they have access to
  2. Create a field in your Product entity to specify what “catalog” they belong, then create a middle
  3. Create a middleware that reads the “catalog” field from User and filter the products by the right catalog.

can I implement this middleware in bff layer?

also do you recommend creating same collection types 5 times for each product, since I have to implement a bff layer in between for search bar and all?

1 Like