Large App or Multiple Apps with Dependencies

I remember reading that it was possible to build an entire suite of apps, and shuttle the user from one to another, as long as the apps shared a Users table. Depending on how your app’s functionality is grouped together, this might be one way to divide and conquer.

Edit: For example, if one sub-app requires certain privileges, and an insufficiently-privileged user tries to switch to that sub-app (by hook or by crook), then that sub-app’s server-side code could simply log them out, denying them access.

Edit 2: This might also lead to moving some database tables off into corresponding sub-apps. Note: If an app is supposed to enforce foreign key constraints, on any tables, Anvil won’t do it for you. Your code will have to do it. And that code will need access to every affected table.

For example, when an app deletes a purchase order (e.g., because it has been cancelled), it should probably delete any detail records (e.g., in a linked table), too.

1 Like