How suhani3008/spotifyclone works
Project type and purpose
• This is a static, frontend-only “Spotify UI Clone.” It’s a single-page application (SPA) that mimics Spotify’s look and feel using HTML, CSS (or Tailwind), and vanilla JavaScript.
• There is no server-side logic or database; all data (song metadata and media) lives in your repository under Songs/….
File structure
• Top-level files:
• index.html – entry point & markup
• script.js – application logic: fetches JSON, handles playback, search, UI updates
• style.css + utility.css – custom styles or Tailwind utilities
• Songs/ directory: contains subfolders (e.g., “Atif Aslam,” “Sufi,” “romantic songs,” etc.), each with:
• .mp3 files (static audio assets)
• info.json (metadata for that artist/genre)
• No build scripts, no server code—this is purely static content.
README for additional insights
• Emphasizes responsive UI, simulated playback, modern search, playlist displays
• No mention of backend or external APIs—data is read locally
a. Main components
• User Agent (Browser)
• Static Host/CDN (where index.html, JS, CSS, JSON, MP3 live)
• Presentation Layer (HTML + CSS/Tailwind)
• Application Layer (script.js)
• Data Layer (Songs/*.info.json)
• Media Layer (Songs/*.mp3)
• External Libraries (Font Awesome or Lucide)
b. Relationships & interactions
1. Browser requests index.html, style.css, utility.css, script.js from Host
2. script.js fetches JSON metadata from the Songs/.../info.json files
3. Browser UI renders playlists/search results based on JSON
4. User clicks “Play” → script.js instructs the <audio> element to stream the .mp3 file
c. Architectural patterns
• Simple MVC-style separation:
• Model = local JSON files & audio assets
• View = HTML + CSS
• Controller = script.js handles user events, data fetch, DOM updates
• SPA pattern: all routing and UI state lives in the browser
d. Key technologies
• HTML5, CSS3/Tailwind CSS, JavaScript ES6+
• Static hosting (GitHub Pages, Netlify, etc.)