Feel free to code your front-end framework in Next.js. All versions of Flatfile support the Next.js framework, though there are a few things to consider. Since Next.js is a React-based framework that is typically rendered completely on the server, special care should be taken when using it with Flatfile Portal, which is executed client side. You can view the Next.js documentation on how to do this here.
Flatfile Embed, on the other hand, works entirely server side, and you shouldn’t need to take any special considerations when using Next.js to create your front end versus any other framework.