Describe a mood. Claude picks 50 songs. They land in your Spotify.
You type something like "late night drive, nostalgic" and get a playlist saved directly to your Spotify. Claude picks the tracks, the app searches Spotify for each one, and results stream to the UI as they resolve.
There's also a Related Artists mode — if you mention specific artists ("something like Radiohead"), it uses Spotify's artist graph instead of the LLM.
- Next.js 14 (App Router)
- NextAuth v5 beta
- Anthropic Claude API (claude-sonnet-4-6)
- Spotify Web API
- Supabase (PostgreSQL)
- TypeScript · Tailwind CSS · Framer Motion
git clone https://github.com/you/moodify
cd moodify
npm installCreate an app at developer.spotify.com. Add this redirect URI:
http://127.0.0.1:3000/api/auth/callback/spotify
Note: Spotify limits new apps to 5 users in development mode. Extended quota requires a registered business and 250k monthly active users — so this is essentially dev-only for indie projects.
Create a project at supabase.com and run supabase/schema.sql in the SQL editor.
cp .env.example .env.localFill in the values — see .env.example for details.
npm run devOpen http://127.0.0.1:3000 — not localhost. This is intentional. NextAuth v5 + Spotify OAuth breaks when the callback URL says localhost because NextRequest normalizes it internally. The workaround is in src/app/api/auth/[...nextauth]/route.ts.
Users get 2 playlists by default, enforced via Supabase. Change PLAYLIST_LIMIT in src/lib/db.ts and src/app/dashboard/page.tsx.
MIT