What user info do I store in my database???

I'm developing an app using both Prisma and Clerk. With the Clerk API, I can easily get all of the data stored there (like email, username, etc.) using just the user's id. I want to create a Person model in my schema, but I'm super new to data modeling and have no idea what info should go in this object. I know I want to add info that's not part of the Clerk user object, like the users non-unique display name that will be shown alongside their unique username, as well as what groups this user is a part of. I don't know if I should include any of the things that are a part of the Clerk User object in my Person model, or if I should strictly be getting those via the Clerk API. I'm also still trying to work out how the relationship between people and groups should work, but that's a separate issue. 😅
2 Replies
willm
willm•2y ago
Haven't used clerk but you're probably safer keeping the clerk stuff in clerk and using their API. If, in the future, when the flow of data in your application is more clear, you could always write a script to put all that clerk stuff into the db
albatroz
albatroz•2y ago
use clerk's webhook to call a your api, which will add all the details into your db.
Want results from more Discord servers?
Add your server