Improve solution download format to ZIP project structure
Currently, solutions download as a single .txt file containing HTML, CSS, and JS together. It would improve developer experience if the solution downloaded as a ZIP file containing properly separated files like:
- index.html
- styles.css
- script.js
This would make the project immediately runnable and align with real-world project structure.
Hi @Jeevankumar-s and @gikf , I’d like to take this up. I’m planning to update the download logic in CompletionModal.tsx to generate a ZIP file with separate project files instead of a single .txt.
Hi @Jeevankumar-s I’d like to work on this issue if it’s available. It seems like a great improvement for developer experience. Please let me know if I can take it up
Hi @kopalg20 , @maryamfatimaJ
This issue is still under status: waiting triage.
Once it’s updated (e.g., to help wanted), you can go ahead and open a PR.
For Project Euler, Rosetta Code or daily coding challenges the txt file is fine.
Hey @Jeevankumar-s, I totally understood the issue and would love to work on it, Can you please assign it to me?
Hi @Riddhi8077,
We typically do not assign issues. Instead, we accept the first pull request that comprehensively solves the issue.
Issues labeled with help wanted or first timers only are open for contributions.
Please make sure you read our guidelines for contributing. We prioritize contributors following the instructions in our guide. Join us in our chat room or the forum if you need help contributing - our community will be happy to assist you.
Hi @Venkat-Entropik, it's been long time you've not worked on this issue, So I thought you skipped this issue!
Thanks for the work on this issue!
I explored a solution using JSZip to generate a downloadable ZIP, but since this introduces a new dependency, it requires updating the lockfile which I’m currently unable to do in my setup.
Since there is already an active PR addressing this issue, I’ll go ahead and close mine to avoid duplication.
Appreciate the effort here, looking forward to contributing to another issue
Thanks for the work on this issue!
I explored a solution using JSZip to generate a downloadable ZIP, but since this introduces a new dependency, it requires updating the lockfile which I’m currently unable to do in my setup.
Since there is already an active PR addressing this issue, I’ll go ahead and close mine to avoid duplication.
Appreciate the effort here, looking forward to contributing to another issue
Thank you for your effort. Contributions are reviewed based on best fit and adherence to project guidelines, rather than on a first-come basis. We appreciate your work on this.
Thank you for your effort. Contributions are reviewed based on best fit and adherence to project guidelines, rather than on a first-come basis. We appreciate your work on this.
Hey @Jeevankumar-s , Thanks for letting me know, I understood the assignment, kindly review my PR as all tests are passing now
Thanks for the feature request. We've reviewed a couple of PRs for this and want to share some guidance before moving forward.
The ZIP approach is right, but hardcoding filenames like index.html, styles.css, script.js won't work. freeCodeCamp challenges aren't limited to basic HTML/CSS/JS — we have Python projects, multi-file challenges, and single-file challenges (Project Euler, Rosetta Code, etc.) where that naming makes no sense.
The good news is that each challenge file already carries the metadata you need:
interface DownloadableChallengeFile {
name: string; // e.g. "index", "styles", "script"
ext: string; // e.g. "html", "css", "js", "py"
contents: string;
}
So the ZIP should use the original filenames from the challenge data (${file.name}.${file.ext}), not hardcoded names. This way it works across the entire curriculum without special-casing.
A few other pointers for anyone picking this up:
- Keep the existing useEffect + downloadURL state pattern — it handles URL object lifecycle (creation/revocation) correctly
- Use the native attribute rather than programmatic click hacks
- The E2E test should verify an actual download happens and check the filename, not just assert button visibility
- jszip ships its own types — no need for @types/jszip
But, jszip seems to be bloated. Consider other packages. I am closing linked PRs.
Thanks for the update and for taking the time to explore a solution. Totally makes sense to avoid duplicating effort. Looking forward to your future contributions!
On Fri, Mar 27, 2026, 2:26 PM Riddhi Pachehara @.***> wrote:
Riddhi8077 left a comment (freeCodeCamp/freeCodeCamp#65887) https://github.com/freeCodeCamp/freeCodeCamp/issues/65887#issuecomment-4144762710
Thanks for the work on this issue!
I explored a solution using JSZip to generate a downloadable ZIP, but since this introduces a new dependency, it requires updating the lockfile which I’m currently unable to do in my setup.
Since there is already an active PR addressing this issue, I’ll go ahead and close mine to avoid duplication.
Appreciate the effort here, looking forward to contributing to another issue
— Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/freeCodeCamp/issues/65887?email_source=notifications&email_token=CAYEKV3Y662ROPG2QGDEPC34S3IWRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJUGQ3TMMRXGEYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4144762710, or unsubscribe https://github.com/notifications/unsubscribe-auth/CAYEKVY7LA7EY24WHFZUPQT4S3IWRAVCNFSM6AAAAACVEVPBFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCNBUG43DENZRGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi, I would like to work on this issue. Is it still available?
Thanks for the feature request. We've reviewed a couple of PRs for this and want to share some guidance before moving forward.
The ZIP approach is right, but hardcoding filenames like index.html, styles.css, script.js won't work. freeCodeCamp challenges aren't limited to basic HTML/CSS/JS — we have Python projects, multi-file challenges, and single-file challenges (Project Euler, Rosetta Code, etc.) where that naming makes no sense.
The good news is that each challenge file already carries the metadata you need:
interface DownloadableChallengeFile { name: string; // e.g. "index", "styles", "script" ext: string; // e.g. "html", "css", "js", "py" contents: string; }So the ZIP should use the original filenames from the challenge data (${file.name}.${file.ext}), not hardcoded names. This way it works across the entire curriculum without special-casing.
A few other pointers for anyone picking this up:
* Keep the existing useEffect + downloadURL state pattern — it handles URL object lifecycle (creation/revocation) correctly * Use the native attribute rather than programmatic click hacks * The E2E test should verify an actual download happens and check the filename, not just assert button visibility * jszip ships its own types — no need for @types/jszipBut, jszip seems to be bloated. Consider other packages. I am closing linked PRs.
Hi, thanks for the detailed guidance — it really helped clarify the expectations.
I went through multiple previous PRs and now understand why they were closed, especially around hardcoded filenames, handling metadata correctly, and keeping the implementation generic across different challenge types.
I’d like to take a shot at this and work within the constraints you mentioned (using metadata-based filenames, keeping the existing download flow, avoiding unnecessary dependencies, and adding proper E2E coverage).
I’ll make sure to follow the guidelines closely. Thanks again for the direction!
What will happen to this feature if this fix https://github.com/freeCodeCamp/freeCodeCamp/pull/66552 has already been deployed?
I caused a discrepancy between issues which could have been prevented. I am planning on handling the issue.
Hi! I would love to work on this issue if it's still available.
I'd like to take this one (Improve solution download format to ZIP project structure). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)
I'd like to take this one (Improve solution download format to ZIP project structure). I'll look into the root cause and follow up with a PR. (claiming via @LeonxLJX)
I'd like to take this one (Improve solution download format to ZIP project structure). I'll dig into the root cause and follow up with a PR shortly. (claiming via @LeonxLJX)