Front End: Next.js (Vercel)
API Framework: FastAPI (Heroku)
Basically, I have an architecture that takes in an excel file as user input and submits a post request to the API saving the file on the file system of the API. The API reads from the filesystem and then executes methods on it.
Finally, the front end client then makes GET requests to endpoints that have JSON data and binary data for graph images.
When I deployed the API on Heroku and the frontend on Next.JS, the app uses so much memory and constantly crashes when post requests are initiated. I am not exactly sure what to do. Would it be better to just use Flask in this case?
I was advised to use a front-end framework that consumes an API rather than a ready-made solution such as Flask or Python Dash. Here is the backend API file that's causing some issues: https://github.com/lazarulian/scaleCPET-backend/blob/main/api.py\
If anyone has any advice on how to learn to structure projects like these and best practices, I would really love to hear it. This is something that I constantly struggle with and need to gain exposure to. Thank you so much for reading, I truly appreciate it.