Should I include user model in database schema? And how to handle users registering their business?
Hi, how should I handle database schema while using Kinde? Should I try for creating user model in my database schema e.g.
username
email
registryDate
gotWarnings
? If we answer this question and let's say I shouldn't create a user model since I use Kinde, how should I handle the situation users register their restaurants in my app? I'm not trying to ask something unrelated but how that relation works with the Kinde user and restaurant if I create the restaurant model. I use Convex as my Backend and very new to both Kinde and Convex.9 Replies
To make your work easier, you can just tell me if this is correct answer or the LLM has hallucinated:
Hi Zor. Our Kinde AI can really only answer questions about Kinde functionality and not about how you need to set things up - so the above does not seem very useful to me either.
I was thinking that you could explore organizations in Kinde to separate users from different restaurants. https://kinde.com/docs/build/multi-tenancy-using-organizations/ Alternatively, you might create a user property called restaurant so you can identify the restaurant associated with each user. Properties let you store any data you need about users. However, you need to build the way to collect that information. https://kinde.com/docs/properties/ Let us know if this information helps and feel free to ask more if you need to. Claire
I was thinking that you could explore organizations in Kinde to separate users from different restaurants. https://kinde.com/docs/build/multi-tenancy-using-organizations/ Alternatively, you might create a user property called restaurant so you can identify the restaurant associated with each user. Properties let you store any data you need about users. However, you need to build the way to collect that information. https://kinde.com/docs/properties/ Let us know if this information helps and feel free to ask more if you need to. Claire
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
About properties - Properties - Help center
Our developer tools provide everything you need to get started with Kinde.
So I should not create a user model in the database schema right?
E.g.
- User and users restaurants will not have a model but other objects of the restaurants e.g. menu, inventory... will have an model?
How should I approach this schema with Kinde? I use Convex as Backend and database and I am confused
Let's say it is an Inventory management system app for restaurants
How am I going to keep the relation between models since Kinde's models are not registered in my database schema?
Hi Zor, I'm going to get one of our engineers to continue this conversation with you. We will get back to you.
Okay thanks
you could have the kinde users exists on kinde and also in your DB, you will just need to keep them up to date with each other
You could have all your user data handled in your DB, and then have a column in your users table
kinde_id
That makes much sense, thank you so much.
My questions were all that I think