multiple questions for a newer T3 / Webdev

Hey all, I'm a long time c++/python/etc dev who made the mistake to agree to assist a family member to help try to start a business for him. down the road they want a pretty robust site. I have some T3/nextauth/general questions if any of the experts out there could share some light as I know you all are experts in the field: 1) When working on a codebase like T3, what is the criteria for you all to do front end vs back end rendering for your site? 2) I went through the first part of Theos tutorial, and saw him promoting clerk / vercel / planetscape. I had never heard of any of these before. I really like what you get from vercel, but wanted to see your thoughts on clerk vs just using nextauth and developing your own. While I get that clerk probably comes with a lot more security from the get-go, nextauth and jwt seem to provide solid foundations to dev your own auth and you dont have the cost associated with cerk. For planetscale, I see the benefits for quick dev, but are you all using it in production? My plan is to move to aws and was going to do mysql off of their rds solution. thoughts on that? benefit to using planetscale? again, just thinking cost. 3) i'm a big fan of keeping projects organized, and i'm reading up on routing and colocation (https://nextjs.org/docs/app/building-your-application/routing/colocation), anything you experienced people can add to this? any do's and do-nots? I want to make sure I stay as organized as possible, but also heard theo mention in his talk that you shouldnt really make a file for each "thing" only separate when needed. Coming from C++, let's just say we use a lot of files 🙂 4) front end -- any tips on front end design for someone that doesnt do anything front end? any additions that are clean that you recommend I look at? thanks for the help! my goal is to get a solid foundation for him, then let him hire experts to take the reigns, so I want to make sure I set those experts up for success as best as I can.
Solution:
1. rule of thumb is server rendering/static generation is better for SEO, client rendering is better for an "app" type experience 2. yea next-auth is cool, one thing to look out for is it doesn't work well with react native (ie for mobile apps). planetscale is better value than rds for most use cases and comes with a lot of useful stuff that you have to pay extra / do yourself there. if you want the cheapest "scale to zero" db, look at railway. 3. that page is good. do extract your "dumb" ui components and keep them somewhere else. as a very general thing id say organize files by feature, not by file extension. anyway this is not such a big deal, you can always move stuff around later. 4. if you're clueless and want to do the least amount of work to get something ok looking, use a pre-styled component library like shadcn, chakra, mantine, etc. steal layouts from other apps. only use multiples of 4px for spacing unless you have a very good reason. if you want to put in a bit more work and actually learn about this stuff, buy the "refactoring ui" book...
Jump to solution
2 Replies
Solution
cje
cje•2y ago
1. rule of thumb is server rendering/static generation is better for SEO, client rendering is better for an "app" type experience 2. yea next-auth is cool, one thing to look out for is it doesn't work well with react native (ie for mobile apps). planetscale is better value than rds for most use cases and comes with a lot of useful stuff that you have to pay extra / do yourself there. if you want the cheapest "scale to zero" db, look at railway. 3. that page is good. do extract your "dumb" ui components and keep them somewhere else. as a very general thing id say organize files by feature, not by file extension. anyway this is not such a big deal, you can always move stuff around later. 4. if you're clueless and want to do the least amount of work to get something ok looking, use a pre-styled component library like shadcn, chakra, mantine, etc. steal layouts from other apps. only use multiples of 4px for spacing unless you have a very good reason. if you want to put in a bit more work and actually learn about this stuff, buy the "refactoring ui" book
Gynthazi
GynthaziOP•2y ago
thanks CJE, so for pages, say we have an about/index.tsx folder.. best do just keep anything front end as far as spin-offs for about page in that folder I assume? i'll look into railway, thanks a lot. I will be hosting on amazon, but not sold on db location or setup yet,was just assuming i'd keep it in same host.
Want results from more Discord servers?
Add your server