How To Build a Multi-Tenant eCommerce Platform in 3 Months?
Tags: ecommmerce
Published: 2020-11-24 19:21:09

<h2>Introduction</h2>

<p>For the last several months, I have been receiving a lot of inquiries about building <strong>multi-tenant eCommerce platforms</strong>. </p>

<p>Many startups are trying to take advantage of the COVID-19 situation and are willing to build <strong>SaaS</strong> (software as a service) <strong>platforms</strong> allowing small businesses to go online with their product. </p>

<p>Just like a <strong>Shopify</strong>. </p>

<p>The most frequent inquiries come from the restaurant/food delivery and grocery shopping industries. Sometimes it’s about copying a global business model in a local area or adjusting the business model to yet undiscovered industry niche.</p>

<p>As the idea of releasing the <strong>SaaS eCommerce platform</strong> is pretty popular, startups usually want to shorten the time to market and release the platform before the competition.</p>

<p>That’s why I’ve decided to collect our insights and turn them into a blog post that will help entrepreneurs with <strong>building Shopify-like platforms</strong>.</p>

<p>So, how to build a Shopify-like platform<strong> in 3 months</strong>? </p>

<p>Let's start from the beginning.</p>

<h2><br><br>What is a multi-tenant eCommerce platform?</h2>

<p><strong>A multi-tenant eCommerce platform</strong> allows distributors and vendors building their <strong>own branded online stores</strong>. </p>

<p>Therefore, the development and maintenance costs are much lower, and it makes the whole process more efficient and easier than creating a store from scratch.</p>

<h2 class="has-black-color has-text-color"><br><br>Multi-tenant vs single-tenant: the differences</h2>

<p>The main difference between multi-tenant and single-tenant models is the number of software instances. While in the case of the first one this number is practically limitless, a single-tenant model limits the number of platform users to one.&nbsp;</p>

<p>In our scenario, a multi-tenant model means that multiple store owners can create and manage their web shops that will run on a single eCommerce codebase.&nbsp;</p>

<p>In a single-tenant model, on the other hand, a single online store is using its copy of the software that is not being shared with any other online store.</p>

<p>Shopify is a good explanation of the difference between multi-tenant vs single-tenant stores.&nbsp;</p>

<p>You can visit the Shopify website and create your store, branded with your logo. The store is hosted on Shopify servers and is based on their software – you just add your domain, inventory and you can start selling. An example of single-tenant software is when you install a copy of an open-source eCommerce system like Magento or WooCommerce on your server.</p>

<h2><br><br><strong>Key parts of multi-tenant eCommerce platforms</strong></h2>

<p>Below there is an explanation of critical parts that your SaaS platform needs to have as well as a description of features of the MVP version.</p>

<h3 class="has-vivid-red-color has-text-color"><strong>Admin Console</strong></h3>

<p>This is where the platform owner manages all created stores and store owner accounts. It’s used by the platform owner and the customer care team. The Admin Console can also be integrated with external services like CRM (user.com) or recurrent payment system (ex. Stripe).</p>

<h3 class="has-vivid-red-color has-text-color"><strong>Store Owner Dashboard</strong></h3>

<p>This is the place where the store owner can manage his eCommerce website.</p>

<p>Functionalities: editing inventory, updating product pricing, managing CMS pages, setting up payment gateway credentials, managing orders, and final customers.</p>

<h3 class="has-vivid-red-color has-text-color"><strong>Final Customer Storefront</strong></h3>

<p>This is the area where the final customer of the eCommerce platform is checking the offer by browsing through products and categories. Therefore, you need to make sure that the storefront of your online store is well-designed and developed, so it ensures the great user experience.&nbsp;</p>

<p>One more thing – a storefront is critical to SEO (it gets indexed by Google robots), so it should be fast and well-optimised.</p>

<strong>Marketing Website</strong></h3>

<p>The main goal of a marketing website is to attract customers, describe the platform, and monetise traffic by converting visitors into paying customers (future store owners).</p>

<p>This is also the place where merchants can sign up, create their store and pay for your product, usually using third party subscription operators like Recurly or Stripe.</p>

<p>The marketing website should be a separate application, which is not based on any eCommerce system, so I will skip this part in my post.&nbsp;</p>

<h2><br><br><strong>Examples of multi-tenant eCommerce platforms</strong></h2>

<h3><strong><a href="https://shopify.com" target="_blank" rel="noreferrer noopener nofollow">Shopify</a></strong></h3>

<figure class="wp-block-image size-large is-resized"><img src="https://pagepro.co/blog/wp-content/uploads/2020/09/shopify-logo.png" alt="Multi-tenant eCommerce platforms: Shopify" class="wp-image-4287" width="150" height="79"/></figure>

