W
Wasp10mo ago
ldeavila

Prisma schema for a github-like multi-tenant saas

Github's individual/org/team UI inspired how I want my apps experience to be like. I'm allowing both individuals and organizations to create accounts. I created this to be flexible since I'm not fully sure how I want to handle everything just yet. Hope someone finds it helpful. Features/Capabilities * Individual user accounts * Organization accounts * Users can belong to zero or more organizations * Team support * Organizations can have zero or more teams * Role-based access control that is flexible * Different roles for users in different organizations https://gist.github.com/ldeavila/dbd866d793e7ecda8a43026bda41ae66
6 Replies
martinsos
martinsos10mo ago
Very cool @Ideavila, thanks for sharing! How has this been working for you so far?
ytjtr6urt7j
ytjtr6urt7j10mo ago
i really like how you used the diagram to represent the relations between models @ldeavila
KC
KC9mo ago
@ldeavila Were you able to set this up with Wasp's auth? I am looking to build something similar for our app and we would have users who can be part of a school at this point but they could be part of another school in future. This could be teachers/students/parents.
martinsos
martinsos9mo ago
@KC shouldn't be any reason why this wouldn't work with Wasp's auth! What have you tried so far, anything that felt like it coudl be an issue?
KC
KC9mo ago
Thank you @martinsos! I am still building the Landing Page but this is next on my list, so wanted to see if this works. I'll keep y'all posted if I am successful in setting this up or run into any issues.
martinsos
martinsos9mo ago
Great, do let us know how it goes! Happy to help.
Want results from more Discord servers?
Add your server