building a very large app with next js ?
Answered
Scaly-naped Pigeon posted this in #help-forum
Scaly-naped PigeonOP
I am using next js in medium sized apps but i got a task to build a website similar to booking com that it will have alot of clients and millions of requests with a crm and analatics dashboard to work with , should I consider using next js with api routes or should I use next js as frontend and use node js or bun as a backend please I need help consider which track to use ?
Answered by Brown bear
bro don't over think it
next.js, drizzle, postgres
deploy to vercel for free
once your backend has outgrown your needs, literally migrate the route handlers (API routes) over to any node framework
all you have to do is swap the REST API endpoints
next.js, drizzle, postgres
deploy to vercel for free
once your backend has outgrown your needs, literally migrate the route handlers (API routes) over to any node framework
all you have to do is swap the REST API endpoints
19 Replies
it is an opinionated question
Some prefer to separate frontend & backend
Personally, I prefer to use it as a full stack framework because of server actions
@Scaly-naped Pigeon
Scaly-naped PigeonOP
@Anay-208 I see, so If i used Next JS API routes for a large app it will work fine even if alot of users is browsing my website ?
I was confused about why AI keep saying to use node js instead of next js api routes
Yes
Umm, can you send a screenshot?\
Scaly-naped PigeonOP
yes moment
chatGPT and claude keeps recommending node js as a backend because its saying that next js api routes is only for mid sized apps
but to be honest bun is alot better and easier to code
But the advantage about it is that, you can also use server actions for mutations, which provide type safety.
If I need a app with stuff like websockets, or some features which next doesn't support, then only I go for this approach.
Brown bear
bro don't over think it
next.js, drizzle, postgres
deploy to vercel for free
once your backend has outgrown your needs, literally migrate the route handlers (API routes) over to any node framework
all you have to do is swap the REST API endpoints
next.js, drizzle, postgres
deploy to vercel for free
once your backend has outgrown your needs, literally migrate the route handlers (API routes) over to any node framework
all you have to do is swap the REST API endpoints
Answer
Scaly-naped PigeonOP
you guys are right , I will go with next js with API routes and migrate to bun when the site gets bigger.
@Scaly-naped Pigeon about Db connection, its your choice. I personally recommend kysely, but both are good.
Can you mark this message as a solution
Scaly-naped PigeonOP
thank you guys ❤