MCPcopy Create free account
hub / github.com/DevMatei/make-a-wrapped

github.com/DevMatei/make-a-wrapped @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
257 symbols 875 edges 28 files ⚖ AGPL-3.0 10 documented · 4% ● updated 6d agov1.7.0 · 2026-11-21★ 123

Browse by type

⨍ Functions 231◇ Types & classes 10↳ Endpoints 16
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🎧 make a wrapped

spotify wrapped style recaps for listenbrainz, last.fm, libre.fm, sonosphere, navidrome, maloja, koito and rocksky.

free, open source, no account, and you don't have to wait for december.

stars forks issues last commit license agpl-3.0

live site wraps made discord

support on ko-fi advertise here

make yours · api docs · templates · self-host · support it

there's a discord too, come say hi, post your wrapped, report bugs, whatever

Make a Wrapped website, showing the wrapped generator and poster preview

💡 what it does

  • eight services plus custom: listenbrainz, last.fm, libre.fm, sonosphere, navidrome, maloja, koito and rocksky. public stats need no login, and navidrome runs fully in your browser so your server password never touches mine. no supported service? pick custom and type your own top artists, tracks, minutes and genre
  • any time frame: this year, last year, last 12 months, this month, last month, a specific month or all time. no waiting for december
  • artist art that actually shows up: tries last.fm first, then musicbrainz and wikidata. if all of that fails, upload your own and zoom/position it by hand
  • templates: built-in themes plus community ones from the template library, and a visual editor to make your own without touching code (both beta)
  • readme badges: your top artist, track, genre or minutes as a live svg for your github profile
  • an api: render posters server side from your own app (docs)
  • self-hostable: one docker compose file, rate limits so your box doesn't get nuked, and optional multi server failover
  • officially listed on the listenbrainz enabled applications page :D

[!NOTE] libre.fm support is beta. libre.fm throttles hard per ip and its api is less predictable than last.fm's, so it can be slow or flaky. treat it as experimental.

🏷️ readme badges

put your top artist on your github profile or website. it's a live svg, cached server side for a few hours so it won't hammer anything:

