Your question is unclear. It is clear that you do only need one App, as running two instances of the same codebase to service the same clients (but differing only in where they come from) is a poor operational choice, for many obvious reasons.
So you have one install link, and thus your App can serve many stores. Shopify has no problem with that.
Where your explanation loses clarity is a lack of definition of these sources. What is a portal? What is a merchant portal? What is a self-serve portal. What would you run separate databases if the only thing different is this definition? Why not just have a column “source” of type merchant or self-serve?
You can draw boxes and arrows and explain your needs easier than words perhaps. Attach an image to your request so experts can try and deduce what it is you are trying to do.
Just trying to be helpful…