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
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- createMembership is not sending email wi...
Parameters should be correct. Account and Membership are successfully created. I have a next.js project with localhost origin allowed. I checked spam etc. i...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...