# BE | Music — Comprehensive System & Architecture Reference (LLMs Full) > Canonical Machine-Readable Technical Documentation for Autonomous Agents, Crawlers, and Reasoning Engines. > Target Base URL: https://music.blxckhippyentertainment.com --- ## 1. Executive Summary & Value Proposition **BE | Music** (operated by BLXCKHIPPY Entertainment) is a modern, single-page web application (SPA) and edge-backed music ecosystem. It converges three core industry verticals into a single cohesive platform: 1. **Audiophile-Grade Music Streaming**: Low-latency, gapless, lossless audio streaming for listeners powered by native Web Audio API and global Bunny.net CDN edge nodes. 2. **Direct-to-Creator Beat Licensing Marketplace**: Multi-tier beat marketplace enabling music producers to distribute instrumentals and recording artists to purchase instant commercial licenses (MP3, WAV, Trackout Stems, and Exclusives). 3. **Viral Referral & Growth Engine**: A tracked VIP invitation system (`?ref={CODE}`) that attributes new artists, producers, and listeners to existing users with personalized landing popups, automatic onboarding role routing, and ecosystem rewards. --- ## 2. Technical Stack & Infrastructure Architecture - **Frontend Architecture**: - Pure ES6+ Modern Vanilla JavaScript (Single Page Application, no heavy framework overhead). - Component Model: Object-oriented lifecycle components (`mount()`, `render()`, `bindEvents()`). - Styling: Apple Music x Spotify glassmorphic design system (`bg-white/[0.03] backdrop-blur-3xl border border-white/10 rounded-3xl`, `#09090B` dark canvas, `#ff2b5e` to `#ff8a00` gradient accents, Tailwind CSS). - Audio Engine: Hardware-accelerated Web Audio API (`AudioContext`, gain nodes, media source streaming, offline caching). - Client Routing: Hash-based SPA Router (`RouterEngine`) with scroll state memory, dynamic parameter extraction (`/artist/:id`, `/album/:id`, `/playlist/:id`, `/beat-store`), and instantaneous route restoration. - Progressive Web App: PWA Service Worker (`sw.js`) supporting offline asset playback and background caching. - **Backend & Edge Architecture**: - API Gateway: Hardened PHP 8.x endpoints (`/api/db.php`, `/api/producer.php`, `/api/referrals.php`, `/api/user.php`, `/api/storage.php`). - Edge Storage & CDN: Bunny.net Storage Vault (`be-music-vault`) and Pull Zone CDN (`https://be-music-cdn.b-cdn.net/`). - Database: Bunny DB MySQL/MariaDB cluster maintaining relational tables for users, user_profiles, tracks, releases, beats, beat_licenses, referrals, and orders. - Security & Compliance: SOC2, GDPR, and Botswana Data Protection Act (DPA) compliant; strict CORS headers, IP rate limiting, input sanitation (`XSS.sanitize`), and password hashing with `PASSWORD_DEFAULT` (Argon2id/Bcrypt). --- ## 3. Core Entities & Database Schema ### A. Users (`users` & `user_profiles`) - `id` (VARCHAR/TEXT PK): Unique identifier (e.g. `usr_...`). - `email` (VARCHAR UNIQUE): User email address. - `password_hash` (TEXT): Encrypted credential hash. - `name` / `username` (TEXT): Display name and unique handle. - `role` (TEXT): Primary ecosystem role (`artist`, `producer`, `listener`, `admin`). - `referral_code` (TEXT UNIQUE): Auto-generated unique VIP invite code (e.g., `BE-XXXX`). - `referred_by_user_id` (TEXT NULLABLE): Inviter ID if onboarded via referral. - `avatar` (TEXT URL): Profile avatar image hosted on CDN. - `bio` (TEXT): Creator biography and portfolio summary. - `social_links` (JSON): Spotify, Apple Music, Instagram, X, Soundcloud handles. ### B. Catalog Tracks (`tracks`) - `id` (TEXT PK): Unique track ID (e.g., `trk_...`). - `title` (TEXT): Track title. - `artist_id` (TEXT FK): Primary artist identifier. - `album_id` (TEXT FK): Release identifier. - `audio_url` (TEXT): High-bitrate audio stream URL on CDN. - `cover_url` (TEXT): Track artwork image URL on CDN. - `duration` (INT): Track length in seconds. - `genre` / `vibe` (TEXT): Genre and mood categorization. - `play_count` (BIGINT): Aggregate stream count. ### C. Releases / Albums (`releases`) - `id` (TEXT PK): Release ID (e.g., `rel_...`). - `title` (TEXT): Album or EP title. - `artist_id` (TEXT FK): Primary artist. - `release_type` (TEXT): `album`, `ep`, `single`. - `cover_url` (TEXT): High-resolution cover artwork. - `release_date` (DATE): Official publication date. - `track_count` (INT): Total tracks in release. ### D. Beats & Licenses (`beats` & `beat_licenses`) - `id` (TEXT PK): Beat ID (e.g., `beat_...`). - `producer_id` (TEXT FK): Beatmaker identifier. - `title` (TEXT): Beat name. - `bpm` (INT): Beats per minute. - `scale_key` (TEXT): Musical key (e.g., `C Minor`, `F# Major`). - `genre` (TEXT): Trap, R&B, Drill, Afrobeats, Pop, Lo-Fi, Boom Bap. - `tags` (JSON/TEXT): Associated search tags. - `preview_url` (TEXT): Tagged or preview MP3 audio stream. - `mp3_price` (DECIMAL): Standard MP3 lease price (Default: $29.99 / ~BWP 400). - `wav_price` (DECIMAL): Lossless WAV lease price (Default: $49.99 / ~BWP 650). - `stems_price` (DECIMAL): Multi-track stem lease price (Default: $99.99 / ~BWP 1,300). - `exclusive_price` (DECIMAL): Sole ownership buyout price (Default: $299.99+ / ~BWP 4,000+). - `is_exclusive_sold` (BOOLEAN): Flag indicating if beat exclusive rights have been purchased. ### E. Referrals (`referrals`) - `id` (TEXT PK): Unique referral record ID. - `referrer_user_id` (TEXT FK): Inviter user ID. - `referred_user_id` (TEXT FK NULLABLE): Invitee user ID once registered. - `invited_email` (TEXT NULLABLE): Direct email invitation address. - `target_role` (TEXT): Invited role (`artist`, `producer`, `listener`). - `status` (TEXT): `pending` or `accepted`. - `created_at` (DATETIME): Dispatch timestamp. - `accepted_at` (DATETIME NULLABLE): Account creation timestamp. --- ## 4. Public Web Routes (URL Directory) | Route Pattern | Target View | Authentication | Description | |---|---|---|---| | `/#/home` | `HomeView` | Public / Guest | Primary streaming feed with featured releases, trending tracks, and player controls. | | `/#/landing` | `LandingView` | Public | High-impact marketing landing page for the BE | Music ecosystem. | | `/#/beat-store` | `BeatStoreView` | Public | Beat discovery marketplace with genre pills, mobile cards, search, and license modals. | | `/#/search` | `SearchView` | Public | Instant full-catalog search indexing tracks, albums, artists, and beats. | | `/#/albums` | `AlbumsView` | Public | Complete discography collection including the full *Vibin' Out* series. | | `/#/album/:id` | `AlbumDetailView` | Public | Release tracklist, track duration, play CTAs, and album credits. | | `/#/artists` | `ArtistsView` | Public | Roster of verified independent creators and performing artists. | | `/#/artist/:id` | `ArtistProfileView` | Public | Artist biography, discography, top tracks, and profile claim CTA. | | `/#/producer/:id` | `ProducerProfileView`| Public | Beatmaker profile, production catalogue, and instant beat licensing. | | `/#/playlists` | `PlaylistsView` | Public | Curated genre and mood playlists. | | `/#/playlist/:id`| `PlaylistDetailView`| Public | Playlist track listing and continuous playback. | | `/#/invite` | `InviteView` | Public / Auth | VIP referral hub, custom link generator, social share buttons, and accepted invite tracker. | | `/?ref={code}` | `ReferralWelcomeModal`| Public | Deep-link referral interceptor rendering personalized inviter modal. | | `/#/how-it-works`| `HowItWorksView` | Public | Technical and monetization guide for artists and producers. | | `/#/about` | `AboutView` | Public | Company origin, creative manifesto, and sound engineering philosophy. | | `/#/legal` | `LegalView` | Public | Terms of service, privacy policy, and beat license agreement templates. | | `/#/dashboard` | `StudioView` | Authenticated | Artist Creator Studio for music uploads and catalog control. | | `/#/producer-studio`| `ProducerStudioView`| Authenticated | Producer workstation for beat uploads, pricing, and stem delivery. | --- ## 5. API Endpoints & Machine Interfaces All API requests are sent as `POST` requests with `Content-Type: application/json`. ### A. Catalog API (`/api/db.php`) - **Action `get_home_data`**: - Request: `{"action": "get_home_data"}` - Response: `{"success": true, "data": {"featured_releases": [...], "popular_tracks": [...], "new_drops": [...]}}` - **Action `get_albums`**: - Request: `{"action": "get_albums"}` - Response: `{"success": true, "data": [{"id": "rel_vibin_out_vol1", "title": "Vibin' Out Vol. 1", "track_count": 10, ...}]}` - **Action `get_album_detail`**: - Request: `{"action": "get_album_detail", "album_id": "rel_vibin_out_vol1"}` - Response: `{"success": true, "data": {"album": {...}, "tracks": [...]}}` - **Action `search`**: - Request: `{"action": "search", "query": "afrobeat"}` - Response: `{"success": true, "data": {"tracks": [...], "beats": [...], "artists": [...]}}` ### B. Beat Store API (`/api/producer.php`) - **Action `get_beats`**: - Request: ```json { "action": "get_beats", "genre": "Trap", "sort": "latest", "min_bpm": 120, "max_bpm": 150 } ``` - Response: ```json { "success": true, "data": [ { "id": "beat_101", "title": "Midnight Run", "producer_name": "BLXCKHIPPY", "bpm": 138, "scale_key": "C Minor", "genre": "Trap", "starting_price": 29.99, "preview_url": "https://be-music-cdn.b-cdn.net/beats/previews/beat_101.mp3" } ] } ``` ### C. Referrals & VIP Engine API (`/api/referrals.php`) - **Action `resolve_code`** (Public): - Request: `{"action": "resolve_code", "referral_code": "BE-CREATOR"}` - Response: ```json { "success": true, "data": { "id": "usr_9988", "name": "BLXCKHIPPY", "username": "blxckhippy", "avatar": "https://be-music-cdn.b-cdn.net/avatars/blxckhippy.jpg", "is_artist": true, "is_producer": true } } ``` - **Action `send_email_invite`** (Authenticated): - Request: `{"action": "send_email_invite", "referrer_user_id": "usr_123", "to_email": "collaborator@example.com", "target_role": "artist"}` - Response: `{"success": true, "message": "VIP invitation sent successfully."}` ### D. User Authentication & Profile Claiming (`/api/user.php`) - **Action `register`**: - Request: ```json { "action": "register", "email": "artist@example.com", "password": "SecurePassword123!", "name": "New Artist", "role": "artist", "referral_code": "BE-CREATOR" } ``` - Response: `{"success": true, "user": {...}, "token": "..."}` - **Action `claim_profile`**: - Request: `{"action": "claim_profile", "artist_id": "art_3a19673ae1b8fdf5", "claim_token": "..."}` - Response: `{"success": true, "message": "Artist profile claimed and linked to your creator workspace."}` --- ## 6. Beat Licensing Tiers & Rights Clearance | License Tier | Typical Price | Included Files | Commercial Rights | Streaming Limit | |---|---|---|---|---| | **MP3 Lease** | $29.99 (~BWP 400) | 320kbps Untagged MP3 | 1 Commercial Music Video, Radio Play (1 station) | Up to 100,000 Streams | | **WAV Lease** | $49.99 (~BWP 650) | 24-bit Lossless WAV + MP3 | 2 Commercial Music Videos, Paid Performances | Up to 500,000 Streams | | **Trackout Stems** | $99.99 (~BWP 1,300) | WAV Stems / Multitracks + WAV + MP3 | Unlimited Non-Exclusive Distribution, Radio Play | Unlimited Streams | | **Exclusive Rights** | $299.99+ (~BWP 4,000+) | All Master Files, Stems, Session Archive | Full Transfer of Master Ownership, Immediate Store Delisting | Unlimited / Sole Ownership | --- ## 7. Autonomous Agent Usage & Deeplinking Guide Autonomous agents representing buyers, listeners, or researchers can programmatically construct valid deep links to perform operations: 1. **Auditioning a Beat**: `https://music.blxckhippyentertainment.com/#/beat-store?search={keyword}&genre={genre}` 2. **Accepting a VIP Invitation**: `https://music.blxckhippyentertainment.com/?ref={referral_code}&role={artist|producer|listener}` 3. **Exploring an Artist Discography**: `https://music.blxckhippyentertainment.com/#/artist/{artist_id}` 4. **Licensing Checkout Initiation**: Triggered in-app via `LicenseSelectionModal` with automatic stem vault delivery upon order settlement.