How bihari2007/rawaniboy works
Project type and purpose
• This is a purely front-end, static “music streaming” website named “rawaniboy.”
• It consists of a single HTML entrypoint (index.html), a CSS file, a JavaScript file, a collection of MP3s organized by genre, and a CNAME for custom DNS.
• There is no dynamic backend or database—everything is served as static assets.
File structure
• Top-level:
• CNAME (custom domain)
• README.md
• ads.txt (advertising compliance)
• images/ (static images folder)
• index.html (SPA entrypoint)
• song.css (site styling)
• song.js (UI logic + song playback)
• songs/ (static MP3 repository)
• Under songs/, three genre subfolders: bhojpuri/, romantic/, sad/, each containing dozens of .mp3 files.
Key insights from the README
• README.md only states the project name “rawaniboy.”
• No additional architecture notes or dependencies—reinforces that this is a zero-backend, static site.
Main components
a. Client Browser (User Agent)
b. DNS / Custom Domain (CNAME record)
c. Static Hosting Platform (e.g., GitHub Pages, Netlify, AWS S3 + CloudFront)
d. Static Asset Store:
– index.html, song.css, song.js, images/
– songs/ (MP3 files)
e. External Services (optional): analytics, ad networks (ads.txt)
Relationships and data flows
1. User enters custom domain → DNS resolves to hosting platform.
2. Browser requests index.html → hosted by static server / CDN.
3. Browser downloads CSS, JS, images.
4. song.js reads the static folder structure (hard-coded list or pre-generated JSON) and displays genres + song list.
5. On user click → browser issues HTTP GET for chosen .mp3 file → streamed from static asset store / CDN to audio element.
6. Optionally, analytics / ad network beacons fire via JavaScript.
Architectural patterns and design principles
• Single–Page Application (SPA) pattern for the front end.
• Static-only architecture: minimal maintenance, high scalability via CDN.
• Folder-per-resource: MP3s organized by genre.
• Separation of concerns: index.html deals with layout, song.css handles styling, song.js manages playback & UI.
• Inside that cloud, place two sub-components: “Web Origin (S3 / GitHub Pages)” and “Edge Cache (CDN).”