Skip to content

hritsh/clanker-fm

Repository files navigation

clanker icon

clanker-fm

demo


what is this?

clanker-fm is an ai-powered bot that judges your spotify taste. you log in, clanker digs through your listening history, asks you a few pointed questions, and then delivers a roast you didn’t ask for but probably deserve.
it also connects you with other users who share your questionable taste.


✨ features at a glance

Category Highlights
🤖 AI Roast Interactive Q&A + instant AI reactions → final teardown, roast score, shareable card
📊 Metrics Variety score, basicness index, genre diversity, and listening pattern analytics
👥 Neighbours Similarity search (weighted Jaccard) → ranked matches, “mutual bad taste” callouts
🏠 Dashboard Terminal-style homepage with top artists/tracks/genres → fast, cached, responsive UI
🧩 Extras Export system (html2canvas), edge-cached APIs (<100ms), retry states, fully responsive

🛠 tech stack

Category Technology
Framework next.js 14 + app router
Auth nextauth.js (spotify)
Styling tailwind css
Animations framer-motion
AI openai api / gemini api
State react context + hooks
Export html2canvas
Database supabase postgresql
Deployment vercel

all features

🤖 ai roast — now with interrogation

clanker doesn’t just spit out a verdict — he makes you squirm first.

  • scanning recents: clanker looks through and roasts your recent played music, while processing the rest of the data in the background.
Scanning your Spotify data
step 1: scanning your spotify recently played
  • interactive q&a: 6 multiple-choice questions based on your own data (“which of these tracks screams ‘me, but a more annoying version’?”)

  • live responses: clanker reacts instantly to your picks with dry, surgical commentary

Interactive Q&A
step 2: interactive Q&A with snarky responses
  • final analysis: variety score, basicness index, most replayed track, “tracks of concern,” and emotional support artists
Final AI Roast
step 3: the final roast verdict and scores
  • verdict: a paragraph-long teardown of your taste, equal parts psychoanalysis and insult comedy
  • rating: a brutally honest score out of 10 (margin of error: 0)
  • exportable: save the roast card to share your shame
Exportable custom roast card
exportable custom roast card

📊 listening metrics

because numbers hurt more than words.

  • variety score — how adventurous you are (or aren’t)
  • basicness index — a polite way of saying “you listen to the same stuff as everyone else”
  • genre diversity — counts how many genres you actually touch
  • listening patterns — time-based habits, peaks, and troughs

👥 neighbours — find people as delusional as you

clanker will happily point out who else is stuck in your sonic bubble.

  • similarity search: weighted jaccard algorithm compares your top artists, tracks, and genres to other users
  • ranked list: most compatible “victims” shown with similarity %, common artists/tracks/genres
  • mutual bad taste: if you share questionable habits, clanker will call it out (“you both have terrible taste in experimental hip hop and alternative hip hop”)
  • shared delusions: lists the genres you both cling to
  • db-backed: powered by supabase postgresql so the database is updated in real-time every time someone signs up
Neighbours
find your musical neighbours (and mutual bad taste)

🏠 homepage

the calm before the roast.

  • terminal-style dashboard with your top artists, tracks, and genres
  • responsive and cached for instant reloads
  • persistent nav tabs so you can jump between sections without losing your place
  • clean, minimal, and just a little smug
Stats Dashboard
listening metrics dashboard

🧩 extra stuff

things clanker does because it can.

  • export system via html2canvas (stats + roast + album art)
  • edge-cached api routes for <100ms responses
  • graceful loading + retry states (clanker doesn’t panic)
  • mobile-friendly + fully responsive because most people will probably run this on their phones
  • light/dark mode support for inclusivity
mobile dark mobile light exportable roast card
light mode dark mode

🧠 why i built this

spotify wrapped is fine, but it’s once a year and has become way too boring and bland. i wanted something that:

  • was unserious and crude
  • tore your music taste apart
  • made me question my life choices
  • worked whenever I felt like it
  • could share and connect people with similar tastes
  • doubled as a playground for ai, similarity search, and rapid ui iteration
  • also, clanker needed a new hobby.

💡 inspiration

a few years back i remember coming across pudding.cool, which did a viral spotify “roast” —
funny, but it was static and rule-based (no real ai).

clanker.fm cranks it up:

  • actual ai roasts (openai / gemini)
  • interactive q&a tied to your own data
  • live commentary + neighbours with “mutual bad taste”

pudding walked so clanker could roast at scale.


🧩 architecture

data flow

  1. spotify oauth via nextauth.js
  2. ai roast generation (openai api and gemini api options) with interactive q&a
  3. fetch top tracks, artists, genres, patterns
  4. homepage sections populate with stats
  5. neighbours query supabase postgresql db + compute similarity (weighted jaccard algorithm)
  6. export custom roast card via html2canvas

🚀 performance & ux

  • local caching for roast, stats, neighbour matches
  • responsive design from mobile to desktop
  • edge-cached api routes for speed
  • minimal loading states, no unnecessary spinners

🧠 prompt & token optimisation

clanker used to run on multiple prompts and API calls — one for scanning comments, another for the Q&A, another for the final verdict, plus a few extras.

this meant:

  • repeated injection of the same spotify data
  • higher token usage (and cost)
  • more latency between roast stages
  • more places to update when tweaking tone or style
  • for the interactive Q&A, 6 separate API calls — one per question — slowing things down

now it’s down to just two prompts — one for scanning comments, one for the complete roast experience — and it precomputes all answers for the interactive Q&A in a single call, so the rest of the flow feels instant.

Before After
4–5 separate prompts & API calls 2 unified prompts
repeated data context in each call single data pass per stage
higher token usage & cost fewer tokens, cheaper runs
Q&A: 6 API calls (one per question) Q&A: precomputed answers in one call
more latency between steps faster, smoother roast flow

impact:

  • ~40% fewer tokens per roast
  • noticeably faster response times
  • instant Q&A interactions (no waiting between questions)
  • simpler, easier‑to‑maintain prompt definitions

🏗 development

git clone https://github.com/hritsh/clanker-fm.git
cd clanker-fm && npm install

cp .env.example .env.local
# add spotify creds, ai keys, db url

npm run dev

required env vars:

  • spotify developer app
  • openai or gemini api key
  • nextauth secret
  • supabase postgresql db keys

📜 license

MIT


built by hritish | source on github
"your playlist probably sucks" — clanker
+---+
|o_o|
|_-_|

About

get your music taste judged by a clanker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages