You can make it work without much hassle, next-connect does all the heavy-lifting, and then it's just about keeping a proper files organisation.
It's a bit dated now, but I wrote a series about it: dev.to/noclat/series/11054
This is probably not the best solution for a huge API though, I would separate the front-end and back-end into 2 distinct projects so each team can work on their part without polluting the other. And for this you have better API frameworks than Next.js.
You can make it work without much hassle, next-connect does all the heavy-lifting, and then it's just about keeping a proper files organisation.
It's a bit dated now, but I wrote a series about it: dev.to/noclat/series/11054
This is probably not the best solution for a huge API though, I would separate the front-end and back-end into 2 distinct projects so each team can work on their part without polluting the other. And for this you have better API frameworks than Next.js.
Thanks Nicolas, I was looking for this answer exactly :)