My goal is to develop an application utilizing Next.js for the frontend, fetching data from a Strapi API hosted on the same server. The plan is to have Strapi handle API and admin routes, while Next.js manages all other routes. I intend to use fetch in Next.js to retrieve data from /api/(collection)/(id)*. Is this feasible? Does it make sense? If so, how would it work? After considering various options, I believe that Next.js + Strapi offers the best functionality.
I am aware of hosting both applications separately and accessing data through API URLs, as I have implemented this method in detail before. However, I find the idea of having Strapi manage admin routes distinct from Next.js for a more efficient workflow appealing. This approach eliminates the need for maintaining two separate hostings just for this purpose.