A modern, responsive music player built with Next.js 15, TypeScript, and Supabase. Features cloud storage, real-time sync, and a beautiful UI with anime.js animations.
- 🎵 Audio Playback: Play, pause, stop, skip, previous/next
- 🔀 Shuffle & Repeat: Multiple repeat modes and shuffle functionality
- 📱 Responsive Design: Works on desktop and mobile
- 🎨 Modern UI: Beautiful animations with anime.js
- ☁️ Cloud Storage: Audio files stored in Supabase Storage
- 🗃️ Metadata Extraction: Automatic ID3 tag parsing
- ❤️ Favorites: Mark songs as favorites
- 📋 Playlists: Create and manage playlists
- 🔍 Search: Find songs by title, artist, or album
- 📊 Queue Management: Add songs to queue and reorder
- Frontend: Next.js 15 (App Router), TypeScript, React
- Styling: Tailwind CSS, anime.js animations
- Backend: Supabase (Postgres + Storage)
- State Management: Zustand
- Audio: HTML5 Audio API
- Metadata: music-metadata library
- Node.js 18+
- npm or yarn
- Supabase account
-
Clone and install dependencies:
git clone <repository-url> cd waVemusiC npm install
-
Setup Supabase:
- Create a new Supabase project
- Run the database migrations:
# Apply the initial schema supabase db push
- Or manually run the SQL files in
supabase/migrations/
-
Environment Variables: Create
.env.local
:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start the development server:
npm run dev
-
Upload your music:
# Upload all MP3 files from public/songs directory npm run upload:dir # Or upload individual files npm run upload path/to/song.mp3 # Extract metadata only (no upload) node scripts/upload.js song.mp3 --metadata-only
The CLI uploader supports multiple formats and automatically extracts metadata:
# Upload single file
node scripts/upload.js song.mp3
# Upload entire directory
node scripts/upload.js /path/to/music/folder/
# View metadata without uploading
node scripts/upload.js song.mp3 --metadata-only
- MP3
- WAV
- FLAC
- OGG
- M4A
POST /api/upload
- Upload audio files with metadata extractionGET /api/songs
- Get paginated song list with search/filterGET /api/stream/[id]
- Stream audio files with range supportGET /api/playlists
- Get user playlistsPOST /api/playlists
- Create new playlistPOST /api/favorites/[id]
- Toggle favorite status
The app uses the following main tables:
songs
- Audio file metadataplaylists
- User playlistsplaylist_songs
- Playlist-song relationshipsuser_favorites
- User favorite songsplayback_states
- Real-time playback state
├── app/ # Next.js app router pages
├── components/ # React components
├── contexts/ # React contexts
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
├── scripts/ # CLI tools
├── store/ # Zustand state management
└── supabase/ # Database migrations
MusicPlayer
- Main audio player componentAlbumCarousel
- Swiper-based album art carouselSearchBar
- Live search functionalityuseMusicStore
- Global state managementusePlayer
- Audio playback logic
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push
npm run build
npm start
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.
For issues and questions, please open a GitHub issue.