Hi everyone! I'm building an application that needs a multi-level hierarchy: Organizations → Teams → Users.
I see that Appwrite provides a Teams service, but I'm unclear on the recommended approach for handling organizations that contain multiple teams:
Option 1: Use Teams as the organization layer, then use labels/attributes within a team to represent actual sub-teams?
- Complexity: Simplest approach, leverages built-in Teams service, but may require custom logic to enforce team-within-team permissions
Option 2: Create a custom Organizations collection that references team IDs, essentially linking multiple teams to a parent organization entity?
- Complexity: Moderate - requires additional database queries and manual relationship management between organizations and teams
Option 3: Flatten the structure entirely and use a single team per organization with roles/labels to differentiate access levels?
- Complexity: Simplest data model, but may become difficult to manage as the number of users and permission requirements grow
My use case: A parent organization needs multiple teams beneath it, where users can belong to multiple teams within the same organization, and each team has its own permissions and data access.
What's the recommended Appwrite pattern for this type of organizational structure? Any examples or documentation I should reference?
Thanks in advance!
Recommended threads
- Fails to add Custom domain and subdomain...
Case 1 : I've a domain ("remiel.work") which i want to host my portfolio thru appwrite sites. when i try to connect my domain (which i bought from spaceship, ma...
- Account API: Update status. Feature on t...
Is there in the cloud.appwrite.io a button/flag to update a user status. I know there is an API for this, but i like to change de value inside de cloud console....
- Next16 server side and client side
I want to use AppWrite in a Next.16 project. Following the documentation, I implemented server-side authentication using Node-AppWrite. Is it possible to make a...