Live site: https://dwrap.fun · Live demo: dwrap.fun/demo (made-up data, no upload needed) · Privacy · Terms · Security
A website that turns anyone's Discord data package into a Wrapped: messages, people, servers, words, emoji, games, voice, music, screen time and a tap-through story with a downloadable share image.
All names and numbers below are generated demo data. The user "pixelmoth" and their friends, servers, games, artists and messages are made up by
tools/make-demo-package.mjsand run through the real upload flow. No real account appears. Click through the same demo yourself at dwrap.fun/demo.
![]() |
![]() |
![]() |
![]() |
| On a phone | The tap-through story | Your #1 person | The summary card |
![]() |
![]() |
| After midnight | Your people |
![]() |
![]() |
| Games & voice | Your soundtrack |
![]() |
![]() |
| Drop in your package.zip | Read on your device, never uploaded |
![]() |
![]() |
| Share your results | The image it makes |
- The zip never leaves the visitor's device.
public/js/zip.jsreads the archive's directory and streams entries through the browser's built-inDecompressionStream, so 2 GB+ packages work without loading them into memory. The analysis (analyze.js,activity.js) runs in a Web Worker (analyze-worker.js) and builds one summary object. - What is never read into the summary: email, phone, IP addresses, cities/ISPs, device ids, payment amounts or sources, sessions and support tickets. Word lists drop common filler, slurs and profanity, and words are counted once per message. Quoted messages containing filtered words are hidden.
- Share links are opt-in and end-to-end encrypted. When someone presses Create share link, the browser gzips and AES-256-GCM-encrypts the summary and puts the key in the link's
#fragment, which never reaches the server. The Worker stores only the ciphertext in D1 and returns/w/<id>plus a private delete token kept in that browser. - Retention: every summary expires 24 hours after creation (
TTL_SECONDS). Expired rows are purged on every write and hourly by a cron trigger. When total storage would passSTORAGE_CAP_BYTES, the oldest summaries are deleted first. - Abuse limits and hardening: every viewer rebuilds decrypted summaries from an exact schema (
public/js/schema.js); the API accepts only small encrypted envelopes, 350 KB cap, JSON only, cross-site requests refused, ~133-bit share IDs, hashed delete tokens compared in constant time, per-IP burst limits plus 20 links per network per hour and a site-wide hourly ceiling (only a salted SHA-256 of the IP is stored, for one hour), and a strict CSP with no inline scripts or styles. Details in SECURITY.md.
npm run dev # http://localhost:8787, real Worker code on a local SQLite database
npm test # API tests: create, read, delete, 24h expiry, eviction, rate limit, validation
To build from a package without the file picker while developing:
node dev/server.mjs 8787 --package=C:/path/to/package.zip
# then open http://localhost:8787/?devzip=1 (or ?devzip=noact to skip the activity logs)
npm run parity -- <package.zip> <reference.json> [--activity] compares the browser analysis with a reference summary.
To rebuild the screenshots above from the fictional demo package:
node tools/make-demo-package.mjs # writes .dev/demo-package.zip (all made-up data, same every run)
npm run dev # in another terminal
node tools/demo-screenshots.mjs # real upload flow in headless Chrome at 2x, saved to docs/screenshots/
# (also writes public/demo-wrapped.json for /demo; --demo-only skips the screenshots)
- Log in once:
npx wrangler login(opens your browser). - Create the database:
npx wrangler d1 create wrapped-for-discord, then paste the printeddatabase_idintowrangler.toml. - Create the tables:
npx wrangler d1 execute wrapped-for-discord --remote --file=schema.sql - Set a salt for IP hashing:
npx wrangler secret put IP_SALT(any long random string). - Deploy:
npx wrangler deploy. The site is served athttps://wrapped-for-discord.<your-subdomain>.workers.dev.
Settings live in wrangler.toml under [vars]: link lifetime, storage cap, maximum summary size and the hourly rate limit.
After a deploy, npm run test:live checks the live site with the synthetic fixture (create, read, delete, rejected uploads). Add -- --expiry-seconds=60 after deploying with npx wrangler deploy --var TTL_SECONDS:60 to watch a link expire, then redeploy normally.
Current deployment: Worker wrapped-for-discord on the custom domains dwrap.fun and www.dwrap.fun (www and workers.dev redirect to dwrap.fun via CANONICAL_HOST), D1 database wrapped-for-discord, Workers Rate Limiting binding API_LIMITER, hourly cleanup cron 17 * * * *, IP_SALT set as a secret. Privacy requests go to privacy@dwrap.fun (Cloudflare Email Routing).
public/ static site (index.html, styles.css, js/, _headers)
public/js/zip.js streaming ZIP reader (ZIP64-aware)
public/js/analyze.js messages, profile, servers, billing counts -> summary
public/js/activity.js optional Activity/* logs: games, voice, music, screen time
public/js/render.js report renderer (all text via textContent)
public/js/story.js story player
public/js/card.js share image (canvas, drawn on the device)
public/js/app.js upload, progress, share sheet (image + links), shared view
src/worker.js API + static serving on Cloudflare
schema.sql D1 tables
dev/ local dev server and bindings (not deployed)
test/ API tests and analysis parity check
tools/ demo package generator and screenshot script
docs/screenshots/ README screenshots (demo data)
Fan-made. Not affiliated with or endorsed by Discord.













