A premium Progressive Web App music player with Royal Purple Glassmorphism aesthetic.
/song/[youtubeId] with Open Graph metadatanpm install
npm run dev
npm run build
npm start
The app works with demo songs out of the box. To enable live YouTube search:
purple-music-app/
βββ pages/
β βββ _app.tsx # App wrapper, Head meta
β βββ _document.tsx # HTML document, fonts
β βββ index.tsx # Home β trending songs
β βββ search.tsx # Search with categories
β βββ library.tsx # Liked, Recent, Playlists
β βββ settings.tsx # All settings + EQ
β βββ song/[id].tsx # Shareable song page
βββ components/
β βββ Layout.tsx # App shell with sidebar
β βββ Sidebar.tsx # Navigation sidebar
β βββ MiniPlayer.tsx # Bottom player + fullscreen
β βββ SongCard.tsx # Song card (grid + row)
β βββ GreetingModal.tsx # Welcome screen with voice
β βββ Equalizer.tsx # EQ UI component
βββ hooks/
β βββ useYouTubeSearch.ts # YouTube API + demo songs
β βββ useAudioEngine.ts # Web Audio API + Media Session
β βββ useLyrics.ts # LRC parser + sync
β βββ useTranslation.ts # i18n hook
βββ store/
β βββ musicStore.ts # Zustand state (player, settings, library)
β βββ translations.ts # EN + ID translations
βββ styles/
β βββ globals.css # Tailwind + custom CSS
βββ public/
βββ manifest.json # PWA manifest
βββ icons/ # App icons
Songs use this JSON structure:
{
"id": "unique-id",
"title": "Song Title",
"artist": "Artist Name",
"youtubeId": "YouTube video ID",
"thumbnail": "https://i.ytimg.com/vi/VIDEO_ID/mqdefault.jpg",
"lyrics": "[00:00.00] First line\n[00:05.00] Second line\n..."
}
| Tool | Purpose |
|---|---|
| Next.js 14 | React framework + routing |
| Tailwind CSS | Utility-first styling |
| Framer Motion | Animations |
| Zustand | State management |
| next-pwa | PWA / Service Worker |
| Web Audio API | Equalizer + audio processing |
| Media Session API | Lock screen controls |
| YouTube Data API v3 | Music search |
On Android: tap βAdd to Home Screenβ in Chrome menu On Desktop: click the install icon in the address bar
MIT