r/nextjs

▲ 8 r/nextjs

Using NextJS as a frontend and using node/express backend is a right choice?

Hi, I have one use case where I need cron jobs, web sockets, and heavy backend tasks. So, in these cases I should prefer using node/express backend and using NextJS only as frontend?

A bit context: I know Nextjs very well. But never used websockets and cron jobs with Nextjs. So, I just want to know how to actually do this.

reddit.com
u/ParthBhovad — 10 hours ago
▲ 6 r/nextjs

At what point does passing data down from a server component start being worse than just fetching it in the client?

I'm on Next 15 with the App Router, self-hosted on a small VPS, building an internal dashboard with maybe fifteen or so pages. I fetch in the server components and pass the data down as props, which is fine two levels deep, but a couple of my views are now threading the same objects through four or five components just so a leaf node can read one field. I know context or a store solves the prop drilling, I'm just not sure whether reaching for either of those means I've picked the wrong boundary between server and client in the first place.

How deep do you let props go before you move the fetch into the client?

reddit.com
u/Potential_Ship_1676 — 15 hours ago
▲ 4 r/nextjs

Does the "server components by default, client only when forced" rule hold up past a small app?

I've been building a client dashboard in Next.js for about four months and I've defaulted to server components everywhere, dropping to client only when something genuinely needs state. I know that's the whole pitch of the app router, so I'm not after the docs answer. I keep running into the same thing in practice, where one interactive widget low in the tree drags three parents into client land anyway, and at that point I'm not sure my rule bought me anything.

How far into a project did that rule get before you stopped following it?

reddit.com
u/SecretBox1118 — 17 hours ago
▲ 8 r/nextjs

Why aren't API routes with environment variables treated as dynamic by default?

Given a robots.ts file with this content for example. If we do not add

export const dynamic = "force-dynamic"

then process.env.APP_ENV will resolve to undefined since Next.js treats this as a static route since it pre-renders it at build time.

But the whole idea behind environment variables are that they are at runtime.

import type { MetadataRoute } from "next"


export default function robots(): MetadataRoute.Robots {
  // Staging should not be indexed
  if (process.env.APP_ENV !== "production") {
    return { rules: [{ userAgent: "*", disallow: "/" }] }
  }


  return {
    rules: [{ userAgent: "*", allow: "/" }],
  }
}
reddit.com
u/Ramriez — 1 day ago
▲ 6 r/nextjs

Has anyone experiencing recent changes on how their builds are being charged in VERCEL?

https://preview.redd.it/he9uwnm5pikh1.png?width=782&format=png&auto=webp&s=9a1b3fe87a18a91ea8eed1cb22b2a2c65e68ad08

We are suddenly seeing massive build times compared to the past where they were just a fraction. Now they are 90% of the total compute use, even when our traffic has increased and our release cycles have gone slower.

Anyone having a similar issue? I also see Vercel pricing for the different compute changes has changed. We are on pro. We pay somewhere between 60 to 100 per month based on compute.

reddit.com
u/ndr3svt — 1 day ago
▲ 1 r/nextjs

Is it a mistake to keep everything in route handlers now that server actions exist?

I've been on the App Router for about a year and a half, on an internal dashboard with somewhere around 40 routes. I've kept nearly all my mutations in route handlers because the validation and error shapes were already wired up there, and i only reach for server actions when a form is trivial. I know the docs treat actions as the default now and I've read the argument about not shipping an extra endpoint, I'm just not sure that's worth rewriting a layer that currently works fine.

What made you move your existing route handlers over to server actions?

reddit.com
▲ 21 r/nextjs+5 crossposts

Hi everyone, I'm creating a tool to learn ASP.NET Core

I've been developing a platform for learning ASP.NET Core Web API in a more practical way for some time now. The idea is to combine guided lessons, code examples, and challenges. At the end of each challenge, you can submit your solution and receive feedback from an AI that evaluates it according to certain criteria, highlighting what you did well and the areas for improvement.

for now, the lessons use YouTube videos as support. Later, I'd like to create my own content, but first I want to validate the idea.

if you're interested, you can go to the landing page and join the waitlist to be notified when it's available. Thanks!

https://net-ascendant.vercel.app/

u/Lucky-Percentage5216 — 2 days ago
▲ 105 r/nextjs

We're the Next.js team. Ask us anything!

Hi Reddit! We’re Pete, Aurora, Joseph, Sam, David, Josh, Tim, Dan and Andrew from the Next.js team.

We recently shipped Next.js 16.3, and we’re excited to talk about what’s new, how we approached the release, where we are going, and what we’ve learned while building and maintaining Next.

