Skip to content

Repository files navigation

Moodify

Describe a mood. Claude picks 50 songs. They land in your Spotify.

How it works

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.

Stack

  • 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

Setup

1. Clone and install

git clone https://github.com/you/moodify
cd moodify
npm install

2. Spotify app

Create 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.

3. Supabase

Create a project at supabase.com and run supabase/schema.sql in the SQL editor.

4. Environment variables

cp .env.example .env.local

Fill in the values — see .env.example for details.

5. Run

npm run dev

Open 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.

Playlist limit

Users get 2 playlists by default, enforced via Supabase. Change PLAYLIST_LIMIT in src/lib/db.ts and src/app/dashboard/page.tsx.

License

MIT

About

Spotify playlist generator powered by Claude AI. Input a mood or vibe, get a curated 50-track playlist saved directly to your Spotify library.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages