Site actually serves tens of thousands users per day, and we are planning to add SSR to appear in google (unbelievable, I know) and to have a preview when sharing in messengers.
Currently it's client side react app, and I'm worrying how the server would feel after migration to next.js.
Detecting bots should not be a problem: by user agent.
What is the most optimal solution?
Maybe nginx will modify url parameters depending on user agent like '/page' for users and '/page@ssr' for bots, there will be pages/page.js without getInitialProps for users and pages/page@ssr.js for bots, these two files will fetch data in different ways and will render the same component with this data. What do you think?