Designing a Shopify-like Saas website

Ok, so I want to develop an ed tech Saas product that is similar to Shopify regarding features like every user having their own separate site (in Shopify it is a storefront). I have no idea where to begin (I don’t even know what they call these type of products) Here are my design/architectural uncertainties:

1.) How does the software work that enables each client of mine to have their own separate site (in Shopify’s case it is a storefront)? Obviously there is generic functionality, which is the essence of the product, but each user has their own running instance of this software/site and they can customise certain things like templates/markup, branding, settings, etc. How is this possible in Elixir + Phoenix? Should I develop a regular phoenix website (the core product) and then have a script to make a copy of that site for each user that signs up? Then I will have to manage many running instances of the same site essentially. Furthermore, how will the database (Ecto repo) and assets management work? For customers to change markup/templates/store appearance, assets have to be changed.

2.) How can I enable customers to “point” a domain name at their running instance/site so that they do not have to use it with my saas product’s domain? For instance, they register at, but they want to use a custom domain that they bought for their site, even though it is hosted on our servers. How does that work?

3.) How can I make this system pluggable? For instance, the core product could perhaps be extended with a messaging/crm/analytics plugin that will be sold separately. What design patterns and considerations should I be aware of to build a system like this. I am especially confused about how a plugin that has its own ecto repo/tables can plug into a system (the core product/site) that already has its own repo/tables.

Please note that I am not a professional developer and all this is just an ambition and curiosity that I have. I am well aware that I will probably need assistance to build such a site, but I am looking for concrete examples and resources that show how a site like this works internally to start my research journey. If anyone is aware of such a codebase or has any experience that they would like to share, please do so.

Thank you all for your time to help a less experienced member :slight_smile:



These are good concerns.

Curious to know if you came around figuring out the solution?

The OP asked many broad questions that can’t be answered with a normal sized reply. for the smallest one:

If you want to point an apex domain name, the customer has to change the A DNS record. For subdomains, the common practice is to add a CNAME record.

IMHO: It seems to me that this question is more related to product building and architecture than Elixir or Phoenix. Therefore, I’d recommend that you ask those questions on Stack Overflow or Stack Exchange forums which are more generic in scope. I don’t mean to brush you off, but your question at least will have more visibility there and it’ll certainly maximize your chances of getting the responses you are looking for.

Like @derek-zhou pointed out, it’s very difficult to give practical advice considering such a broad scope. My recommendation to you would be to find literature on those topics and do a little bit of research on open source projects that work similarly to what you want to do.

1 Like

I guess the one Phoenix-related bit is this: can I somehow handle in router a situation where instead of /customer/:customer_name I want to be able to access What needs to be done on Phoenix side?