K
Kinde12mo ago
Danny Zhao

How to design proper structure for organizations, projects, and users in kinde

I want to design an app that allows users within multiple organizations, and each user should join project which is managed by the organization to interact with services. In addition, user in one organization can invite external user of another organization to the same project. The simplified diagram is shown as the picture. How to setup those architecture in Kinde?
No description
3 Replies
Oli - Kinde
Oli - Kinde12mo ago
Hi @Danny Zhao, Thanks for reaching out and providing extensive information on how you want to architecte your app. Kinde provides a feature called "Organizations" that can be used to manage multiple user groups or members separately. Here's how you can set up your architecture in Kinde: 1. Create Organizations: You can create organizations in Kinde to represent different user groups. 2. User Management: Users can belong to multiple organizations in Kinde. You can control who can access the organization and set roles and permissions for each user in the organization. You can add users to an organization manually, import them in bulk, or provide a sign-up link from your product. If a user belongs to multiple organizations, they will be prompted to select the organization they want to access when they sign in. 3. Invite user from from another organization to the current organization: You can allow users to seamlessly invite another existing user to the same organization through our Kinde Management API. Here’s how you can achieve this: 1. Assign the new user to the organization using the Add Organization Users endpoint (https://kinde.com/api/docs/#add-organization-users) 2. Send an email invite link to the user, and direct them to login to the organization-specific sign-in screen (https://kinde.com/docs/customize/apply-branding-for-an-organization/#direct-customers-to-the-organization-sign-in-screen). You'll need to handle the email sending part in your own application or server. I would suggest having a read of the following documents: 1. https://kinde.com/docs/build/orgs-for-developers/ 2. https://kinde.com/docs/user-management/manage-users-across-organizations/ 3. https://kinde.com/docs/build/multi-tenancy-using-organizations/ Question for you @Danny Zhao, Is there always 1 project per organization, or can there be multiple projects per organization?
Kinde Docs
Kinde organizations for developers - Build on Kinde - Help center
Our developer tools provide everything you need to get started with Kinde.
Kinde Docs
Manage users across organizations - User management - Help center
Our developer tools provide everything you need to get started with Kinde.
Kinde Docs
Multi-tenancy using organizations - Build on Kinde - Help center
Our developer tools provide everything you need to get started with Kinde.
Kinde Docs
Apply branding for an organization - Customize - Help center
Our developer tools provide everything you need to get started with Kinde.
Danny Zhao
Danny ZhaoOP12mo ago
An organization can have multiple projects, just like GitHub organization can have multiple repositories.
Oli - Kinde
Oli - Kinde12mo ago
Hi @Danny Zhao, Whilst our current architecture only supports 2 layers of tenant hierarchies (organizations -> users ), it is on our roadmap to support any number of tenant hierarchal layers (N-layers). You can be notified when this feature is live by subscribing here. In the meantime, you could use Kinde in the following way to support your use-case: Let's say you have 3 organizations: 1. Apple Org 2. Banana Org 3. Carrot Org And you have 6 projects: 1. In Apple Org you have the following projects: Apple Smoothie , Apple Honey, Apple Cake 2. In Banana Org you have the following projects: Banana Smoothie, Banana Chocolate 3. In Carrot Org, you just have hte following projects: Carrot Cake In this case you would have 9 Kinde organizations: 1. Apple Org 2. Banana Org 3. Carrot Org 4. Apple Smoothie 5. Apple Honey 6. Apple Cake 7. Banana Smoothie 8. Banana Chocolate 9. Carrot Cake If a user is part of the Apple Org and Carrot Org, and part of the following projects: Apple Honey, Apple Cake, Carrot Cake. Then the user would be assigned to the following Kinde Organizations: Apple Org, Carrot Org, Apple Honey, Apple Cake, Carrot Cake. On your end you could map the hierarchal relationships between projects and organizations (e.g. Apple Org is the parent of the following: Apple Smoothie , Apple Honey, Apple Cake). I hope this makes sense. Please let me know if you have any other questions.
Want results from more Discord servers?
Add your server