iammorganparry
TTCTheo's Typesafe Cult
•Created by asdfasdf on 10/20/2023 in #questions
Upgrade or Rewrite?
Depends on the scale, impact to business etc. one of the biggest downsides to rewrites is missed or removed (albeit not deliberately) business logic that can have a big impact. So as the post above says, it was almost certainly be a bad idea if it’s non trivial. The best approach is incremental
5 replies
TTCTheo's Typesafe Cult
•Created by Phassakorn Saetong on 10/19/2023 in #questions
Replacing NextAuth with Clerk in T3
Hey man, ive used clerk in two t3 apps now and the setup is almost a like-for-like swap. Essentially replacing the NextAuth calls with clerk equivalents.
heres a blog post from the clerk team: https://clerk.com/blog/clerk-t3-turbo
4 replies
TTCTheo's Typesafe Cult
•Created by max14 on 10/18/2023 in #questions
Clerk Auth with Drizzle relations
Hey man, if you are using clerk for your auth youll need to sync events from clerk to your DB.. this can be achieved via a webhook: https://clerk.com/docs/integrations/webhooks
I believe clerk usernames are unique so this should be trivial.. however if they are not.. it would obviously introduce some complexity as you would need to handle non unique changes.
to create the relationship between a recipe and a user via username we can utilise foreign keys.. here is a great article that could help: https://planetscale.com/blog/working-with-related-data-using-drizzle-and-planetscale
6 replies