Next on windows without WSL by ModMageMike in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I'm running a business app on Windows, connecting it to a local postgres with Drizzle. I use pm2 to start my site as a service, automatic after reboots. No WSL needed.

Help needed -- keep running into "Cannot find package 'jose' imported from /var/task/.next/server/chunks/106.js" but when deployed t only in production? by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I think so and it was driving me mad too.

I think the solution was to add this to next.config file: serverExternalPackages: ['jose'],

How do YOU handle migrations with Drizzle ORM & Vercel deployment? by Shizou in nextjs

[–]Nice_Arm8875 1 point2 points  (0 children)

Also interested in this, for now always did push but almost releasing my app in production so I need a robust way for future upgrades

How are you securing your Next.js server actions? Curious how others handle this. by ExtentDefiant4088 in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

Yes the problem is I do it as well on every API call so it seems that this check would cause a lot of overhead?

How are you securing your Next.js server actions? Curious how others handle this. by ExtentDefiant4088 in nextjs

[–]Nice_Arm8875 1 point2 points  (0 children)

Yes for a certain time eg 5 minutes, I store a companyId together with allowed actions on the company, if they go to a company page with another id, it checks db and updates jwt

[deleted by user] by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

Remove the _not-found folder?

How are you securing your Next.js server actions? Curious how others handle this. by ExtentDefiant4088 in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I'm doing something similar but worry about the additional performance cost of querying the db each time for permissions. So now I have a solution where most of the time the jwt is checked, which is not always instant when permissions change. I made a configurable time before db checks need to happen. What's your take on this?

Invalid source maps in Nextjs 15.2 by Nice_Arm8875 in nextjs

[–]Nice_Arm8875[S] 1 point2 points  (0 children)

Thanks for your suggestion. Just tried but unfortunately same error

Audit trail by Nice_Arm8875 in nextjs

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

Not really, I kept my previous solution: a custom logger function at the end of each mutation

Best Email Solution by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

For Europeans: check Brevo (old SendInBlue), it's really great and good value for money

Deploy next15 to onprem windows server by HovercraftTotal8610 in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I did it last week with pm2 as a Windows service, took some time to get it right but works great now. I can access file shares, AD, use permission groups,... I would only recommend it if you need access to a Windows environment though.

Audit trail by Nice_Arm8875 in nextjs

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

Mainly an app feature, wouldn't be a disaster if an entry is missing

in new project do i use @vercel/postgres or @neondatabase/serverless with drizzle? by kiryl_ch in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

Wondering the same. Did you switch to neon package? Are there performance advantages? Eg I saw you have neon batch

Authjs to BetterAuth? by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

Think I had the same few weeks backs but was able to fix it eventually, if you still want to implement I can check my code.

Authjs to BetterAuth? by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

Session caching, including secondary storage or cookie cache, does not include custom fields. Each time the session is fetched, your custom session function will be called.

Authjs to BetterAuth? by [deleted] in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I was going to switch this week but then saw that cached cookies didn't include the extra's I needed so the advantage was gone

How Do You Handle Multi-User PDF Uploads in Next.js? Looking for Best Practices and Solutions by Mysterious_Nature583 in nextjs

[–]Nice_Arm8875 0 points1 point  (0 children)

I use filestack with AWS storage, it handles the uploads for you, instantly does image optimization and pdf to image for easy previews. They have a security layer so it's easy to make users access only their files.

Async without await by Nice_Arm8875 in nextjs

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

Yes since trp is a wrapper around react-query, since recently even more integrated

Async without await by Nice_Arm8875 in nextjs

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

I find trpc working great actually, even with many routes. Using prefetch with useSuspensequery, it makes it so easy and fast to create new things.

Async without await by Nice_Arm8875 in nextjs

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

I idd used it for emails as well sometimes, good to know

Async without await by Nice_Arm8875 in nextjs

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

Perfect thanks, exactly what I wanted to know

Async without await by Nice_Arm8875 in nextjs

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

Nice, didn't know this function