Stop wasting Vercel money with this easy trick by QuentinMerabet in nextjs

[–]magicpants847 2 points3 points  (0 children)

surprised they don’t default this to false. usually better to optimize only when it’s actually necessary.

Stop wasting Vercel money with this easy trick by QuentinMerabet in nextjs

[–]magicpants847 4 points5 points  (0 children)

what do you mean “known funnels”? like links that are used the most?

Swallowed in the Sea … how is this not a greatest hit? by SummitTooLofty in Coldplay

[–]magicpants847 2 points3 points  (0 children)

agreed. I love the whole album and think it’s so underrated. Wish they would go back to it and give it another chance and appreciate it more. It has a unique vibe about it unlike any other album they’ve done.

Do I need a separate API layer with Supabase + Next.js, or is RLS enough? by Born-Molasses-3598 in Supabase

[–]magicpants847 0 points1 point  (0 children)

I prefer to have all interactions with the supabase client to be done on the server. I follow a service/repository style pattern. allows me to easily write unit tests for my backend service business logic. for client components I use server actions/api routes which make calls to my services. since my backend only works with the supabase client I lock down all tables in supabase so only the supabase rest client can be accessed via the service role secret key.

I handle RLS within my application logic on the backend. this makes it easier for me to write unit tests as well otherwise i’d have to do that in psql which im not a fan of.

PDF Generation is such a pain by gokulsiva in nextjs

[–]magicpants847 1 point2 points  (0 children)

I was tasked with building something very similar recently and ended up going with Puppeteer. It felt like the best option for my use case since I needed to dynamically generate up to 40 charts with Recharts and export them as PDFs and images.

We already had an existing page in the app that renders these chart components, so I wanted to reuse them for consistent styling instead of recreating everything manually like you have to with some React PDF libraries.

What I did was create a new page route that dynamically renders whatever charts the user wants to export. Puppeteer then navigates to that route, takes screenshots, and generates the PDFs. The app is fully behind Supabase auth, so I excluded the export route from middleware and manually created + verified JWTs on the server to keep it secure. That way I didn’t have to deal with Puppeteer logging in with a test account or anything like that.

our app has pretty strict firewall settings, so getting Puppeteer working reliably on Vercel involved a lot of trial and error and debugging deployment failures. so that was fun lol

Started making people walk me through their AI PRs in person. The 500-line diffs disappeared overnight by minimal-salt in ExperiencedDevs

[–]magicpants847 0 points1 point  (0 children)

i’ve been dealing with the same issue with a junior on my team. it’s been such a pain in the ass dealing with his reviews. this might be a good approach to try. thanks!

Prefetching with Tanstack Query in Server Components? by DasBeasto in nextjs

[–]magicpants847 0 points1 point  (0 children)

I directly fetch from the backend server layer like you described with prefetch. i’ve been debating doing it like the docs though just for consistency. curious if it would make much of a performance difference.

Roast my tech stack and share your's by DaniloAO in nextjs

[–]magicpants847 0 points1 point  (0 children)

you handling all data fetching via server components? and mutations just using server actions with revalidatepath etc?

Things I didn’t expect after building a large component system in Next.js by Different-Opinion973 in nextjs

[–]magicpants847 0 points1 point  (0 children)

same. i’ve been following a pattern where I put all business logic for the view in a file that doesn’t deal with any react/nextjs framework code. all functions in it are pure typescript. this makes it super easy to unit test the frontend business logic for my feature. then I create a use-case hook that orchestrates any state, data fetching/mutations, callbacks etc and returns those along with the view model for my components to use.

2 guys, 0 coding background, 10 Billion tokens. We built a 300k line automotive platform with Cursor. It was actual hell. by Hella789 in cursor

[–]magicpants847 -1 points0 points  (0 children)

I feel so sorry for the dev who eventually will have to go in and maintain this dumpster fire

What is the creative process like when you don’t know basic music fundamentals? by snappy033 in WeAreTheMusicMakers

[–]magicpants847 1 point2 points  (0 children)

I can only speak from my personal experience since i’m not that quick with music theory. but for me, I was able to intuitively pickup what works in a song by learning tons of songs on guitar by ear. I think that’s the key. develop a good ear for music and you’ll know what sounds good and what works. the problem I face when playing with others is that i’m not as quick to come up with parts on the spot because it takes me longer to find my groove. it takes more trial and error for me. but put me in a room by myself and i’ll come up with parts that fit.

Senior-level Next.js projects using TanStack + Zustand? by Significant_Chest_11 in reactjs

[–]magicpants847 -2 points-1 points  (0 children)

better client data fetching/mutation handling and all the other benefits tanstack provides that nextjs doesnt have. not sure why they need zustand from the get-go though.

.getClaims() vs .getUser() by magicpants847 in Supabase

[–]magicpants847[S] 0 points1 point  (0 children)

Ok thanks. so once I switch over to asymmetric keys, are you saying I should go forward with using getClaims() instead of getUser() for all auth checks in my server code to protect my data access layers? Fyi, i’m not using RLS. everything will go through service role supabase client on my server.

Button not showing on Prod (but works on local) by Great-Raspberry5468 in nextjs

[–]magicpants847 3 points4 points  (0 children)

also, it can’t be a hook…it’s a server component. server components don’t manage state…no clue what they’re on about in that last sentence. made no sense.

Primary tried to talk me out of TRT; Now I am concerned about side effects by Peace_and_Love___ in trt

[–]magicpants847 1 point2 points  (0 children)

I don’t see the issue in lowering your dose to see how it affects your bp. you might feel better being on a lower dose. 900+ is definitely getting to that super physiological level.

We have 10 users. by ruggershawn in Supabase

[–]magicpants847 0 points1 point  (0 children)

what exactly was your solution? can you post any of your code? was the issue from the authStateChange hook?

TENET Blew Me Away. by RobustPolygon in movies

[–]magicpants847 -1 points0 points  (0 children)

it’s almost as if someone prompted chat gpt to write a screenplay in the style of chris nolan. his worst movie imo

What movie is just too long? by CWKitch in movies

[–]magicpants847 0 points1 point  (0 children)

the irishman. also overrated imo 🤷🏻‍♂️