I have a backend server using Django framework and frontend using React.js
I have a page that shows some statistics and wish to export this page in my backend so that I can send it in mail for recipients every interval (15 minutes, 30 minutes..).
The page changes every minute so that I can't upload the page as pdf once in backend and use it later.
I found that I can use headless browser to make a request to frontend to get the page but I have concerns about this appoach.. Or how heavy it is to add a headless browser in my backend server.
And I don't want to recreate the page again in Django using templates because I won't be able to copy the design and also it is extra development time and duplicated code.
I can see that those who use server side rendering can acheive this task easily while the page is renedered in backend.. that means they can use the page to send it in mail as pdf or to send it as a response to clients.
I expect to have a good performance and wish to have some overview if this task already exist and someone else solved it somehow better than adding a headless browser.