I think i can help you. You want to build a multi-tenant SaaS app and as @nick
Karnik said up there, it need to run first on you local machine without any stuff from the cloud provider.
The fact is that you are intending to have the same database model for multiples clients there is usually 3 ways to build a SaaS application at the DB level
Data isolations levels
Low data isolation : Here you store all clients data in the same databse within same tables and use a kind of client's ID (or UUID) to filter queries. SAME DB AND TABLES
Mid data isolation : Here you store clients data in the same database but in different schemas (NOTE : schemas can be seen like a kind of small database within the ) SAME DB, BUT DIFFERENT TABLES
Hight data isolation : In this cas you totally separate client's data by storing them in wholw differents databases( whole different SGBD instance) DIFFERENT DB
How does it work
To choose which tenant's data you should use to display results of a query you need to use a tenant detection strategy there is a lot out there, but the most used is the one based on request's url. Let assume that you have urls as follow client1.yoursite.com client2.yoursite.com the strategy based on request's url assume that you will choose you tenant from the request domain name so for the first url you will know which client's data are asked and depending on the isolation level you have implemented you will retrieve the right data. Another tenant detection strategy is based on HTTP request header.
At this level depending on you business logic you can manage static/upload file from a way to another.
I had already implemented this but in python with Django so i don't know which technologies you are using but the principle remain the same,
for Django there is some package as :
django-tenants : django-tenants.readthedocs.io/en/l...
for laravel (php) Laravel-tenancy : larvel-tenancy.com
for symfony (PHP) swp/multi-tenancy-bundle , vivait/tenant-bundle - Packagist
for Ruby-on-Rail : github.com/influitive/apartment Apartment
Some links :
In general those libs use to handle all the stuff i tried to explain up there.
Hey, watch out who you're tagging. XD
Yeah sorry !!!
You really made my day, Thanks for your response and sorry for my late reply.
Actually, I was waiting for confirmation just like that saying that I must handle everything on my own locally before going to the cloud.
I really appreciate your help thanks, dude ❤️
you are welcome !!! ;)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.