A comprehensive music guessing game featuring your favorite K-pop artists! Test your knowledge of K-pop discographies by guessing songs from short audio previews.
- Daily Challenges: New song every day at midnight for each artist (same for all players)
- Practice Mode: Unlimited random songs for practice sessions
- Progressive Audio: Start with 1 second, gradually increase to 15 seconds
- Smart Autocomplete: Search through each artist's entire catalog with intelligent filtering
- Glassmorphism UI: Beautiful backdrop blur effects and modern aesthetics
- Artist-Specific Themes: Each artist has unique color schemes (auto-generated or custom)
- Responsive Design: Optimized for all devices with mobile-first approach
- Dark Theme: Elegant dark interface with smooth animations
- Dynamic Artist Artwork: Fetched from Apple Music API
- Game Statistics: Track your performance and accuracy over time
- Share Results: Share your daily challenge results with friends
- Local Storage: Persistent game state and statistics
- Daily Rollover: Automatic detection of new daily challenges
Currently featuring 100+ K-pop artists including:
Girl Groups: TWICE, LE SSERAFIM, BLACKPINK, NewJeans, IVE, aespa, ITZY, Red Velvet, Girls' Generation, NMIXX, Kep1er, ILLIT, Dreamcatcher, MAMAMOO, GFRIEND, LOONA, WJSN, fromis_9, STAYC, KISS OF LIFE, BABYMONSTER, and more
Boy Groups: BTS, Stray Kids, SEVENTEEN, ENHYPEN, TXT, ATEEZ, NCT 127/DREAM/U, EXO, BIGBANG, Super Junior, SHINee, GOT7, MONSTA X, RIIZE, TREASURE, THE BOYZ, and more
Solo Artists: IU, Taeyeon, Sunmi, HyunA, G-Dragon, Taeyang, Baekhyun, Taemin, and more
- Choose Your Artist: Select from 100+ K-pop artists on the homepage
- Pick Your Mode: Daily Challenge (one song per day) or Practice Mode (unlimited)
- Listen & Guess: Start with 1 second of audio, guess the song title
- Progressive Reveals: Each wrong guess or skip gives you more audio time
- Win Condition: Guess correctly within 6 tries to win
- Share Results: Share your daily challenge performance with friends
| Try | Duration |
|---|---|
| 1 | 1 second |
| 2 | 2 seconds |
| 3 | 4 seconds |
| 4 | 7 seconds |
| 5 | 10 seconds |
| 6 | 15 seconds (final) |
- Node.js 18+ and npm
- Apple Music Developer Token (for API access)
- Modern browser with HTML5 audio support
- Clone the repository
git clone https://github.com/retlocpeck/heardle.git
cd heardle- Install dependencies
npm install- Set up environment variables
Create a
.env.localfile:
APPLE_MUSIC_DEV_TOKEN=your_apple_music_jwt_token
APPLE_MUSIC_KEY_ID=your_key_id
APPLE_MUSIC_TEAM_ID=your_team_id- Generate Apple Music token (if needed)
node scripts/generate-apple-music-token.js- Pre-fetch song data (recommended for production)
npm run prefetch- Run development server
npm run dev- Open in browser Navigate to http://localhost:3000
npm run build:full # Includes prefetch step
npm start- Framework: Next.js 15 with App Router
- Language: TypeScript for type safety
- Styling: Tailwind CSS 4 with custom glassmorphism components
- Audio: HTML5 Audio API with custom controls
- Data Source: Apple Music API with static pre-generation
- Analytics: Vercel Speed Insights for performance monitoring
Apple Music API โ Pre-fetch Script โ Static JSON โ Runtime Cache โ Game Logic โ Audio Player
The project uses a static pre-generation strategy:
- Build Time:
npm run prefetchfetches all artist catalogs from Apple Music API - Runtime: API routes serve pre-cached JSON data (no live API calls needed)
- Fallback: If cache misses, falls back to live Apple Music API
heardle/
โโโ public/
โ โโโ data/ # Pre-fetched static data
โ โ โโโ songs/ # Artist song catalogs (JSON)
โ โ โโโ artwork/ # Artist artwork URLs (JSON)
โ โ โโโ summary.json # Prefetch metadata
โ โโโ favicons/ # Favicon assets
โโโ scripts/
โ โโโ prefetch-songs.js # Song/artwork pre-fetcher
โ โโโ generate-apple-music-token.js
โโโ src/
โ โโโ app/ # Next.js App Router
โ โ โโโ [artist]/ # Dynamic artist game pages
โ โ โโโ api/[artist]/ # Artist API routes
โ โโโ components/
โ โ โโโ game/ # Game components
โ โ โโโ stats/ # Statistics components
โ โ โโโ ui/ # Reusable UI components
โ โโโ config/
โ โ โโโ artists.ts # Artist configurations
โ โ โโโ theme.ts # Theme generation
โ โโโ lib/
โ โโโ hooks/ # Custom React hooks
โ โโโ services/ # Business logic
โ โ โโโ appleMusicService.ts
โ โ โโโ cachedDataService.ts
โ โ โโโ trackFilters.ts
โ โโโ utils/ # Utility functions
โโโ keys/ # Apple Music API keys (gitignored)
โโโ docs/ # Documentation
-
GET /api/[artist]/daily- Get today's daily challenge song- Query:
?date=YYYY-MM-DD(optional)
- Query:
-
GET /api/[artist]/random- Get random song for practice mode- Query:
?exclude=trackId1,trackId2(optional)
- Query:
-
GET /api/[artist]/songs- Get all songs for artist -
GET /api/[artist]/artwork- Get artist artwork URLs
- Complete catalogs: Full artist discographies including Japanese/Korean releases
- High-quality previews: 30-second AAC audio files
- Artist artwork: High-resolution artist images and banners
- Multi-storefront: Queries US, Japan, and Korea storefronts for complete coverage
Songs are filtered to ensure quality gameplay:
- Removes remixes, instrumentals, live versions
- Filters out non-English titles (Korean/Japanese characters)
- Removes intros, outros, skits, and interludes
- Deduplicates versions (keeps shortest/simplest)
- Add to configuration in
src/config/artists.ts:
{ id: 'artist-slug', name: 'Artist Name', displayName: 'Display Name', searchTerms: ['Artist Name', '์ํฐ์คํธ'] }- Run prefetch to generate data:
npm run prefetch- Deploy - Artist automatically appears with auto-generated theme
See docs/ARTIST_CONFIGURATION.md for detailed setup.
npm run dev # Development server (Turbopack)
npm run build # Production build
npm run build:full # Prefetch + build
npm run prefetch # Pre-fetch all artist data
npm run lint # ESLint
npm start # Production server"No songs found" Error
- Run
npm run prefetchto generate song data - Check that artist exists in
artists.ts - Verify Apple Music API token is valid
Audio Not Playing
- Check browser HTML5 audio support
- Some tracks may lack preview URLs
- Verify device audio permissions
Missing Artist Images
- Run
npm run prefetchto fetch artwork - Check network connectivity to Apple Music API
This project is licensed under the MIT License.
- Apple Inc. for the Apple Music API
- All K-pop artists and their entertainment companies
- Original Heardle game for the concept inspiration
- Next.js, Tailwind CSS, and Vercel for the amazing tools