A music discovery app built with React and TypeScript.
Browse tracks, albums, and artists using Spotify's API.
NextSound runs in two modes depending on your setup:
Without API credentials:
- Curated collection of 2024-2025 chart toppers
- Works immediately after
git cloneandnpm install - Real album artwork and track metadata
- Features artists like Billie Eilish, Harry Styles, Morgan Wallen, and more
Benefits:
- Perfect for trying out the app quickly
- No API setup required
- Images load from Spotify CDN
- Shows off the full UI
If you have Spotify API credentials:
- Real-time access to Spotify's music catalog
- Search across millions of tracks, albums, and artists
- Latest trending songs and new releases
- All features available
Requires:
- Spotify API credentials in
.envfile - Backend server running for CORS handling
The app automatically detects which mode to use.
You need Node.js 18+ and npm.
# Clone and install
git clone https://github.com/natashaongiscoding/music-app.git
cd music-app
npm install
# Start the app
npm run devOpen http://localhost:5173 - the app works immediately with demo data.
- Create a Spotify Developer Account and create a new app
- Get your Client ID and Client Secret from the app dashboard
- Copy
.env.exampleto.env:cp .env.example .env
- Add your credentials to
.env(remove the # comments):VITE_SPOTIFY_CLIENT_ID=your_client_id_here VITE_SPOTIFY_CLIENT_SECRET=your_client_secret_here
- Start with the backend:
npm run dev:full
# Run tests
npm test
# Run with coverage
npm run test:coveragenpm run build
npm run preview- Frontend: React 18, TypeScript, Vite, Tailwind CSS
- State: Redux Toolkit with RTK Query
- Routing: React Router v6
- Animations: Framer Motion
- Backend: Node.js, Express.js (CORS proxy)
- API: Spotify Web API
- Testing: Vitest, Playwright
CORS Errors with Spotify API
- Problem: API requests fail due to CORS restrictions
- Solution: Ensure the backend server is running (
npm run dev:fullornpm run server:dev) - Details: Spotify Web API cannot be called directly from browsers due to CORS policy
Missing Environment Variables
- Problem: App shows "No music data available" or API errors
- Solution: Check that
.envfile exists with valid Spotify credentials - Reference: See
SPOTIFY_SETUP.mdfor obtaining API credentials
Port Conflicts
- Frontend (Port 5173): Check if another Vite/dev server is running
- Backend (Port 3001): Check if another Express server is using the port
- Solution: Kill existing processes or modify port configuration
Build/TypeScript Errors
- Problem: TypeScript compilation errors during build
- Solution: Run
npm run buildto see specific error details - Common fix: Ensure all dependencies are installed (
npm install)
- See
SPOTIFY_SETUP.mdfor API setup guidance - Reach out to the NextWork community to ask your question!
Built with ❤️ for music lovers everywhere
Discover your next favorite track with NextSound

