DEV Community

Cover image for The Ultimate Tech Stack for Your 2025 Projects

The Ultimate Tech Stack for Your 2025 Projects

Ivan Ivanov on December 06, 2024

As the year comes to an end, I decided to list the tech stack I’ve been using to build my projects. This list covers everything from frontend to ba...
Collapse
 
chiroro_jr profile image
Dennis • Edited

My experience with NextJS has been terrible. I had only worked with React through React Router in the past. I recently started a project at work which uses NextJS and I have to say some stuff has been painful.

  • The dev server is slow. Coming from Vite to whatever NextJS is using is just painful.
  • Facing some open issues while developing. There's a specific one where redirecting does not work if there are different root layouts. We have a landing section, an auth section, and a dashboard section that all use different layout so they had to be grouped. When a user signs in and has to be redirected to the dashboard, it doesn't worker due to the different layouts. I had to return an object with a success boolean and redirect on the frontend using useRouter instead of the redirect function.
  • Endless Hydration errors that I sometimes don't even know where they are coming from.
  • Peer dependencies warnings and errors using npm because well NextJS is bleeding edge and uses React 19RC. But I guess that's no longer an issue since React 19 is out.

But some things are great.

  • Server actions make handling forms and form errors easier. I haven't had to use controlled forms so far. I probably will have to for better UX but so far I don't have the need.
  • Fetching data in RSCs is great. It simplifies things in a way.
  • The routing convention using the app router is great. I used SvelteKit a bit and I love how they have specific files that do specific things when it comes to routing. Due to this collocation is easier. Each route can be coupled with things that only it uses like entity definitions, types, services, and components.

The problem is, these benefits exist in all other similar frameworks e.g SvelteKit. But the problem is the downsides are listed are very specific to Next. I'm sure there are more.

Collapse
 
yasir_ansari_338faf85e760 profile image
Yasir Ansari

Here’s an interesting issue I ran into with route protection in Next.js,

If you use middleware to guard a route, users can still sneak back to the protected page using browser navigation.

On the other hand, relying solely on client-side protection can lead to some weird hydration issues.

I combined both middleware and client-side protection.

Not sure if it’s the perfect approach, but hey—it worked for me!

Collapse
 
ivanivanovv profile image
Ivan Ivanov

Nice, interesting approach tbh, I think it makes a lot of sense to protect from certain edge cases. Interested to see how others are dealing with route protection

Thread Thread
 
yasir_ansari_338faf85e760 profile image
Yasir Ansari

How you deal with it?
What’re the best coding practices to implement it?

Thread Thread
 
ivanivanovv profile image
Ivan Ivanov • Edited

I've been using middleware mainly. And also I always protect any backend endpoints by checking if the user has a valid JWT access token.

What do you mean by

users can still sneak back to the protected page using browser navigation

Collapse
 
eriadura profile image
SAMUEL ADENIJI

Thank you

Collapse
 
ivanivanovv profile image
Ivan Ivanov

Super detailed, thanks for sharing your experience. I haven't experienced the same issues as you yet, but have you tried reaching out to someone at Next.js/Vercel? They are usually quite responsive, especially on Twitter and the Vercel community.

Might be worth a shot. But yeah I agree that other frameworks offer similar benefits, I haven't tried them out yet. Maybe I will use the Christmas period to check them out!

Collapse
 
eriadura profile image
SAMUEL ADENIJI

Thank you

Collapse
 
brense profile image
Rense Bakker

To be fair a lot of these "issues" are because rendering React to static pages introduces some new things that the developer should consider. I've definitely had issues with hydration when using vite and SSR.

I really wish that Nextjs would switch to vite though... Like you said, the dev server is really slow... Next build is pretty slow too actually.

Collapse
 
yugeroh profile image
Oliver James Aco

Hi @ivanivanovv , how's your day? I've just try vratix now but I've encountered some error when installing it can you please help me out. Thanks

Image description

Collapse
 
ivanivanovv profile image
Ivan Ivanov

Hey @yugeroh, we just released v1.0.8 of the CLI that fixes the Windows bugs. Let me know if it works for you and what you think of Vratix after you try it out :)

Collapse
 
yugeroh profile image
Oliver James Aco • Edited

Nice! It works fine now. Thanks @ivanivanovv for letting me know. Awesome project BTW

Thread Thread
 
ivanivanovv profile image
Ivan Ivanov

Thats great to hear! Looking forward to the projects you start with Vratix. btw we have a Discord community, you can join it to discuss anything backend related!

Collapse
 
ivanivanovv profile image
Ivan Ivanov

Hey Oliver! Thanks for reporting it, I resolved this issue yesterday. Will publish a fix today! Sorry for that, will let you know once live :)

Collapse
 
kizukuraudo profile image
John Keys Cloud

Thoughts on Firebase? It’s used where I work currently.

Collapse
 
ivanivanovv profile image
Ivan Ivanov

I've used it before, but if I go for a NoSQL database it will be MongoDB. I find all Google services a bit weird to setup and configure. Haven't used Firebase in ages so that might have changed.

PostgreSQL is just a solid choice for anything production-level.