-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add tenant example #428
add tenant example #428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Just one thing.
@@ -56,6 +56,9 @@ This page links to examples of how to implement some things with the Epic Stack. | |||
- [Epic Stack + Fathom Analytics](https://github.com/xstevenyung/epic-stack-with-fathom-analytics) | |||
by [@xstevenyung](https://github.com/xstevenyung): An example of the Epic Stack | |||
with Fanthom Analytics via CDN | |||
- [Epic Stack + Tenant Users](https://github.com/offseat/epic-stack-tenant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh, public now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unfortunately, it's hard to tell what changes are required for this example. The instructions say you should make a commit as soon as you initialize the project and then after you make your changes so people can see the difference between a standard epic stack project and one with the changes you make.
Could you do that please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, yeah I'll update that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Kent,
I've updated it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'm concerned the implementation is overly complicated. What do you think about doing this instead:
- create a tenant model with an id and name
- give all models a
tenantId
and relate them to the tenant (one-to-many relationship) - adjust queries to scope them to a specific
tenantId
(may require updating the routes to include thetenantId
in the params)
I think that would be simpler than having a User
, TenantUser
, WorkspaceUser
and Member
all of which kinda feel like the same abstract concept to me. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah they do seem to be sort of the same at the moment, though I chose to add extraction so when I want to query a WorkspaceUser I can simply do prisma.workspaceuser
, a TenantUser is usually the admin of the tenant and manages subscription/payment, Members are the Individuals that belong to the Tenant.
It's a complex system that does need thorough documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds good. Thanks!
Test Plan
Checklist
Screenshots