adrien2p / medusa-extender

:syringe: Medusa on steroid, take your medusa project to the next level with some badass features :rocket:
https://adrien2p.github.io/medusa-extender/
MIT License
321 stars 39 forks source link

Multi-tenant 2 #130

Closed umer2001 closed 2 years ago

umer2001 commented 2 years ago

Multi-tenant 2 I am interested in working on Multi-tenant 2 which is mentioned in this image.

Can anyone guide me on where to start?

adrien2p commented 2 years ago

Hey there, you can have a look at shahed tutorial on medusa blog about marketplace. It is using that approach which is the most used. You can find a link to the example repo in the resources part of the doc

umer2001 commented 2 years ago

Yeah I had the same thing in my mind as well but before that, I would like to test the behavior of multi-tenant 1 & I followed the tutorial step by step like

adrien2p commented 2 years ago

It is actually an experimental module. Medusa does not allow custom properties in the config to be stored and for now it is in pause. It will act more as an example of what you can to to customise your architecture and i suggest that you create your own by maybe taking some inspiration of it ☺️ wdyt?

umer2001 commented 2 years ago

I have an Idea, I know it's not too professional but maybe we can pass the config as a JSON string to an environmental variable OR make an optional parameter extenderConfig in Medusa class constructor. what do you think?

adrien2p commented 2 years ago

The env variable that you parse then would be doable. I could suggest that you export a const somewhere that you service can consume, it could also be a possibility, of course the database url would always have to be in the env. you could also imagine to have an external source which provides you with the config and that you can call from the service, which would also allow to not restart your instance each time you need to add a tenant 😀

herawais commented 1 year ago

Hi @umer2001 are you still interested to work on this Multi tenant Architecture, i am open for collaboration,

Thanks