---
title: 'Build SaaS Like Shopify 🔥 | Laravel 12 Multi-Tenancy + Multi-DB Explained'
source: 'https://youtube.com/watch?v=zH-RoMFYpr0'
video_id: 'zH-RoMFYpr0'
date: 2026-06-20
duration_sec: 0
---

# Build SaaS Like Shopify 🔥 | Laravel 12 Multi-Tenancy + Multi-DB Explained

> Source: [Build SaaS Like Shopify 🔥 | Laravel 12 Multi-Tenancy + Multi-DB Explained](https://youtube.com/watch?v=zH-RoMFYpr0)

## Summary

This video demonstrates a scalable SaaS platform built with Laravel and React, featuring a multi-tenancy architecture with isolated databases for each tenant. The creator shows how users can register, create stores, and manage categories and products, with each store having its own dedicated database.

### Key Points

- **Introduction to the SaaS Platform** [0:04] — The video introduces a scalable SaaS platform built with Laravel and React, using multi-tenancy with multi-database architecture.
- **Multi-Tenancy Architecture Explained** [0:16] — The system uses multi-tenancy with multi-database architecture, meaning each new store gets a completely isolated database.
- **User Registration Demo** [0:32] — The creator registers a new user named Afnan with an email and password to demonstrate the platform.
- **Dashboard Overview** [0:53] — After account creation, the dashboard shows total stores, total categories, and total products for the user.
- **Database Structure** [1:14] — The central database contains a users table with roles (user and admin), a tenants table for store IDs and names, and a domains table for subdomains.
- **Creating a New Store** [2:32] — The creator creates a new store named 'Pet Shop' with a subdomain and description, demonstrating the store creation process.
- **Store Creation Confirmation** [3:10] — The store is created successfully, showing the store name, subdomain, and description. The system also creates a separate database for the store.
- **Separate Database Creation** [4:09] — A new database named 'tenant.petshop' is automatically created for the Pet Shop store, containing its own categories and products tables.
- **Adding Categories and Products** [4:52] — The creator adds categories (electronics, clothing) and a product (headphones) to the Pet Shop store, demonstrating data isolation.
- **Admin Side Overview** [7:43] — The admin can see all stores, store owners, products, and categories across all tenants.
- **Second User Registration** [8:49] — A new user 'unity' registers and creates a store named 'Gym' for health products, which also gets its own separate database.
- **Second Store Database Isolation** [9:48] — The Gym store automatically gets its own separate database with its own categories and products tables, confirming the multi-database architecture.

### Conclusion

The video successfully demonstrates a multi-tenancy SaaS platform with isolated databases for each store, ensuring data separation and scalability. The creator invites viewers to request a full tutorial in the comments.

## Transcript

[music]
Hello everyone, welcome back to my
channel. Today I want to demonstrate a
scalable SAS software as a service
platform that I have built using Laravel
and React. So my solution uses a
multi-tenency with multi- database
architecture. This means every time a
user create a new store on this
platform, the system automatically spin
up a completely isolated database just
for them. So let's start. So first of
all, I just simple uh
register a new user and I just simple
name this user as my name Afnan. And uh
in the email I just simple pass here my
email. And in the password I just simple
pass this
password. Okay just simple create
account.
And now here you can see a user account
is created. And now on the dashboard it
show and reflect here total store total
categories total products. So as I told
you earlier uh every user can create its
own store and its own categories and its
own product. Okay. So I just simple
simple uh show you the database overview
as well. And now here you can see this
is my database that is multi-reency.
Okay. And within this database I have a
users table and I just simple refresh
it. And here you can see this is the
user that we created and in the user I
have a role. So in the role I have a
simple user role and admin role. So
basically admin see all the users and
all the store that are created and user
just simply see its own store its own
store categories and products. Okay. So
this is the users table and I just
simple open the tenants table and in the
tenants table whenever user create a new
store it basically give uh give this
store a id and uh pass here the name
slug store name here in the ID place.
Okay. and uh in the store uh it
automatically add the store details,
user ID, name, description, tenant ID
and all the things. Okay. So this is it.
This is the basic structure. And also I
have a domain domains table as well. And
uh in this whenever a user create a new
store, it automatically add uh here the
domain name that user put and uh tenant
ID as well here. So these are the table
in my central database multi-tenency
database. Okay. So now uh I just simple
show you
uh we just simple come here and now I
just simple create a new store. And now
this page is showing very look good and
amazing. And now I on this page I just
simple create a new store. And I just
simple name this as pet shop. And in the
subdomain I just simple pass this name
here. And in the description
I just simple pass here.
And in the description I just simple
pass here all things related to pets
like this. Okay. So you can add any
other here. So I just simple create a
store.
And now here you can see uh the store is
created and it pass here the store name
pet shop and subdomain as well and
description as well. So I can uh just
simple click on this manage and uh and
now here you can see my store is created
and now uh I just simple show you a uh a
thing that is most important and now I
just simple come to database and uh just
go here in the tenants and I'll just
simple refresh it and now here you can
see it pass here the uh tenant name pet
shop and in the store as well it pass
the ID pet shop description tenant ID as
well and domain in the domain it pass
here petshop.lohost local host. So you
can change here for uh we can change
here uh the domain name as well. And now
in the domains it auto it also add here
the data petshop.lohost and tenet ID. So
that's great amazing and the most
important thing here it it create the
separate database for this uh store. And
now I just simple show you here uh I
just simple uh refresh it. And now here
I just simple search here pet shop. And
now here you can see tenant.patshop
and it create a separate database for
this specific store. And within this I
have a categories and products. Okay.
And now I just simple
and within this I have a categories
table and products table. Okay. So this
is it. This is the thing like uh each
store has its own uh database and uh
now let's manage this store. I will add
a category and a product uh in it. Okay.
So I just simple come to categories and
now this is uh the categories page and
I'll just simple add here a category
like uh
electronics.
Okay. And now here in the description
uh it uh related to
electric
products. Okay. And now I just simple
create this category. And now here you
can see category is created. I can add
it and delete it. But uh before this I
just simple come here and go to
categories. And now here as you can see
I don't have a categories table. when
I'll categories data when I'll just
simple refresh it add this category data
that we added in this table so this is
it this is uh this store thing that is
standard pet shop and that's why it add
this store categories in its own
database okay so this is it and now I
can also edit it as well
I just will pass here this and just
click on save changes and now it's
updated as well and in the database it
also updated. So that's it. And now I
just go to products and in the products
when I just simple click on add product
and now in the categories show me this.
So basically it is completely isolated
and each store has its own data and now
that's why it is showing here its own
store categories. Okay. And now I just
simple add here another category
like uh
clothing
and uh it's about clothes okay just
create and now go to products and uh
here in the categories table you also
add it and now I just simple add product
here and uh I just pass here headphones
and select the category and I just
select sect this category and pass here
all things related to electrics. Okay.
And I can pass here this uh price as
well and stroke as well. Just click on
add product. And now you can see my
product is added and it pass here this
category as well. And in the products
table I show you this is the product
that is added. So that's it. That's
amazing. Okay. So this is basically the
multi-ancy with multi- database
architecture that I make. Each user can
create its own store and so now here you
can see each store has its own
categories, products and create uh store
thing as well. Okay. So now uh I just
simple show you the overview from the
admin side as well. And now I just
simple login with admin. H and I already
have admin user. I just simple show you
from here from the multi-tenency. Here
you can see I have a admin user and its
role is admin. And now I just simple
login with it.
And now here you can see admin can see
all the store store owner its products
and its categories. Okay. So we can do
in it many things many things. uh as
well like separate domains. Uh already
we done it but we can add in it more
feature as well like each each user has
its own store multiple products multiple
add toart features checkout features and
uh payment gateways payment plan as
well. So this is the basic concept idea
of multi- uh multi- uh tensy with multi
database and uh I just simple show you
one uh more thing. And I just simple log
out here. And now I just simple uh
register with a new user. And I just
simple name this as unity and pass here
unity at the rategmail.com and password
and
password. Okay. And now here you can see
this user is created. And now I just
simple uh create a store. And here I
just name this as Jim. gym and it's uh
related
to
health products. Okay, just click on
create store. And now here you can see
this uh store is created successfully.
And now from the database, I just simple
show you this is the multi-nc database
that is the central database. And I'll
just simple go to tenants. And here you
can see I have this new store as well
that is gym. And uh I just simple
refresh my databases. And now just
simple search here gym. And now here you
can see it automatically create a new
separate database for gym as well. And
it's have its own categories products.
Okay. And on the admin side I just
simple show you. I just simple reloaded.
And now here you can see I have an other
store that is gym and its user is uh
different and its products and
categories are zero because we did not
add it yet. So this is it. This is the
basic concept idea of multi-tenency with
multi database. We can uh use this
concept this multi-tensy uh with multi
database concept in many other ways as
well. But this is the basic video basic
idea of how we can use this multiency
with multi- database architecture
uh in this uh store creation or store
like e-commerce project. You can use
this in many other project as well. So
this is it. This is the basic concept
idea and I hope you like this video and
if you want me to
to make complete video on this uh
project then comment below and uh I and
see you in the next video. Thank you for
watching.
