Multiple clients - access and data question

Hello, I am wondering if others have setup this up… Looking to create an app to serve multiple clients. How do you keep the data separate - do you use roll base access in a singular table or multiple tables per client? If the same tables how do handle differnt needs for different clients?

@Gregorys77 -

I have created several multi-tenant applications. I have always created an Associated Organizations table and everything is based off of this. Each user is associated with an org or several orgs. Then as you build out the app, the associated orgs are the only options to select from in drop down options and with some API/Javascript, additional functionality is operationalized so that all data is segregated.

Then, if you have different roles (account admin, user, etc.) you can create different layouts that have the respective CRUD privileges. If you are intending to allow clients to modify or have custom pages with different fields, the multi-tenant approach becomes very complex, very quickly.

I recommend to always start with the most privileged role first for the first layout. Then build “down” to the least privileged role. This cuts down on a lot of work when copying pages and merely editing options.

Hope this helps,
Adam