Scenario: I have app.mysaas.com and I have multiple customers, for example, Google and Apple. email@example.com can be a team member in Google and in Apple.
What is the best way to design multiple organizations in Django? A similar feature is in, for example, Notion. How this should be designed with best practices on the database and API level? How to implement switching between organizations and storing data that belongs to a specific organization?
I want a single database, no subdomains.
My initial reaction to this would be to leverage Django Groups. Each customer could be represented by a Group. Data objects can also contain a Group reference to identify “ownership” of that data. Each session could also be associated with a Group to identify which Group that user is currently looking at.