I am new to web development. After reading some posts, such as this and this, I am still not sure which parts of my application belong to backend. To make things simple, I will use a mock example. The workflow is as follows:
The user provides my app with an API key for a third-party service capable of translating a file from a .WAV audio format into a file in the .MP3 format. The third party charges the user per file, so that the API key is sensitive information.
My app receives from the user a number of .WAV clips, translates them using the third-party service and the API key provided by the user, concatenates the resulting .MP3 clips and lets the user listen to or download the resulting clip.
I could do everything (i.e. both sending request to the third-party service and concatenating the resulting clips) on the front-end, which would significantly reduce the amount of data transfers and probably result in faster user experience. Is doing so a good idea?