[Help] Multi-tenant implementation with Xano + Weweb

Hey guys!

I am developing a SaaS system and would like help to assemble the multi-tenant structure using Weweb and Xano. The logic that I am trying to assemble would be something like this:

  • My main client (Tenant) creates an account and is the owner of the company.
  • This customer can add employees (eg manager, financial, intern, etc.).
  • Each employee can have different, roller -controlled permissions.
  • The company owner can also register customers (end customers) and share specific pages with these customers

In summary:

Tenant → Who bought the plan

Users →

The customer himself (buyer)

Employees invited by the customer, with different permissions
Clients → Company’s end customers

Let’s imagine that I will have 500 companies using the system.
Each company would have 3 to 5 employees and would add about 20 to 30 customers throughout the year.

The main point is:
each company (Tenant) must see, create and relate data only within its own context,
without interference or visibility of data from other companies.

Is this structure possible to be made in Weweb + Xano?
If so, would anyone have an example, reference or could you guide me in logic?

Thank you so much any help or direction :folded_hands:

Hey Lucas :waving_hand:

Yes, you can set that up with WeWeb + Xano. The key is to have one user table, a separate tenant/company table, and link them with roles or permissions. Each record in your app should be tied to a tenant so users only see their own company’s data.

For the WeWeb side, we have a doc on roles & permissions that shows how to fetch a user’s role from Xano and use it to gate pages or elements. That’s a good starting point to map your “owner / employee / customer” logic.

1 Like

Off the top of my :brain: on my lovely Saturday morning with a cup of matcha :hot_beverage:︎:

  1. Define the backend model and invest in a monthly GPT plan.
  2. Define each personas and their experiences.
  3. Focus on building the larger client persona first and do this in Desktop mode.
  4. Don’t overthink or over-engineer! :backhand_index_pointing_left:t3: I’m guilty of this many times.

Other random synaptic misfires:

  • You describe a typical tenancy pattern! If you ask one of the GPTs you’ll get a lovely and deep response. Be specific with your prompt about using Xano and the GPT will give you some head starts.
  • The front end isn’t normally a consideration except for Agustin’s point about roles/perms.
  • Does the employee personas differ than the client? Do they have a mobile first mentality? If so, you may want to segregate this into a different project. You can still point to the same backend.
  • Another item that comes to mind is collecting payment! Stripe has really nice guides, but you can worry about that after you put a roof, walls, and flooring on your house.

:crossed_fingers:t3: Good luck, and enjoy the learning experience! :open_book: