Recently, I created a code playground using React similar to liveweave. Users can save their "code playgrounds" and access them later by utilizing Firebase for the database. These "code playgrounds" consist of HTML, CSS, and JavaScript elements. My goal now is to implement a feature that allows users to download their playgrounds in three separate files (one for each language).
1) Is there a way to generate HTML, CSS, and JavaScript files with content on the client-side?
2) If it's possible, could these files be grouped into a .rar file on the client-side as well?
3) If generating files on the client-side isn't feasible or optimal, how would you suggest tackling this issue?
I'm considering creating an Express server to fetch data from the database and then respond with the necessary files, but I'm interested in exploring client-side solutions first.