A modern Next.js application for managing party song requests using Spotify integration.
- Frontend: Next.js 15 (App Router), React 19, Tailwind CSS
- Backend: Convex (real-time database and serverless functions)
- Authentication: Convex Auth with Email OTP via Resend
- Music: Spotify API integration
npm installCreate a free account at convex.dev and run:
npx convex devThis will prompt you to create a new project and set up the deployment.
Copy the example environment file:
cp .env.example .env.localFill in the following variables:
NEXT_PUBLIC_CONVEX_URL: Your Convex deployment URL (set automatically byconvex dev)
Get these from your Resend dashboard:
RESEND_API_KEY: Your Resend API keyRESEND_FROM_EMAIL: Your verified sender email (e.g.,noreply@yourdomain.com)
Create an app at Spotify Developer Dashboard:
SPOTIFY_CLIENT_ID: Your Spotify app client IDSPOTIFY_CLIENT_SECRET: Your Spotify app client secretSPOTIFY_REFRESH_TOKEN: A refresh token with appropriate scopes
Set these as Convex environment variables:
npx convex env set RESEND_API_KEY your_api_key
npx convex env set RESEND_FROM_EMAIL your_from_email
npx convex env set SPOTIFY_CLIENT_ID your_client_id
npx convex env set SPOTIFY_CLIENT_SECRET your_client_secret
npx convex env set SPOTIFY_REFRESH_TOKEN your_refresh_tokennpm run devThis starts both Next.js and Convex dev servers.
Open http://localhost:3000 to view the app.
- Email OTP Authentication: Secure sign-in via email verification
- Real-time Updates: All party data syncs in real-time
- Song Requests: Search Spotify and request songs
- Voting System: Vote for your favorite songs
- QR Code Sharing: Easy party joining via QR codes
- Dark Mode: Full dark/light theme support
- Responsive Design: Works on mobile and desktop
convex/parties.ts: Party CRUD operationsconvex/requests.ts: Song request managementconvex/spotify.ts: Spotify search actionconvex/resendOtp.ts: Email OTP provider for auth
OTP codes are logged to the console instead of being sent via email:
[DEV] OTP for user@example.com: 123456
MIT