Fullstack Deployment Setup and Help for Next.js / Java Spring Boot REST API / PostgreSQL

Hello, I’m a bit of a novice to deploying fullstack apps.
Just trying to figure out if there’s a good way to develop, maintain, and deploy an app with this stack.
Figured a monorepo may be good, but how would we deploy both the frontend and backend on a single platform. Is this possible on Fly.io?

Any help would be appreciated, though my team and I are still learning, working on this passion project.
Cheers