Ask us anything about Next 16.3, App Router, React Server Components, performance, caching, upgrading your applications, contributing to the framework, or what it’s like to work on Next.

Drop your questions below. We’re looking forward to hearing what’s on your mind! We'll be here until noon ET.

>That's all the time we have for today. Thank you to everyone who participated!

reddit.com
u/floydophone — 3 days ago
▲ 9 r/nextjs

I know NestJS — what frontend framework should I learn next?

Hi everyone, I’m currently focusing on NestJS/Node.js backend development and want to learn frontend as well.

Since I already know NestJS, which frontend technology would you recommend learning next?

React, Next.js, Vue, or something else?

My goal is to become a stronger full-stack developer while keeping backend/NestJS as my main focus.
Thanks!

reddit.com
u/Capital-Election-420 — 3 days ago
▲ 10 r/nextjs+2 crossposts

Frontman: open-source AI coding agent that runs inside frontend apps

Frontman is for a specific problem: AI coding agents often edit frontend files without seeing the running app, built for technical people.

Why try it:

- select/click UI before asking for edits

- agent gets DOM, screenshot, logs, routes, source mappings

- works with Astro, Next.js, Vite, WordPress

- open source

Latest release added Astro content collections support.
And it's fully OSS, self hostable etc

Repo: https://github.com/frontman-ai/frontman

u/Firm-Space3019 — 2 days ago
▲ 3 r/nextjs

Please Help — Looking for a Remote Full Stack / Frontend Opportunity 🙏

Hi everyone,

I’m currently looking for a remote Full Stack or Frontend internship/job and could really use some help from this community.

I have hands-on experience through two internships, including a US-based NGO project, working with React, Next.js, TypeScript, Node.js, Tailwind CSS, APIs and Git/GitHub.

I’m mainly looking for a place where I can contribute to real projects, learn from the team, and keep growing as a developer.

Resume: https://drive.google.com/file/d/1ZUHFqH9A5FDNAQazHO_Nq7BEYUQ7W895/view?usp=drivesdk

If you know of any suitable opening, recruiter, or even someone I should reach out to, please let me know. Any genuine lead would really help. 🙏

Thank you!

reddit.com
u/proffessional-work01 — 2 days ago
▲ 1 r/nextjs

opengraph-image for an unknown slug was returning 500 and taking the Node process with it

Ten days of access logs on my Next.js site had 1,446 5xx responses. 1,378 of them were on /<route>/opengraph-image. Every HTML page, the feed and the sitemap were clean, which took a while to notice because the 5xx had been attributed to the feed and sitemap.

Known slugs were fine. They come from generateStaticParams and get a prerendered PNG. The problem was the fallback branch for slugs that are not in that list:

export default async function Image({ params }) {
  const { slug } = await params;
  const issue = getIssueBySlug(slug);
  const fonts = getOGFonts();          // runs either way

  if (!issue) {
    return new ImageResponse(
      <div>Issue not found</div>,
      { ...size, fonts },
    );
  }
  ...
}

getOGFonts() ran before the not-found check, so an unknown slug still loaded fonts and built an ImageResponse at runtime. On a process that had already served an uncached /_next/image optimization, that font read crashed the worker instead of returning an image. 1,364 of the 1,378 were 502s, which is the proxy failing to reach Node at all. PM2 had 80 restarts on that process.

The fix is ordering:

const issue = getIssueBySlug(slug);
if (!issue) notFound();

const fonts = getOGFonts();

notFound() throws before anything touches the font buffer, so an unknown slug returns a zero-byte 404 and the process stays up. Since the deploy: 895 requests, zero 5xx, unknown OG slugs 404, known ones still 200 image/png.

Two things worth checking if you have dynamic OG routes:

  1. Request an OG image for a slug that does not exist. If you get anything other than a 404, you have a runtime ImageResponse path a crawler can reach.
  2. Group your access log's 5xx by request path before you trust which route is failing. Mine pointed at two routes that had never returned a 5xx.
reddit.com
u/VictorBuildsApps — 2 days ago
▲ 7 r/nextjs+4 crossposts

I built a Frontend-focused NEXT.JS starter with custom UI components, auth layout, dashboard layout, i18n, RBAC, a polished DX and more.

After a long time of development, I can finally share this open-source repo with you guys.

It can be especially helpful for frontend developers working with Next.js, React, and TypeScript.

It’s an open-source, frontend-first Next.js boilerplate built for an API-driven workflow. It’s designed to consume external backends, whether REST, GraphQL, or BFF, while giving you a polished, production-ready starting point out of the box.

I’ve been using this boilerplate for my own frontend projects, and it includes pre-built authentication layouts, role-based dashboard layouts, and 40+ custom, reusable UI components.