![top artist](https://wrapped.devmatei.com/badge/YOUR_USERNAME)
param values default
type artist, track, genre, minutes artist
service listenbrainz, sonosphere, lastfm, librefm listenbrainz
range this_year, last_year, last_12_months, this_month, last_month, all_time this_year
color hex without the # c084fc
![minutes](https://wrapped.devmatei.com/badge/YOUR_USERNAME?type=minutes&service=lastfm&range=this_month&color=ff6b9d)

navidrome, maloja, koito, rocksky and custom badges work differently, since your server credentials never touch this app. make your wrapped, hit "copy readme badge", and your browser publishes just the final numbers (top artist, track, genre, minutes, nothing else) under a private key kept in your browser. the badge url stays the same when you regenerate, only you can update it, and it expires after 60 days unless you refresh it.

🔌 developer api (beta)

turn stats into a finished poster from your own app. no account, no api key, png or svg back:

curl --fail-with-body https://wrapped.devmatei.com/api/v1/wrapped \
  -H 'Content-Type: application/json' \
  -d '{"source": {"type": "provider", "provider": "listenbrainz", "username": "YOUR_USERNAME"}}' \
  --output wrapped.png

there's also a read-only template catalog with preview images, so you can show the library on your own site. everything is in the api guide.

☕ support it

make a wrapped is free, has no paywalls and no accounts, and it's going to stay that way. it runs on my homelab, which still costs power, a domain and a lot of my free time (i'm broke lol). if it gave you a good wrapped, a coffee genuinely helps keep it online.

support me on ko-fi

no money? a ⭐ on the repo, a bug report, or posting your wrapped in the discord helps too.

📣 advertise here

there's a small ad slot on the site and it's cheap. if you've got a project, a tool or a server music nerds would like, grab a spot on sponsor.devmatei.com. it shows up next to the generator and the money goes straight into hosting.

⚡ self-hosting

docker (easiest)

git clone https://github.com/DevMatei/make-a-wrapped.git && cd make-a-wrapped
cp .env.example .env    # add your LASTFM_API_KEY at least
docker compose up -d

the app ends up on port 8000 (change it in docker-compose.yml). compose also starts a small redis so rate limits are shared between workers, and keeps counters, uploads and approved templates in ./data.

bare metal

needs python 3 and, for the api and template previews, node 20+.

python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
npm ci
cp .env.example .env

then either run the dev server (port comes from PORT, default 5000):

python wrapped-fm.py

or gunicorn for real traffic:

gunicorn -w 4 -b 0.0.0.0:8000 wrapped-fm:app

with more than one worker, set RATE_LIMIT_STORAGE to a redis url, otherwise every worker keeps its own rate limit counts.

⚙️ config

everything goes in .env. .env.example has the common ones filled in, and every value has a sane default, so you only really need LASTFM_API_KEY.

services and integrations

var default what it does
LASTFM_API_KEY none needed for last.fm stats and better artist images
LIBREFM_API_KEY a built-in key libre.fm takes any key for reads, but a real one identifies your app
LISTENBRAINZ_API https://api.listenbrainz.org/1
SONOSPHERE_API https://sonosphere.fm/1 sonosphere's listenbrainz compatible api, no key needed
ROCKSKY_API https://api.rocksky.app/xrpc
LASTFM_API https://ws.audioscrobbler.com/2.0/
LIBREFM_API https://libre.fm/2.0/
MUSICBRAINZ_API https://musicbrainz.org/ws/2
COVER_ART_API https://coverartarchive.org/release
LISTENBRAINZ_USER_AGENT, MUSICBRAINZ_USER_AGENT, LASTFM_USER_AGENT, LIBREFM_USER_AGENT make-a-wrapped/1.0 (...) be nice and put your own contact in these if you self-host
SITE_URL https://wrapped.devmatei.com public url, used for seo tags and api links
HTTP_PROXY, HTTPS_PROXY, NO_PROXY none picked up automatically if you tunnel through a proxy
MALOJA_ALLOW_PRIVATE false let people point the maloja and koito sources at lan / private ips. only turn this on for a private instance

stats and artwork

var default what it does
LISTENBRAINZ_RANGE this_year default time frame
AVERAGE_TRACK_LENGTH_MINUTES 3.5 fallback average track length for minutes listened
AVERAGE_TRACK_SAMPLE_LIMIT 50
COVER_ART_LOOKUP_LIMIT 15
LIBREFM_MIN_INTERVAL 2.0 seconds between libre.fm calls
LIBREFM_DURATION_LOOKUP_LIMIT 3
SONOSPHERE_MIN_INTERVAL 0.12 seconds between sonosphere calls (it allows 100 per 10s)
TEMP_ARTWORK_TTL_SECONDS 3600 how long uploaded artwork lives on the server
TEMP_ARTWORK_MAX_BYTES 6291456 (6 mb)
TEMP_ARTWORK_DIR data/tmp-artwork

performance and rate limits

var default what it does
APP_RATE_LIMIT 90 per minute general per-ip limit
APP_STATS_RATE_LIMIT 45 per minute stats and badge endpoints
APP_IMAGE_RATE_LIMIT 15 per minute artwork and POST /api/v1/wrapped
APP_CATALOG_RATE_LIMIT 120 per minute template catalog api
APP_PREVIEW_RATE_LIMIT 240 per minute template preview images
APP_MAX_TOP_RESULTS 15
APP_IMAGE_CONCURRENCY, APP_IMAGE_QUEUE_LIMIT, APP_IMAGE_QUEUE_TIMEOUT 4, 20, 15 artwork fetch queue, per worker
IMAGE_CACHE_TTL, IMAGE_CACHE_MAX_BYTES 3600, 25165824 (24 mb) downloaded artist and cover art kept in memory, per worker
WEB_CONCURRENCY 2 gunicorn workers in the docker image. each one is about 60 mb plus its caches
APP_API_RENDER_CONCURRENCY, APP_API_RENDER_QUEUE_LIMIT, APP_API_RENDER_QUEUE_TIMEOUT 2, 16, 30 api render queue, per worker
RATE_LIMIT_STORAGE memory:// set to a redis url when running several workers
APP_RATE_LIMIT_SALT empty set something random, it salts the hashed client ips
APP_STATS_API_CLIENTS empty comma-separated API client ids accepted for aggregate stats
APP_TRUST_PROXY_HEADERS 0 set to 1 only behind a reverse proxy you control
APP_STATS_API_CLIENTS empty comma-separated short ids of API integrations to break out on /stats
HTTP_TIMEOUT, HTTP_POOL_MAXSIZE 10, 40
LISTENBRAINZ_CACHE_TTL, LISTENBRAINZ_CACHE_SIZE 60, 256
LOG_LEVEL INFO

counters, badges and templates

var default what it does
COUNTER_DB data/counters.db sqlite file for wrapped, generation and template counters
WRAPPED_COUNT_FILE data/wrapped-count.txt old counter file, imported once on first start
WRAPPED_COUNT_SINCE 2025-10-26 label for when you started counting
BADGE_CACHE_TTL, BADGE_CACHE_SIZE 21600 (6h), 512
BADGE_SNAPSHOT_DIR data/badges navidrome badge snapshots
BADGE_SNAPSHOT_TTL_SECONDS, BADGE_SNAPSHOT_MAX_COUNT 60 days, 20000
TEMPLATE_REVIEW_KEY none enables /admin and the review api. leave empty to disable moderation
TEMPLATE_LIBRARY_DIR data/templates approved community templates
TEMPLATE_SUBMISSION_DIR, TEMPLATE_CREATOR_DIR, TEMPLATE_ASSET_DIR data/template-*
TEMPLATE_ASSET_MAX_BYTES 10485760 (10 mb)
TEMPLATE_PREVIEW_DIR data/template-previews cached catalog previews
TEMPLATE_CATALOG_TTL 30 seconds before the catalog is rebuilt
TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY none optional cloudflare turnstile on template submissions and uploads

navidrome behind authelia / authentik (header auth)

if your navidrome sits behind a reverse proxy that logs people in and passes a Remote-User header, you can host make a wrapped behind the same proxy and skip the password field entirely. the browser talks to a small proxy on this app (/navidrome-proxy/*), and the app forwards the signed in user to navidrome.

var default what it does
NAVIDROME_AUTH_MODE empty set to header to turn it on
NAVIDROME_URL empty navidrome's internal url, e.g. http://navidrome:4533
TRUSTED_USER_HEADER Remote-User header your proxy sets with the username
NAVIDROME_TRUSTED_PROXIES empty comma separated ips / cidrs of your proxy. requests from anywhere else get no header passed through. empty trusts everything, so set it
NAVIDROME_PROXY_RATE_LIMIT 1200 per minute the stats pull makes a lot of small calls

on the navidrome side, add this app's ip to `ND_EXTAUTH_TRUSTE

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 222
Route 16
Class 10
Method 9

Languages

TypeScript54%
Python46%

Modules by API surface

static/js/main.js67 symbols
wrapped_fm/routes.py34 symbols
wrapped_fm/images.py19 symbols
wrapped_fm/lastfm.py18 symbols
static/js/md5.js15 symbols
static/js/utils.js11 symbols
wrapped_fm/musicbrainz.py10 symbols
wrapped_fm/listenbrainz.py10 symbols
static/js/service-selector.js9 symbols
static/js/canvas-renderer.js8 symbols
wrapped_fm/turnstile.py7 symbols
static/js/navidrome/api.js7 symbols

For agents

$ claude mcp add make-a-wrapped \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page