<p>Shopify is an all-in-one cloud-based eCommerce platform powering over one million businesses all around the world. It offers many features such as store management, in-store analytics, mobile app, ready-to-use customisable themes, various editing tools, web hosting, SSL certificate, CRM and many more for a monthly fee. </p>

<p>In other words, it offers everything you need to start selling online without the need of hiring web developers or learning how to code. For now, it’s the most popular multi-tenant eCommerce platform.</p>

<p>Is Shopify a good business model? Probably yes. <strong>Shopify stocks grew by 171% last year,</strong> and I believe the technology was also an essential factor of this result.&nbsp;</p>

<figure class="wp-block-image"><img src="https://lh6.googleusercontent.com/jPq_932t2okm5OEAohXeEASaasYXEFULHLJUwG6Lg-Hx1BxJCfD-1uyufA8DOXOM2HP9gbf8wASWeVFRQw0J_lSe-9yfud-ta1vncub3kFKQgCODGHQ2UYu3qtV4zTRprDwOH9MU" alt="Multi-tenant platform: Shopify is a great example of successful one; just check their stocks"/></figure>

<p>Source: <a href="https://www.tradingview.com/chart/?symbol=NYSE%3ASHOP">https://www.tradingview.com/chart/?symbol=NYSE%3ASHOP</a>&nbsp;</p>

<h3><strong><a href="https://selz.com/" target="_blank" rel="noreferrer noopener nofollow">Selz</a></strong></h3>

<figure class="wp-block-image size-large is-resized"><img src="https://pagepro.co/blog/wp-content/uploads/2020/09/selzlogo.png" alt="" class="wp-image-4310" width="107" height="107"/></figure>

<p>Selz is quite similar to Shopify that promotes itself mainly as a go-to platform for selling or renting digital products like eBooks, courses, software, apps, etc. Be aware that’s not all because with Selz you can sell whatever you want however you want. For example, you can start selling on your existing website without creating the actual online store.</p>

<h3><strong><a href="https://www.squarespace.com/" target="_blank" rel="noreferrer noopener nofollow">Squarespace</a></strong></h3>

<figure class="wp-block-image size-large is-resized"><img src="https://pagepro.co/blog/wp-content/uploads/2020/09/squarespace.png" alt="" class="wp-image-4315" width="290" height="58"/></figure>

<p>Squarespace also provides software for building and hosting websites, but there is one primary difference between Squarespace and two platforms mentioned above. With Squarespace, you can also build business websites, personal websites, blogs, and magazines because it’s not only focused on selling products.<br><br></p>

<h2><br><br><strong>Choosing the right tech for multi-tenant eCommerce platform</strong></h2>

<h3 class="has-vivid-red-color has-text-color"><strong>Picking the right eCommerce platform</strong></h3>

<p>For now, there are not many <strong>multi-tenant eCommerce platforms</strong> on the market because it’s not a very often business case. However, it started to change slowly, considering the number of inquiries I received lately.</p>

<p>All of the leading <strong>eCommerce SaaS platforms</strong> that already exist are made to measure.</p>

<p>Of course, when you’re building the MVP, you cannot afford to develop a bespoke platform because of the high cost and a long time to the market.&nbsp;&nbsp;</p>

<p>Our advice is to find a good open-source eCommerce platform, even without the support of multitenancy. Your dev team should be able to add it in a short time.</p>

<h4>The eCommerce platform for your SaaS business should have:</h4>

<ul><li>All eCommerce functionalities you want to offer your final users,<ul><li>Products,</li><li>Categories,</li><li>Stocks management,</li><li>Live search</li><li>Coupon / discount codes</li><li>Flexible Order status management system</li><li>CMS Pages editor</li><li>Sales Analytics and Reports</li><li>Multi-language and multi-currency support with easy to manage translations.</li></ul></li><li>Developed ecosystem, because you want to use the system that is maintained, upgraded with new features and security patches. You also want to be able easily to find developers.</li><li>Have a fresh technology stack that will be easy to maintain and customize in response to the needs of your clients.<ul><li>Solid, developed, and documented API is a must-have.</li><li>Possible PWA Support</li></ul></li><li>Easy to use and customize back office that you’re going to use as a Store Owner Dashboard.</li></ul>

<p>In simple words, it needs to be a future-ready platform following the latest architectural and technology trends.&nbsp;</p>

<h2 class="has-black-color has-text-color"><br><br><strong>Multi-tenant platform based on Saleor</strong></h2>

<figure class="wp-block-image size-large is-resized"><img src="https://pagepro.co/blog/wp-content/uploads/2020/09/saleor-logo.png" alt="Multi-tenant eCommerce platforms: Saleor as a basis" class="wp-image-4293" width="150" height="53"/></figure>

