r/nestjs • u/Fit-Woodpecker5308 • Sep 22 '26
Would you use a more integrated React + NestJS stack?
I’m curious about something from people who use NestJS seriously.
If there were a way to build a full-stack application where:
NestJS remains the main application framework
You keep Nest modules, DI, guards, pipes, interceptors, routing, etc.
React is used for the UI
You don’t have to maintain a completely separate frontend application
Server-side rendering and interactive React components are both supported
The frontend/backend boundary feels more like one application rather than two separate projects
Would that actually be useful to you?
Or would you prefer the current approach of keeping NestJS as an API/backend and using something like Next.js, Vite, React Router, etc. as the frontend?
I’m specifically interested in why you’d choose one approach over the other.
What would make an integrated approach appealing, and what would make it a hard no?
Not looking for feature requests yet. I’m mainly trying to understand whether this is a problem Nest developers actually have.
4
u/[deleted] Sep 22 '26
What you are proposing is already taken care of by a monorepo. I keep separation of concerns split, but I can still share types/utils in one ecosystem. I don’t want to work with SSR, because all the apps I’m building with nextjs are not static webpages or e-commerce sites.
1
u/Fit-Woodpecker5308 Sep 22 '26
https://github.com/acefolioDev/nest-can-react
Here is the repo link if any of you want to go through from this.
1
u/canarydev Sep 22 '26
it’s basically inertia for nest, which already exists in a few forms, so I’d probably start by looking at why those never really took off.
benefits i guess would be shared types, no CORS boundary, one auth/session story, one deploy. great for small teams and internal tools.
the tradeoff is that once you have a mobile app or another client, you need a client-independent API anyway, which removes a lot of the benefit. you’re also coupling frontend/backend deployment and taking on React build/SSR tooling that Next/Vite will probably always have a much larger ecosystem around.
personally I’d rather keep Nest as the API and share contracts/types through a package.
1
u/cdragebyoch Sep 22 '26
Honestly, no. Nest JS isn't for fullstack applications and trying to use it for one is pretty much an anti-pattern. If you need fullstack, just used Next.js. TBH, most of the applications that people develop in typescript is probably better off being written in Next.js. As much as I like Nest JS, its overkill outside of enterprise or distributed environments.
1
u/Anxious-Insurance-91 Sep 22 '26
Adosnis J's?
1
u/AnUuglyMan Sep 30 '26
I would recommend React with react doctor and NestJS Doctor. They’re a great combo.
1
u/iamegoistman Sep 24 '26
I think in this case angular will be best option for full stack setup. UI and backend should share some common structures.
1
u/Agreeable-Rest8485 Oct 18 '26
https://georgi.alexandrov.dev/nestjs-ssr/ is what you’re looking for