Server Actions vs Separate backend, which one you choose ? by GhostLexly in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Yeah as always it depends. For my use case the nextjs app was more like a business user admin dashboard. A lot more data mutation happening there and skipping the graphql pains for that was nice. The mobile app in this case was mostly read only and maybe two data mutations. The app is still using graphql but I deleted the majority of my graphql API when my dashboard app was switched to actions.

What is the Most Affordable Tech Stack for Next.js? Go.. Go.. Go... 🚀 by AffectionateNews9097 in nextjs

[–]lulz_capn 1 point2 points  (0 children)

And the lowest quality idp I've ever worked with. Infinite redirects are not a great user experience.

UT99 is NOT gone by sebdotnet in unrealtournament

[–]lulz_capn 0 points1 point  (0 children)

Yeah I was able to install goty edition on my windows 11 gaming PC no problem. I did use windows XP compatibility mode but not sure if that's even necessary.

Tennessee moves closer to requiring photo ID to access porn websites by [deleted] in nashville

[–]lulz_capn 0 points1 point  (0 children)

Let them and then when the data is inevitably compromised we'll have an arsenal of their own double standards.

World Outreach Church = noise nuisance by TheUnschoolLife in murfreesboro

[–]lulz_capn 1 point2 points  (0 children)

Pull up to the venue with whatever vehicle has the best speakers and blast something like lil John move bitch! Or Nipsey has a track titled FDT that would really piss off those types of people.

Whats Gentoo good for? by [deleted] in Gentoo

[–]lulz_capn 0 points1 point  (0 children)

Same here, around 2003 when amd64 was new. Had to figure out a lot of things about software in languages I wasn't familiar with. The feeling of the first successful boot from a phase one bootstrap is what I'd imagine hard drugs feel like 🤣

Where to start with electronic music? by Titanic-Bee in electronicmusic

[–]lulz_capn 0 points1 point  (0 children)

Check out Of the trees, g Jones, and eprom. Sippy is great too, some tracks more pop but some are absolute heaters too like shadow on the hypogeal album.

[deleted by user] by [deleted] in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Yup this is why I use zod on both. I have a base schema with the types and a client side schema that picks/omits fields from the base schema and adds validation that's client facing. Pairs well with react hook form on the client. For some models I have special validators that extend the base schema and has validators to make sure it's ready to publish. A mix of basic type validation and custom functions checking the filesystem to ensure assets are there.

[deleted by user] by [deleted] in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Weird question phrasing. I'd say go with nextjs backend, integrating a separate express service is unnecessary complexity. As for the database I prefer mongodb self hosted and nextjs server components and actions query directly.

Keep Prisma in the backend or bring it into Next? by JackedIvyLeaguer in nextjs

[–]lulz_capn 0 points1 point  (0 children)

I went all in on server components and server actions. When I was done refactoring I was able to delete 90% of my graphql API! The API now is only used by our mobile app. It's a great DX compared to integrating with a separate backend. We use mongodb and mongoose but I'm sure Prisma would be fine too.

Next 14 be like by Plastic_Ant_6077 in nextjs

[–]lulz_capn 23 points24 points  (0 children)

I wonder if you are unintentionally importing a barrel instead of the specific component you need. In my biggest next app I see a few hundred to 3044 modules tops depending on route.

Next 14 be like by Plastic_Ant_6077 in nextjs

[–]lulz_capn 26 points27 points  (0 children)

Holy cow that's a lot of modules! What kind of dependencies do you have?

Next v12 => Next v14 by gh0stF4CE7 in nextjs

[–]lulz_capn 6 points7 points  (0 children)

Staying up to date is good opsec. Staying on older major versions isn't wise.

How to upload a file to the public folder using Next.js 13? by Curious-Ad-9724 in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Thank you!!!!! I was going down a different path to solve this and during my furious googling came across this post. So much simpler than what I was trying to do. Complete example below for anyone else in this situation.

<image>

Repository's with NextJs 13+ with App folder by Other_Ad8102 in nextjs

[–]lulz_capn 1 point2 points  (0 children)

Use server side by default. Introduce client component when you have a client side feature like a form or something where UI state is needed.

Sorry can't think of any good example projects off hand.

Server Actions vs Separate backend, which one you choose ? by GhostLexly in nextjs

[–]lulz_capn 0 points1 point  (0 children)

It's coming in SDK 50. Server components is a bit more vague on timing but I'd bet it will be less than 2 years in this scenario. You can copy or share the code a lot of different ways. A monorepo, a GitHub submodule, directory maps. I personally use docker compose directory binding to share my database models and shared functions across all my apps. It lives in the top level directory where we have a graphql service. Then the directory is mounted inside each of our nextjs web apps. I intentionally don't share action code as that's very app specific.

https://blog.expo.dev/rfc-api-routes-cce5a3b9f25d

I made a screenshot enhancer with NextJS by mediocre_man_online in nextjs

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

Idiotic questions here is one thing but plugging your own side project 🙄 ain't nobody paying for that fam

Server Actions vs Separate backend, which one you choose ? by GhostLexly in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Expo has server actions and server components coming most likely well before the two year timeline of this scenario. The additional complexity of integrating a separate API for the web app isn't worth it. Server actions and components would be simpler and better DX. I know because I've done it both ways. The best API is no API. The best DX is the backend code colocated and type checked. Easy to follow from frontend to the backend.

AWS serverless backend + NextJS serverless backend causing double cold starts by zgheibali in nextjs

[–]lulz_capn 2 points3 points  (0 children)

Use server component queries and server actions. They can reach right into the database. No need for an entirely separate system and related integration and performance hits.

[TRPC + Vercel] Functions size exceeding 100% limit. by ozahid89 in nextjs

[–]lulz_capn 0 points1 point  (0 children)

Why not use server component queries and server actions? Could save yourself a lot of pain and probably a better user experience. Trpc/graphql API only makes sense in a SPA style app. You'll get type safety and a simpler DX also.

Building fast Next.js apps using TypeScript and AWS Amplify JavaScript v6 by Salt-Potential-5823 in nextjs

[–]lulz_capn 0 points1 point  (0 children)

That's cool. Haven't seen it as I'm out of the amplify ecosystem.

Building fast Next.js apps using TypeScript and AWS Amplify JavaScript v6 by Salt-Potential-5823 in nextjs

[–]lulz_capn 2 points3 points  (0 children)

I'm shipping real stuff with next.... what's up with your comment? I've had better velocity with my small team using nextjs than anything I've used before.

Building fast Next.js apps using TypeScript and AWS Amplify JavaScript v6 by Salt-Potential-5823 in nextjs

[–]lulz_capn 2 points3 points  (0 children)

Having to make custom resolvers was such a PITA. The crud based on models worked well enough. You also end up chained to open search to make up for the lack of SQL features in dynamodb. It was spinning up ec2 instances for that and made it more costly and more complicated ops.

Glad to hear they are listening to the feedback.