How ishgar14/music-website works
Project type and purpose
• This is a multi-page, mostly static “music listening” website (WT-Proj) built with plain HTML/CSS/JavaScript and one PHP endpoint for user registration.
• Its purpose is to allow users to browse music genres, view song lists, play songs, and (optionally) register/login to access premium content.
File structure
• Top-level HTML pages: index.html (home), genre.html, login.html, register.html, premium.html, about_us/about_us.html.
• CSS stylesheets alongside each page (index.css, genre.css, about_us.css, plus per-folder style.css files in each music genre).
• JavaScript controllers: each music-genre folder (e.g., music/EDM/script.js, music/LoFi/script.js) to drive dynamic behavior (playlists, audio controls).
• Media assets: all audio files organized by genre under music/<Genre>/songs.
• One backend script: register.php for handling user registration (implying a simple form POST to PHP).
• No explicit database or external services—likely flat-file or built-in PHP session storage if any.
Key architectural insights from README
• A simple website to listen to music; no mention of complex backend or external API.
• Everything is self-contained in the file hierarchy.
Main components
a. Client (Web Browser)
• Requests HTML/CSS/JS and media.
• Plays audio via browser’s audio engine.
b. Web Server
• Serves static files (HTML, CSS, JS, MP3s).
• Handles register.php form submissions.
c. File Storage
• Static assets on disk:
– HTML/CSS/JS in root and subfolders.
– Audio files under music/<Genre>/songs.
d. (Optional) Data Store
• If user data is persisted, illustrate either a flat file or simple database behind register.php.
e. (Optional) Session/Authentication Layer
• If login.html + PHP manage sessions, show session store.
Relationships & data flow
• Browser → HTTP GET → Web Server → serves HTML/CSS/JS → Browser renders UI.
• Browser → HTTP GET (audio file URL) → Web Server → streams MP3 → Browser audio player.
• Browser (form POST register.html) → HTTP POST → Web Server (register.php) → Data Store → HTTP 302 redirect/login success.
Architectural patterns/design principles
• Monolithic, file-based structure—no separate microservices.
• Clear separation of concerns: static assets vs. dynamic PHP endpoint.
• Client-heavy for UI logic (vanilla JS modules per genre).