<p>After reviewing all trending open-source platforms, I think that <a href="https://pagepro.co/blog/tag/saleor/" target="_blank" rel="noreferrer noopener">Saleor</a> is the platform with the biggest potential.&nbsp;</p>

<p>I also wanted to find a platform that can work as a headless eCommerce allowing full flexibility of the storefront and potential integrations with other platforms (like PWA or native mobile apps).</p>

<h3 class="has-vivid-red-color has-text-color"><strong>What is Saleor?</strong></h3>

<p><a href="https://saleor.io/" target="_blank" rel="noreferrer noopener nofollow">Saleor</a> is an open-source eCommerce platform developed to provide fast and personalised shopping experiences thanks to being headless. Headless means that the back-end layer is separated from the front-end layer. It gives developers a possibility to build custom storefront regardless of the back-end part responsible for business logic.</p>

<h3 class="has-vivid-red-color has-text-color">Core functionalities of Saleor</h3>

<ul><li>Back office management (i.e. managing access privileges)</li><li>Collecting data like sales history and metrics</li><li>Custom PWA storefront&nbsp;</li><li>Extensive order management</li><li>Internationalisation and localisation</li><li>Various product management options</li></ul>

<h3 class="has-vivid-red-color has-text-color"><strong>How to add multi-tenant support to Saleor?</strong></h3>

<p>I had to find software with multi-tenant support for Saleor, and since it’s based on Django, the chosen solution should be, too.</p>

<p>There are three <strong>different ways to store data for multiple tenants</strong>:</p>

<ul><li>One database per tenant</li><li>One schema per tenant</li><li>The same table(s) for all tenants</li></ul>

<p>You should make such a decision by considering the number of tenants and customisations these tenants need. I decided to go with the “one schema per tenant” way which best suits what I wanted to achieve.</p>

<p><strong>Choosing a package</strong> is another decision you have to make. While doing so, answer these questions:</p>

<ul><li>Does this package support chosen architecture?</li><li>Is it ready to run in a production environment?</li><li>Does it have sufficient documentation?</li></ul>

<p>Answers to these questions made me choose the <a href="https://github.com/django-tenants/django-tenants">django_tenants</a> package.</p>

<p><strong>My choice:</strong></p>

<ul><li>Offers “one schema per tenant” solution</li><li>Has a stable release cycle</li><li>Provides well-written documentation</li></ul>

<h2><br><br><strong>Picking the right storefront technology</strong></h2>

<p>Storefront is the most critical part of your platform and the part that is going to be changed the most frequently. In the future, your customers will require you to provide multiple themes and be able to customise their stores. You need to pick the technology that suits these needs.</p>

<h3 class="has-vivid-red-color has-text-color"><strong>Why do you need a separate storefront?</strong></h3>

<p>It’s important to decouple platform core functionalities from the storefront. Thanks to that, your core tech stack is not limiting your storefront.&nbsp;</p>

<p>You can use any tech stack you want, and in the future, you will be able to change it without rewriting the whole system because the storefront is just communicating with the core using its API.</p>

<h3 class="has-vivid-red-color has-text-color"><strong>What are the top storefront technologies on the market?</strong></h3>

<p>As the storefront is mainly front-end, you need to consider one of the top 3 frameworks/libraries available:&nbsp;</p>

<ul><li><a href="https://pagepro.co/blog/category/react/">React</a></li><li>Angular</li><li>Vue</li></ul>

<p>Pick the stack you’re the most comfortable to use by you and your current or future dev team.</p>

<p>Saleor is using React, the same as Pagepro, so our suggestion is to use it also for your project.</p>

<p><strong>If you use React you will:</strong></p>

<ul><li>gain access to the most developed ecosystem</li><li>be able to recruit easier <a href="https://pagepro.co/react-development.html">React developers</a> than in Vue or Angular</li><li>be able to use Saleor Storefront code or just get insights from its source code to write your bespoke solution</li><li>have a technology that is the most popular right now</li></ul>

<p>Saleor React Storefront is pretty heavy, our clients didn’t require all of its features, and Pagepro decided to write a bespoke <a href="https://pagepro.co/custom-storefront-for-headless-ecommerce.html">React PWA storefront</a> that is communicating with Saleor API.&nbsp;</p>

<p>If your MVP has just basic eCommerce functionality, I’d suggest going the same way.<br><br></p>

<h2><br><br><strong>How to go to market fast</strong>?</h2>

<h3 class="has-vivid-red-color has-text-color"><strong>0. Development Team</strong></h3>

<p>To efficiently build this kind of project <strong>you need a solid team composite of</strong>:</p>