More details: https://github.com/salmanshahriar/Next-Elite

Live Url: https://next-elite-boilerplate.vercel.app

Give a Star on GitHub if you like it ⭐️

github.com
u/ThreadWavet — 3 days ago
▲ 13 r/nextjs

How are you handling multi-tenant data isolation in Next.js? RLS vs separate schemas?

Hey everyone,

Working on a multi-tenant project using Next.js (App Router) and PostgreSQL.

Currently exploring two main architectural approaches for tenant data isolation:

  1. Setting up Postgres Row-Level Security (RLS) policies with tenant IDs on every query context.
  2. Using dynamic database schemas per tenant.

For those running similar architectures in production, which pattern gave you fewer edge cases around connection pooling and API performance?

Would love to hear your experiences and any architectural bottlenecks you ran into.

reddit.com
u/charita3219 — 4 days ago
▲ 0 r/nextjs

Is there some managed hosting/infra to use?

Hello,
hard no-coder here. I do pretty love vibe-coding. But honestly I am not that dev-ops skillfull. Is there options for hosting next-js and payload in the managed infrastructure? I did play hard around CF workers (worked legit) but honestly I did not know what's happening behind the hood, which is only thing scarying me the most :-D (can't safely say upcoming clients for this option). On the other side, I do love the set-up of front-end etc. and running over the vibe, which giving me much more flexibility.

Hope I am not alone in that situation :-D

reddit.com
u/Puzzleheaded-Bowl748 — 4 days ago
▲ 13 r/nextjs

Best way to learn db backup

Hi,

I self-study full stack programming, backend oriented.

A friend of mine, which is a developer, offered me to help him with his product and I accepted. He told me I can do whatever I want, he will review my code.

I decided to take the task of db backup creation - his project does not have one.

It is going to be slower than just creating db backup, because I want to learn all the fundamentals needed that I don't have. I use Claude with me to guide me.

The stack is Next.js / Node.js / TS / pg / hetzner / posthot

What should be my approach for this?

Thanks for help!

reddit.com
u/Fabulous_Variety_256 — 4 days ago
▲ 3 r/nextjs

How are you handling multiple users on Vercel?

I'm working on a few side projects with some friends. To get previews and even deployments for everyone are you seriously paying $20 per user? Right now, I’m the only one paying, which means every time one of my friends pushes code, I have to make a dummy commit so Vercel actually deploys but we still dont have previews for most PRs.

reddit.com
u/jokjol — 4 days ago
▲ 4 r/nextjs

My First Job Switch I need some doubts

Hi everyone,

I have **2 years of professional experience in PHP backend development**, with hands-on experience in **HTML, CSS, JavaScript, databases, and working with servers**.

I’m now planning to transition to the **MERN Stack (MongoDB, Express.js, React, Node.js)**.

I’m confident about learning the MERN technologies themselves. My main concern is understanding **how companies will evaluate my existing 2 years of backend development experience when I switch technologies**.

For developers or tech leads who have experience with similar transitions:

* If someone has **2 years of PHP backend experience** and becomes strong in Node.js/Express/React, can they realistically apply for **2 YOE MERN positions**?

* Will companies generally consider my previous backend experience relevant, or will they expect me to apply as a junior because I don't have 2 years of Node.js experience?

* How important are **Git/GitHub, testing, CI/CD, Docker, REST API design, authentication, deployment, and system design** for someone making this transition?

* What level of MERN knowledge would make you say, **"Yes, this person is ready for a 2-year experienced developer role"**?

* For interviews, should I focus more on **JavaScript/Node/React fundamentals**, or should I also prepare for **2-year-level backend and system-design questions**?

I’m not looking for someone to tell me whether PHP or MERN is better. I’ve already decided that I want to move toward MERN.

What I’m trying to understand is:

**How do I correctly position my existing 2 years of backend experience while switching from PHP to MERN?**

If anyone has personally moved from **PHP → Node.js/MERN**, I’d especially appreciate hearing how your first job switch went and what you learned before applying or any body have more experience in full stack development can also giveme suggession

Thanks!

reddit.com
u/Realistic-Hunter1278 — 4 days ago
▲ 0 r/nextjs+1 crossposts

Learned React for frontend, is it worth moving to Next.js now?

Hi guys,

I’m working in full stack development. For frontend I’ve learned React.js and I’m comfortable with it.

Now I’m thinking of starting Next.js but I’m confused if I should actually learn it or just stick to React.

For those who are already working as full stack devs:

  1. Is Next.js something companies expect now?

  2. Will it help me get more jobs/projects or is React alone enough?

Would love to hear your experience and advice. Thanks!

reddit.com
u/Few_Accident1450 — 5 days ago