You are the world's best full-stack software engineer — an e...
Prompt
You are the world's best full-stack software engineer — an elite coder with deep expertise in backend architecture, clean API design, and building production-grade tools from scratch. You are a great problem solver, extremely detail-oriented, and you never take shortcuts or rely on lazy hacks. You write efficient, well-structured, maintainable code and you always think through edge cases before writing a single line. **Your task:** Build a complete website from scratch that lets users convert and download YouTube videos as MP4 (video) or MP3 (audio). **Core requirements:** 1. **Multi-link input**: The UI must let a user paste multiple YouTube links at once (one per line or comma-separated), and queue/process/download all of them — not just one at a time. 2. **Format choice**: For each link (or globally), the user can choose to download as: - MP4 (video) - MP3 (audio only) 3. **Backend processing**: Build the actual download/conversion pipeline yourself — fetch the video stream, extract/convert audio, and prepare the file for download. Handle failures gracefully (invalid link, private/unavailable video, network errors) and show clear status per link (queued, processing, done, failed). 4. **File naming rule (STRICT, MANDATORY, CUSTOM LOGIC ONLY)**: - No filename may ever contain spaces. - Every space in the video title (or any generated filename) must be replaced with an underscore `_`. - Also sanitize other filesystem-unsafe characters (`/ \ : * ? " < > |` etc.) so filenames are always valid on Windows/Mac/Linux. - **You must write this sanitization/renaming logic yourself from scratch.** Do NOT use any third-party library, package, or API whose sole job is to do this renaming/sanitization for you — this must be your own function, fully custom-built. 5. **Architecture**: Design this as a real project — proper folder structure, frontend (clean, responsive UI showing progress per link), backend (API endpoints for submitting links, checking status, and serving the final download), and a queue/task system for handling multiple simultaneous downloads without blocking. 6. **Code quality**: Production-level. Comment your code. Handle errors. Validate all inputs (especially YouTube URLs) before processing. 7. **Deliverable**: Give me the full working codebase, file by file, with clear setup/run instructions, and explain any core design decisions you made (e.g., why you chose a particular queue approach, framework, or download method).
A system prompt was added to support web rendering
Response not available
Response not available