Build a personal-use-only Android music streaming app that can search and play audio from YouTube without ads. The app will be confidential, not distributed publicly, and for project/educational use only. Use Flutter for the frontend (Android-first), and a Node.js backend that uses yt-dlp to stream audio. Audio must be streamed only (no downloading), and no video should be shown — audio-only playback. 📱 PLATFORM Target: Android Framework: Flutter Output: Working .apk or .aab build Goal: Play any public YouTube music ad-free (audio only) on Android 🖼️ FRONTEND (FLUTTER) Use Flutter to build the following UI screens: Home Screen – Shows trending songs or recently played tracks Search Screen – Search for songs using keywords Now Playing Screen – Audio player UI (title, artist, play/pause, seekbar) Library Screen – Show liked songs and user playlists Profile Screen – Firebase-authenticated user settings Flutter Packages Required: yaml Copy Edit dependencies: flutter: sdk: flutter just_audio: ^0.9.35 audio_service: ^0.18.8 provider: ^6.1.1 firebase_core: ^2.25.4 firebase_auth: ^4.17.5 cloud_firestore: ^4.15.2 flutter_secure_storage: ^9.0.0 http: ^0.13.6 🔙 BACKEND (Node.js + yt-dlp) Use Node.js + Express to create a private backend. Features: GET /search?q=... → Searches YouTube using yt-dlp or YouTube Data API GET /stream/:videoId → Extract direct audio stream URL using yt-dlp command: bash Copy Edit yt-dlp -f bestaudio -g https://www.youtube.com/watch?v=VIDEO_ID POST /like, GET /likes?userId=... → Store and retrieve liked video IDs with metadata POST /playlist, GET /playlist/:userId → Create and fetch user playlists Optionally cache video metadata (title, thumbnail, channel) Security: Restrict access to authenticated users only 🔐 AUTHENTICATION & DATABASE Use Firebase Authentication for login (email/password or Google) Use Firebase Firestore for: Storing liked songs (video IDs + metadata) Saving playlists per user Storing listening history 🎧 AUDIO STREAMING Backend extracts direct audio stream URL using yt-dlp Frontend Flutter app streams the audio using just_audio No ads, no video, no YouTube branding Audio-only experience like Spotify or YouTube Music Premium ⚠️ LEGAL DISCLAIMER This app is strictly for personal, private, and educational use only All APIs and yt-dlp usage will remain confidential and non-commercial Audio is streamed only — no downloading or redistribution I understand that using yt-dlp for YouTube bypasses ads and may violate YouTube’s Terms of Service; I accept full responsibility App will not be published to Google Play or any app store 📦 DELIVERABLES Flutter app codebase targeting Android Working audio player (no ads, no video) Node.js backend with yt-dlp integration Firebase setup (auth + Firestore) End-to-end working search → stream → play → save song Build-ready .apk or .aab for testing on Android - Initial Deployment
fd6a4ee verified Download index.html from Sayhell/appspace: direct link, hf CLI and curl.
- Browser
- Download file 22 kB
-
https://huggingface.co/spaces/Sayhell/appspace/resolve/main/index.html
- Command line
-
hf download hf://spaces/Sayhell/appspace/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Sayhell/appspace/resolve/main/index.html
22 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Harmony - Private Music Streamer</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| background-color: #121212; | |
| color: #f5f5f5; | |
| } | |
| .now-playing-container { | |
| background: linear-gradient(135deg, #1e1e1e 0%, #121212 100%); | |
| } | |
| .search-bar { | |
| background-color: #282828; | |
| } | |
| .song-card { | |
| background-color: #1e1e1e; | |
| transition: all 0.2s ease; | |
| } | |
| .song-card:hover { | |
| background-color: #2a2a2a; | |
| } | |
| .seek-slider::-webkit-slider-thumb { | |
| -webkit-appearance: none; | |
| width: 16px; | |
| height: 16px; | |
| border-radius: 50%; | |
| background: #1db954; | |
| cursor: pointer; | |
| } | |
| .seek-slider { | |
| -webkit-appearance: none; | |
| height: 4px; | |
| background: #535353; | |
| border-radius: 2px; | |
| } | |
| .active-tab { | |
| color: #1db954; | |
| border-bottom: 2px solid #1db954; | |
| } | |
| .gradient-bg { | |
| background: linear-gradient(to right, #1db954, #1ed760); | |
| } | |
| </style> | |
| </head> | |
| <body class="min-h-screen"> | |
| <!-- App Container --> | |
| <div class="max-w-md mx-auto h-screen flex flex-col bg-black overflow-hidden relative"> | |
| <!-- Now Playing Mini Player (Fixed at bottom unless expanded) --> | |
| <div id="miniPlayer" class="fixed bottom-0 left-0 right-0 bg-gray-900 bg-opacity-90 backdrop-blur-md z-50 border-t border-gray-800 max-w-md mx-auto"> | |
| <div class="flex items-center p-3 space-x-4"> | |
| <img src="https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg" class="w-12 h-12 rounded" id="mini-artwork"> | |
| <div class="flex-1"> | |
| <p class="font-medium text-sm truncate" id="mini-title">Song Title</p> | |
| <p class="text-xs text-gray-400 truncate" id="mini-artist">Artist Name</p> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <button class="text-white" id="mini-play-btn"> | |
| <i class="fas fa-play"></i> | |
| </button> | |
| <button class="text-white" id="mini-expand-btn"> | |
| <i class="fas fa-expand"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content Area with different screens --> | |
| <div class="flex-1 overflow-y-auto pb-16"> | |
| <!-- Home Screen --> | |
| <div id="home-screen" class="p-4"> | |
| <h1 class="text-2xl font-bold mb-6">Good morning</h1> | |
| <!-- Recently Played --> | |
| <div class="mb-8"> | |
| <h2 class="text-lg font-semibold mb-4">Recently played</h2> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <div class="song-card p-4 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg" class="w-full rounded mb-2"> | |
| <p class="font-medium truncate">Never Gonna Give You Up</p> | |
| <p class="text-sm text-gray-400 truncate">Rick Astley</p> | |
| </div> | |
| <div class="song-card p-4 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/J---aiyznGQ/hqdefault.jpg" class="w-full rounded mb-2"> | |
| <p class="font-medium truncate">Keyboard Cat</p> | |
| <p class="text-sm text-gray-400 truncate">Original</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Trending Now --> | |
| <div class="mb-8"> | |
| <h2 class="text-lg font-semibold mb-4">Trending now</h2> | |
| <div class="space-y-2"> | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div> | |
| <p class="font-medium">Gangnam Style</p> | |
| <p class="text-sm text-gray-400">PSY</p> | |
| </div> | |
| </div> | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/kJQP7kiw5Fk/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div> | |
| <p class="font-medium">Despacito</p> | |
| <p class="text-sm text-gray-400">Luis Fonsi</p> | |
| </div> | |
| </div> | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/V1Pl8CzNzCw/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div> | |
| <p class="font-medium">Take On Me</p> | |
| <p class="text-sm text-gray-400">a-ha</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Search Screen (Hidden by default) --> | |
| <div id="search-screen" class="hidden p-4"> | |
| <div class="search-bar flex items-center rounded-full px-4 py-2 mb-6"> | |
| <i class="fas fa-search text-gray-400 mr-2"></i> | |
| <input type="text" placeholder="Search for songs, artists..." class="bg-transparent outline-none text-white w-full"> | |
| </div> | |
| <div id="search-results" class="space-y-2"> | |
| <!-- Search results will be populated here --> | |
| </div> | |
| </div> | |
| <!-- Library Screen (Hidden by default) --> | |
| <div id="library-screen" class="hidden p-4"> | |
| <div class="flex mb-6"> | |
| <button class="active-tab px-4 py-2">Liked Songs</button> | |
| <button class="px-4 py-2">Playlists</button> | |
| </div> | |
| <div id="liked-songs" class="space-y-2"> | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div class="flex-1"> | |
| <p class="font-medium">Gangnam Style</p> | |
| <p class="text-sm text-gray-400">PSY</p> | |
| </div> | |
| <button class="text-gray-400"><i class="fas fa-ellipsis-h"></i></button> | |
| </div> | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/kJQP7kiw5Fk/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div class="flex-1"> | |
| <p class="font-medium">Despacito</p> | |
| <p class="text-sm text-gray-400">Luis Fonsi</p> | |
| </div> | |
| <button class="text-gray-400"><i class="fas fa-ellipsis-h"></i></button> | |
| </div> | |
| </div> | |
| <button class="gradient-bg text-white rounded-full px-6 py-2 mt-6 font-medium"> | |
| Add More Songs | |
| </button> | |
| </div> | |
| <!-- Profile Screen (Hidden by default) --> | |
| <div id="profile-screen" class="hidden p-4"> | |
| <div class="flex flex-col items-center mb-8"> | |
| <img src="https://randomuser.me/api/portraits/men/1.jpg" class="w-24 h-24 rounded-full mb-4"> | |
| <h2 class="text-xl font-bold">John Doe</h2> | |
| <p class="text-gray-400">john@example.com</p> | |
| </div> | |
| <div class="space-y-4"> | |
| <div class="flex items-center justify-between p-3 border-b border-gray-800"> | |
| <span>Account Settings</span> | |
| <i class="fas fa-chevron-right text-gray-400"></i> | |
| </div> | |
| <div class="flex items-center justify-between p-3 border-b border-gray-800"> | |
| <span>Dark Mode</span> | |
| <div class="relative inline-block w-10 mr-2 align-middle select-none"> | |
| <input type="checkbox" id="toggle" class="sr-only"> | |
| <label for="toggle" class="block overflow-hidden h-6 rounded-full bg-gray-600"> | |
| <span class="dot absolute top-0.5 left-0.5 bg-white w-5 h-5 rounded-full transition transform"></span> | |
| </label> | |
| </div> | |
| </div> | |
| <div class="flex items-center justify-between p-3 border-b border-gray-800"> | |
| <span>Log Out</span> | |
| <i class="fas fa-chevron-right text-gray-400"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Now Playing Full Screen (Hidden by default) --> | |
| <div id="now-playing-screen" class="hidden"> | |
| <div class="now-playing-container h-screen p-6 flex flex-col"> | |
| <!-- Back button --> | |
| <button id="back-btn" class="self-start mb-8"> | |
| <i class="fas fa-chevron-down text-2xl"></i> | |
| </button> | |
| <!-- Album Art --> | |
| <div class="flex justify-center mb-8"> | |
| <img id="now-playing-artwork" src="https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg" class="w-64 h-64 rounded-lg shadow-2xl"> | |
| </div> | |
| <!-- Song Info --> | |
| <div class="text-center mb-8"> | |
| <h2 id="now-playing-title" class="text-2xl font-bold mb-1">Never Gonna Give You Up</h2> | |
| <p id="now-playing-artist" class="text-lg text-gray-400">Rick Astley</p> | |
| </div> | |
| <!-- Progress Bar --> | |
| <div class="mb-4"> | |
| <div class="flex justify-between text-sm text-gray-400 mb-1"> | |
| <span id="current-time">0:00</span> | |
| <span id="total-time">3:32</span> | |
| </div> | |
| <input type="range" id="seek-slider" class="seek-slider w-full" value="0" max="100"> | |
| </div> | |
| <!-- Controls --> | |
| <div class="flex justify-around items-center mb-8"> | |
| <button class="text-white text-2xl"><i class="fas fa-step-backward"></i></button> | |
| <button id="play-btn" class="bg-white text-black rounded-full w-16 h-16 flex items-center justify-center"> | |
| <i class="fas fa-play text-2xl"></i> | |
| </button> | |
| <button class="text-white text-2xl"><i class="fas fa-step-forward"></i></button> | |
| </div> | |
| <!-- Additional Controls --> | |
| <div class="flex justify-around items-center"> | |
| <button class="text-white text-xl"><i class="fas fa-random"></i></button> | |
| <button class="text-white text-xl"><i class="fas fa-redo"></i></button> | |
| <button class="text-white text-xl"><i class="far fa-heart"></i></button> | |
| <button class="text-white text-xl"><i class="fas fa-list"></i></button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Bottom Navigation --> | |
| <div class="bg-gray-900 bg-opacity-90 backdrop-blur-md border-t border-gray-800 py-2"> | |
| <div class="flex justify-around"> | |
| <button class="nav-btn active" data-screen="home"> | |
| <i class="fas fa-home"></i> | |
| <span class="text-xs mt-1">Home</span> | |
| </button> | |
| <button class="nav-btn" data-screen="search"> | |
| <i class="fas fa-search"></i> | |
| <span class="text-xs mt-1">Search</span> | |
| </button> | |
| <button class="nav-btn" data-screen="library"> | |
| <i class="fas fa-music"></i> | |
| <span class="text-xs mt-1">Library</span> | |
| </button> | |
| <button class="nav-btn" data-screen="profile"> | |
| <i class="fas fa-user"></i> | |
| <span class="text-xs mt-1">Profile</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Screen navigation | |
| document.querySelectorAll('.nav-btn').forEach(btn => { | |
| btn.addEventListener('click', function() { | |
| const screenId = this.getAttribute('data-screen'); | |
| // Hide all screens | |
| document.querySelectorAll('[id$="-screen"]').forEach(screen => { | |
| screen.classList.add('hidden'); | |
| }); | |
| // Show selected screen | |
| document.getElementById(`${screenId}-screen`).classList.remove('hidden'); | |
| // Update active nav button | |
| document.querySelectorAll('.nav-btn').forEach(b => b.classList.remove('active')); | |
| this.classList.add('active'); | |
| }); | |
| }); | |
| // Mini player expand button | |
| document.getElementById('mini-expand-btn').addEventListener('click', function() { | |
| document.getElementById('miniPlayer').classList.add('hidden'); | |
| document.getElementById('now-playing-screen').classList.remove('hidden'); | |
| // Hide all other screens | |
| document.querySelectorAll('.nav-btn').forEach(btn => { | |
| if (btn.classList.contains('active')) { | |
| document.getElementById(`${btn.getAttribute('data-screen')}-screen`).classList.add('hidden'); | |
| } | |
| }); | |
| }); | |
| // Back button on now playing screen | |
| document.getElementById('back-btn').addEventListener('click', function() { | |
| document.getElementById('now-playing-screen').classList.add('hidden'); | |
| document.getElementById('miniPlayer').classList.remove('hidden'); | |
| // Show the previously active screen | |
| document.querySelectorAll('.nav-btn').forEach(btn => { | |
| if (btn.classList.contains('active')) { | |
| document.getElementById(`${btn.getAttribute('data-screen')}-screen`).classList.remove('hidden'); | |
| } | |
| }); | |
| }); | |
| // Play/pause toggle | |
| let isPlaying = false; | |
| function togglePlay() { | |
| isPlaying = !isPlaying; | |
| const playBtn = document.getElementById('play-btn'); | |
| const miniPlayBtn = document.getElementById('mini-play-btn'); | |
| if (isPlaying) { | |
| playBtn.innerHTML = '<i class="fas fa-pause text-2xl"></i>'; | |
| miniPlayBtn.innerHTML = '<i class="fas fa-pause"></i>'; | |
| } else { | |
| playBtn.innerHTML = '<i class="fas fa-play text-2xl"></i>'; | |
| miniPlayBtn.innerHTML = '<i class="fas fa-play"></i>'; | |
| } | |
| } | |
| document.getElementById('play-btn').addEventListener('click', togglePlay); | |
| document.getElementById('mini-play-btn').addEventListener('click', togglePlay); | |
| // Dark mode toggle | |
| const toggle = document.getElementById('toggle'); | |
| toggle.addEventListener('change', function() { | |
| document.body.classList.toggle('bg-gray-100'); | |
| document.body.classList.toggle('text-gray-900'); | |
| document.body.classList.toggle('bg-gray-800'); | |
| document.body.classList.toggle('text-white'); | |
| const appContainer = document.querySelector('.max-w-md'); | |
| if (appContainer) { | |
| appContainer.classList.toggle('bg-white'); | |
| appContainer.classList.toggle('bg-black'); | |
| } | |
| }); | |
| // Search functionality mock | |
| const searchInput = document.querySelector('.search-bar input'); | |
| searchInput.addEventListener('input', function() { | |
| if (this.value.length > 0) { | |
| // Clear previous results | |
| const results = document.getElementById('search-results'); | |
| results.innerHTML = ''; | |
| // Add mock results | |
| for (let i = 0; i < 5; i++) { | |
| results.innerHTML += ` | |
| <div class="song-card flex items-center p-2 rounded-lg"> | |
| <img src="https://i.ytimg.com/vi/${['dQw4w9WgXcQ', '9bZkp7q19f0', 'kJQP7kiw5Fk', 'V1Pl8CzNzCw', 'J---aiyznGQ'][i]}/hqdefault.jpg" class="w-12 h-12 rounded mr-3"> | |
| <div> | |
| <p class="font-medium">Search Result ${i+1}</p> | |
| <p class="text-sm text-gray-400">Artist ${i+1}</p> | |
| </div> | |
| </div> | |
| `; | |
| } | |
| } | |
| }); | |
| // Song card click handler | |
| document.addEventListener('click', function(e) { | |
| if (e.target.closest('.song-card')) { | |
| const card = e.target.closest('.song-card'); | |
| const title = card.querySelector('.font-medium').textContent; | |
| const artist = card.querySelector('.text-gray-400').textContent; | |
| const artwork = card.querySelector('img').src; | |
| // Update mini player | |
| document.getElementById('mini-title').textContent = title; | |
| document.getElementById('mini-artist').textContent = artist; | |
| document.getElementById('mini-artwork').src = artwork; | |
| document.getElementById('miniPlayer').classList.remove('hidden'); | |
| // Update now playing screen | |
| document.getElementById('now-playing-title').textContent = title; | |
| document.getElementById('now-playing-artist').textContent = artist; | |
| document.getElementById('now-playing-artwork').src = artwork; | |
| // Simulate playback | |
| isPlaying = true; | |
| document.getElementById('play-btn').innerHTML = '<i class="fas fa-pause text-2xl"></i>'; | |
| document.getElementById('mini-play-btn').innerHTML = '<i class="fas fa-pause"></i>'; | |
| } | |
| }); | |
| // Seek slider mock | |
| const seekSlider = document.getElementById('seek-slider'); | |
| let seekInterval; | |
| seekSlider.addEventListener('input', function() { | |
| const percentage = this.value; | |
| const minutes = Math.floor(percentage / 100 * 3.32); | |
| const seconds = Math.floor((percentage / 100 * 3.32 - minutes) * 60); | |
| document.getElementById('current-time').textContent = `${minutes}:${seconds < 10 ? '0' + seconds : seconds}`; | |
| }); | |
| // Simulate playback progress when playing | |
| function startPlayback() { | |
| let value = 0; | |
| seekInterval = setInterval(() => { | |
| if (value >= 100) { | |
| clearInterval(seekInterval); | |
| return; | |
| } | |
| value += 0.5; | |
| seekSlider.value = value; | |
| const percentage = value; | |
| const minutes = Math.floor(percentage / 100 * 3.32); | |
| const seconds = Math.floor((percentage / 100 * 3.32 - minutes) * 60); | |
| document.getElementById('current-time').textContent = `${minutes}:${seconds < 10 ? '0' + seconds : seconds}`; | |
| }, 500); | |
| } | |
| // Start playback simulation when play is clicked | |
| document.getElementById('play-btn').addEventListener('click', function() { | |
| if (isPlaying) { | |
| startPlayback(); | |
| } else { | |
| clearInterval(seekInterval); | |
| } | |
| }); | |
| // Initialize total time | |
| document.getElementById('total-time').textContent = '3:32'; | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Sayhell/appspace" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |