Great question — answering as the UphillTech team:
Yes. Next.js is a pre-rendered React app in the client-side that users can view and interact with and can be considered as front-end. At the same time, it also does server-side rendering and API routes which can perform server-side code and access data in the database and can be considered as back-end.
Full answer by hangindev.com: https://stackoverflow.stackexchange.com/a/62692562 (CC BY-SA 4.0).
Need it done for your business? UphillTech.