<ul><li><a href="https://pagepro.co/react-development.html">React JS </a><a href="https://pagepro.co/react-development.html" target="_blank" rel="noreferrer noopener">D</a><a href="https://pagepro.co/react-development.html">eveloper</a> – to integrate storefront with headless eCommerce</li><li>UI React Developer – to build the user interface of the storefront</li><li>Python &amp; Django Developer – for Saleor customization and multi-tenancy support</li><li>DevOps – for setting up the test, stage and production environments</li><li>Project Manager</li><li>QA</li></ul>

<h3 class="has-vivid-red-color has-text-color"><strong>I. Start design and initial development work at the same time</strong></h3>

<p>Your goal is to go to market fast, and the easy trick is to have multiple teams working at the same time.&nbsp;</p>

<p>As you already know your platform functionalities and you have the headless eCommerce API, you have everything to start the design phase and everything to begin with the development phase.</p>

<p>Start working on storefront designs and at the same time, plan your development sprints for adding multitenancy support for your eCommerce platform.</p>

<p class="has-black-color has-text-color"><strong>Design Phase: UX &amp; UI Design</strong></p>

<p>Initial Development: basic configuration of eCommerce platform, setting up development environments, setting up servers infrastructure, multitenancy investigation &amp; implementation.</p>

<p class="has-black-color has-text-color"><strong>Timeline</strong></p>

<p>If you have well-described requirements, you should have all designs ready in three weeks.</p>

<p>The same with initial development works (setting up the project, infrastructure, and adding multitenancy to the eCommerce platform).</p>

<h3 class="has-vivid-red-color has-text-color"><strong>II. Prepare the Admin Console, but don’t care about its look</strong></h3>

<p>The Admin console is a tool for you and your future support team; it doesn’t need to look well and work on multiple devices – it just needs to work. You will usually be using your desktop computer to manage it.&nbsp;</p>

<p>The ideal tool for this kind of dashboard is the <a href="https://docs.djangoproject.com/en/3.1/ref/contrib/admin/" target="_blank" rel="noreferrer noopener nofollow">Django Admin</a>.&nbsp;</p>

<p>It is automatically generating admin pages, listings and forms to manage all data you need to edit as a platform owner. As Saleor is based on Django, you can pretty easily install the admin area.&nbsp;</p>

<p class="has-black-color has-text-color"><strong>Timeline</strong></p>

<p>You can start working on the Admin Console almost at the beginning of the project. Works shouldn't take more than two weeks.&nbsp;</p>

<h3 class="has-vivid-red-color has-text-color"><strong>III. Implement the storefront using headless eCommerce API</strong></h3>

<p>As you already have your eCommerce platform, based on Saleor you can now use it’s GraphQL API to feed your storefront with the data.&nbsp;</p>

<p>You can use Saleor storefront files or write it from scratch.&nbsp;</p>

<p>The hardest thing to do in the checkout if you need to use a custom payment gate that is not yet supported by Saleor.</p>

<p class="has-black-color has-text-color"><strong>Timeline</strong></p>

<p>The storefront part is the most time-consuming. It’s the application that your final customer sees. It needs to work correctly. You need around six weeks to work on it. Alternatively, you can use some UI kit that might reduce the implementation time by half. You can also use the default Saleor storefront, but the customisation can also take around one month.&nbsp;</p>

<h3 class="has-vivid-red-color has-text-color"><strong>IV. Customise Store Owner Dashboard</strong></h3>

<p>Preparing a bespoke Store Owner Dashboard is something that you can do later. For the MVP just grab the initial admin area of the eCommerce platform and customise it a bit, removing options that you don’t want to offer your clients.</p>

<p class="has-black-color has-text-color"><strong>Timeline</strong></p>

<p>Give it two weeks.</p>

<h3 class="has-vivid-red-color has-text-color"><strong>V. Release multi-tenant eCommerce platform</strong></h3>

<p>MVP won’t require an expensive hosting – you can pick either Amazon or Azure, but Saleor authors are suggesting to use <a href="https://github.com/mirumee/saleor/issues/2122" target="_blank" rel="noreferrer noopener nofollow">AWS</a>. I think it’s the right approach.&nbsp;</p>

<p>After going live, you need to attract a lot of customers. I hope you had some early adopters signed before starting the development. This is where your growth hacking activities need to escalate.</p>

<h3 class="has-vivid-red-color has-text-color">Timeline</h3>

<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2020/09/timeline-for-multitenant-platform-1024x675.jpg" alt="" class="wp-image-4285"/></figure>

<h2><br><br><strong>How to do that most efficiently?</strong></h2>

<p>As you can notice in this blog post, nowadays development is pretty fast because you have a lot of great open-source tools to use.&nbsp;</p>

<p>The most important factor of development is to know how to pick the right technologies and how to use them.&nbsp;</p>

<p>If you want to do it fast, stick to this guide or find a development agency that already did a similar project; an agency that is aware of the most common risks and knows how to avoid or limit them.</p>