someone to review my initial directory api, data, services structure
Unanswered
Swedish White Elkhound posted this in #help-forum
Swedish White ElkhoundOP
Hi, looking for someone to quicky check my github structure of my project interacting with supabase so i know i have a solid foundation to start building before it build too much and realize if made a mess with my directory structure
8 Replies
@Swedish White Elkhound Hi, looking for someone to quicky check my github structure of my project interacting with supabase so i know i have a solid foundation to start building before it build too much and realize if made a mess with my directory structure
you never sent the github link here so i don't know how clean it is, but
you will make a mess. especially beginners, but even people familiar with nextjs will still keep making a mess just because the app is an ever changing entity and you can't predict what it will look like 1 year down the road.
the important thing to remember is that despite that, fixing that mess won't be too difficult. i mean, you just need to move files around, adjust import paths. what else?
just don't be scared from making mistakes; making mistakes and fixing them is also how you gain experience too.
you will make a mess. especially beginners, but even people familiar with nextjs will still keep making a mess just because the app is an ever changing entity and you can't predict what it will look like 1 year down the road.
the important thing to remember is that despite that, fixing that mess won't be too difficult. i mean, you just need to move files around, adjust import paths. what else?
just don't be scared from making mistakes; making mistakes and fixing them is also how you gain experience too.
Swedish White ElkhoundOP
Thanks, I’ve been stuck for a week trying to correctly fetch user profile data from supabase after successful Google OAuth login. Nightmare
So lost between cookie sessions and supabase instances server side and client side
If I post a GitHub link would you be able point out some mistakes?
@Swedish White Elkhound Thanks, I’ve been stuck for a week trying to correctly fetch user profile data from supabase after successful Google OAuth login. Nightmare
you need to make a trigger function, what i do is make trigger function from auth.users to public.users for example, and on trigger it fetches email and content from user_meta_data object
this is an amazing tutorial, tho older but almost the same as today except that there is createClient for client and server files instead of createServerClient() thingy
Swedish White ElkhoundOP
Nice thanks. Ya I created a trigger function and kept getting a recursion error when fetching from my profile route in my api folder