# milindk20/musicfy_py architecture

> Architecture diagram of the GitHub repository milindk20/musicfy_py, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/milindk20/musicfy_py
- Repository: https://github.com/milindk20/musicfy_py

## Overview

Musicfy_py is a cross-platform YouTube audio search-and-download application with Flask web interfaces for Linux and Windows. Users can request a single song or upload a CSV for batch processing; downloads are converted to MP3, stored, and made available individually or as a ZIP. A platform-selecting launcher and a separate Linux housekeeping utility support operation. The sampled app code shows the Linux implementation in detail; Windows has a parallel app, and the README documents its capabilities. Relationships for unsampled UI and operational details rely on README statements.

Main entry points: [`Linux/app_combined.py`](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py) (Linux Flask app), [`Windows/app_combined.py`](https://github.com/milindk20/musicfy_py/blob/main/Windows/app_combined.py) (Windows Flask app), [`housekeeping_linux.py`](https://github.com/milindk20/musicfy_py/blob/main/housekeeping_linux.py) (Old-file cleanup), [`master_launcher.py`](https://github.com/milindk20/musicfy_py/blob/main/master_launcher.py) (OS launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interfaces"]
  node_linux_app["Linux Flask app<br/>[app_combined.py]"]
  node_linux_ui["Linux web UI<br/>[index.html]"]
  node_windows_app["Windows Flask app<br/>[app_combined.py]"]
  node_windows_ui["Windows web UI<br/>[index.html]"]
end

subgraph group_download["Download processing"]
  node_single_request["Single-song request<br/>[app_combined.py]"]
  node_csv_batch["CSV batch processing<br/>[app_combined.py]"]
  node_song_downloader["Song downloader<br/>[app_combined.py]"]
end

subgraph group_storage["Files and cleanup"]
  node_download_store[("Download folder")]
  node_file_download["Single-file download<br/>[app_combined.py]"]
  node_zip_export["ZIP export<br/>[app_combined.py]"]
  node_housekeeping["Old-file cleanup"]
end

subgraph group_platform["Platform setup"]
  node_linux_config["Linux download config<br/>[config.py]"]
  node_windows_config["Windows download config<br/>[config.py]"]
  node_launcher["OS launcher<br/>[master_launcher.py]"]
end

node_user(("User"))
node_youtube["YouTube search"]
node_ffmpeg["FFmpeg conversion"]

node_user -->|"submits request"| node_linux_app
node_user -->|"submits request"| node_windows_app
node_linux_app -->|"renders"| node_linux_ui
node_windows_app -->|"renders"| node_windows_ui
node_linux_app -->|"routes request"| node_single_request
node_linux_app -->|"routes upload"| node_csv_batch
node_single_request -->|"calls"| node_song_downloader
node_csv_batch -->|"calls per row"| node_song_downloader
node_song_downloader -->|"searches and downloads"| node_youtube
node_song_downloader -->|"converts audio"| node_ffmpeg
node_linux_app -->|"imports settings"| node_linux_config
node_windows_app -.->|"uses settings"| node_windows_config
node_song_downloader -->|"writes MP3"| node_download_store
node_linux_app -->|"serves file"| node_file_download
node_file_download -->|"reads file"| node_download_store
node_linux_app -->|"creates ZIP"| node_zip_export
node_zip_export -->|"reads MP3s"| node_download_store
node_linux_app -->|"serves ZIP"| node_zip_export
node_housekeeping -->|"imports folder"| node_linux_config
node_housekeeping -->|"deletes old files"| node_download_store
node_launcher -->|"selects on Linux"| node_linux_app
node_launcher -->|"selects on Windows"| node_windows_app

click node_linux_app "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_linux_ui "https://github.com/milindk20/musicfy_py/blob/main/Linux/templates/index.html"
click node_windows_app "https://github.com/milindk20/musicfy_py/blob/main/Windows/app_combined.py"
click node_windows_ui "https://github.com/milindk20/musicfy_py/blob/main/Windows/templates/index.html"
click node_single_request "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_csv_batch "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_song_downloader "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_linux_config "https://github.com/milindk20/musicfy_py/blob/main/Linux/config.py"
click node_windows_config "https://github.com/milindk20/musicfy_py/blob/main/Windows/config.py"
click node_file_download "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_zip_export "https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py"
click node_housekeeping "https://github.com/milindk20/musicfy_py/blob/main/housekeeping_linux.py"
click node_launcher "https://github.com/milindk20/musicfy_py/blob/main/master_launcher.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_linux_app,node_linux_ui,node_windows_app,node_windows_ui,node_user toneBlue
class node_single_request,node_csv_batch,node_song_downloader toneAmber
class node_download_store,node_file_download,node_zip_export,node_housekeeping toneMint
class node_linux_config,node_windows_config,node_launcher toneRose
class node_youtube,node_ffmpeg toneIndigo
```

## Components

### Web interfaces

- [Linux Flask app](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`
- [Linux web UI](https://github.com/milindk20/musicfy_py/blob/main/Linux/templates/index.html): `Linux/templates/index.html`
- [Windows Flask app](https://github.com/milindk20/musicfy_py/blob/main/Windows/app_combined.py): `Windows/app_combined.py`
- [Windows web UI](https://github.com/milindk20/musicfy_py/blob/main/Windows/templates/index.html): `Windows/templates/index.html`

### Download processing

- [Single-song request](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`
- [CSV batch processing](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`
- [Song downloader](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`

### Files and cleanup

- **Download folder**
- [Single-file download](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`
- [ZIP export](https://github.com/milindk20/musicfy_py/blob/main/Linux/app_combined.py): `Linux/app_combined.py`
- [Old-file cleanup](https://github.com/milindk20/musicfy_py/blob/main/housekeeping_linux.py): `housekeeping_linux.py`

### Platform setup

- [Linux download config](https://github.com/milindk20/musicfy_py/blob/main/Linux/config.py): `Linux/config.py`
- [Windows download config](https://github.com/milindk20/musicfy_py/blob/main/Windows/config.py): `Windows/config.py`
- [OS launcher](https://github.com/milindk20/musicfy_py/blob/main/master_launcher.py): `master_launcher.py`

### Other components

- **User**
- **YouTube search**
- **FFmpeg conversion**

## Connections

- User → Linux Flask app: submits request (evidence: `README.md`)
- User → Windows Flask app: submits request (evidence: `README.md`)
- Linux Flask app → Linux web UI: renders (evidence: `README.md`)
- Windows Flask app → Windows web UI: renders (evidence: `README.md`)
- Linux Flask app → Single-song request: routes request (evidence: `Linux/app_combined.py`)
- Linux Flask app → CSV batch processing: routes upload (evidence: `Linux/app_combined.py`)
- Single-song request → Song downloader: calls (evidence: `Linux/app_combined.py`)
- CSV batch processing → Song downloader: calls per row (evidence: `Linux/app_combined.py`)
- Song downloader → YouTube search: searches and downloads (evidence: `Linux/app_combined.py`)
- Song downloader → FFmpeg conversion: converts audio (evidence: `Linux/app_combined.py`)
- Linux Flask app → Linux download config: imports settings (evidence: `Linux/app_combined.py`)
- Windows Flask app → Windows download config: uses settings
- Song downloader → Download folder: writes MP3 (evidence: `Linux/app_combined.py`)
- Linux Flask app → Single-file download: serves file (evidence: `Linux/app_combined.py`)
- Single-file download → Download folder: reads file (evidence: `Linux/app_combined.py`)
- Linux Flask app → ZIP export: creates ZIP (evidence: `Linux/app_combined.py`)
- ZIP export → Download folder: reads MP3s (evidence: `Linux/app_combined.py`)
- Linux Flask app → ZIP export: serves ZIP (evidence: `Linux/app_combined.py`)
- Old-file cleanup → Linux download config: imports folder (evidence: `housekeeping_linux.py`)
- Old-file cleanup → Download folder: deletes old files (evidence: `housekeeping_linux.py`)
- OS launcher → Linux Flask app: selects on Linux (evidence: `master_launcher.py`)
- OS launcher → Windows Flask app: selects on Windows (evidence: `master_launcher.py`)
