A B2B SaaS template for Anvil?

What I’m trying to do:

A multi-tenant SaaS app.

So, more like (business-oriented) Google Workspace (the new name for Google Apps, I think) than (consumer-oriented) Gmail.

I want to start out of the gate with not just authentication, but also customers/organizations/businesses, as Salesforce, or Google Apps, or Basecamp, or any other B2B app/service would have a customer account (e.g. IBM), and then 500 users (e.g. peter@ibm.com, joe@ibm.com, etc.) tied to that account (so they would only have access to IBM resources, not Microsoft resources).

I think tools like Bubble have various ‘boilerplate/addons/plugins’ you can purchase and integrate into your app – maybe someone has built this type of functionality for Anvil already and wants to re-sell it?

Other tools/frameworks use the term ‘Teams’ to describe this functionality, but that’s confusing to me. I want customers, aka customer accounts, and each customer account should be associated with 1 or more user accounts, each with their own email/login, the default admin use can invite new users, remove users, etc.

What I’ve tried and what’s not working:

Read the docs, looked at some videos, etc.

Thanks!

1 Like

This might be a good place to start: Database Table Views. With this feature, you can keep each Customer’s data logically distinct.

thanks, seems interesting-ish, and maybe a bit weird. maybe risky, because…it looks like a whole new security model.

i feel like…the data permission structure should only live on the server. and the separation between client and server is kind of false and confusing.

in an ideal world, and/or even a non-ideal world, should a developer or end user or admin have to be concerned about the distinction between client and server?

or is that just a complexity that is forced upon us by the somewhat-stateless nature of HTTP – except when it’s not, as with most web apps?

it seems that tools like Anvil could, if they wanted, just make things much simpler.

that’s a diff discussion, tho, and i’m sure i’m missing something in this relentless push for simplicity.

one of the things i like about Anvil is it’s the closest thing to VB6 that i’ve seen, which is my ideal – VB6-for-the-web.

It does. By default, every db table is inaccessible to Client code. That’s enforced at the server. Views let you tighten things on the server-side even further, if you choose.

I really started programming on PCs, long before most of the above distinctions were prevalent there. So I very much miss the simplicity that comes from there being exactly one user, who is all things: developer, end-user, and administrator.

If there’s more than one user, then there are very useful distinctions between developer, end-user, and administrator. There may also need to be a distinction between what is shared by all the users, and what is individual to each user. Scopes of sharing must be defined, and how that sharing is to be accomplished will depend on the facilities available, and how well they match the intended workflow.

Anvil does a terrific job of flattening the technology landscape, so that you don’t have to deal with ten programming/data languages and six data representations. But it can’t entirely hide the underlying architecture, e.g., the fact that the browser does not share memory and CPU with with database or with other users.

It is this lack of sharing, more than anything else, that leads to the distinction between “client” and “server”.

On the flip side, it’s also the foundation of many security features. If all your security-related code runs in the browser, it’s not secure at all. Hence the need to earmark code for running outside the browser, in a secure context.

This is, alas, where the potential for simplicity runs into real-world issues, like your hierarchy of scopes; physical location(s); security; maintainability; and performance.

1 Like