LeetCode 的年度总结,类似于 Spotify Wrapped。
Show HN: Spotify Wrapped but for LeetCode

原始链接: https://github.com/collinboler/leetcodewrapped

## LeetCode 年度总结:你的代码一年 LeetCode 年度总结 (网址:leetcodeWrapped.com) 是一个个性化的“Spotify Wrapped”风格的 LeetCode 活动回顾。它使用 React、Vite 和 Framer Motion 构建前端,使用 Cloudflare Pages Functions 和 Firebase 构建后端,以可视化你的编码统计数据。 该应用通过 LeetCode GraphQL API 获取数据,并(可选)将用户数据存储在 Firebase 中。它通过交互式幻灯片展示你的提交记录、难度分布等信息。 目前,未认证用户的数据仅限于最近 20 次提交。但是,提供 LeetCode 会话 Cookie 可以解锁访问*所有*提交记录,从而进行更详细的年度分析。开发者根据社区兴趣考虑过 Chrome 扩展程序来处理 Cookie。 数据分析使用 Posthog 跟踪,电子邮件通知通过 Firebase 扩展程序发送,但也可以在本地使用,无需这些功能。

## LeetCode 年度总结:Hacker News 讨论 GitHub 上一个新项目 ([github.com/collinboler](https://github.com/collinboler)) 旨在为用户的 LeetCode 活动创建类似于“Spotify Wrapped”的年度总结。Hacker News 上的讨论表明,LeetCode 的流行程度已经超越了仅仅为求职者准备 FAANG 公司的面试。 许多开发者现在每天都在使用它,这得益于游戏化功能和更吸引人的用户界面。虽然最初被认为是学生使用的工具,但经验丰富的开发者也在使用它——一些人是为了保持技能,另一些人是为了探索新的编程语言。用户将其比作每日谜题,如填字游戏,并指出持续的算法练习的好处。 目前,该项目需要用户输入 LeetCode cookie,引发了信任问题。创建者正在考虑一个 Chrome 扩展来解决这个问题,优先考虑安全性,避免外部 API 调用。LeetCode 本身会发布年度回顾功能,但该项目提供更详细、可能具有累积终身统计数据。
相关文章

原文

a "spotify wrapped" style recap for your leetcode journey.

deployed at leetcodewrapped.com

  1. install dependencies:

  2. run locally:

  3. build for production:

├── src/
│   ├── api/            # api wrappers (leetcode, firebase, etc.)
│   ├── components/     # react components
│   │   └── slides/     # individual wrapped slides (intro, stats, etc.)
│   ├── App.jsx         # main application logic
│   ├── main.jsx        # entry point & providers
│   └── firebase.js     # firebase configuration
├── functions/          # cloudflare functions (server-side proxy)
├── public/             # static assets
├── firestore.rules     # database security rules
└── index.html          # html entry point
  • frontend: react, vite, framer motion
  • backend: cloudflare pages functions (proxy), firebase (db & auth)
  • analytics: posthog

Note: The last 5 slides are not neccearily specific to 2025 because of leetcode's graphql api only allows querying up to 20 of the latest submissions from an unauthenticated user.

However, if you pass a LEETCODE_SESSION cookie (obtained from leetcode.com, open dev tools -> application -> cookies) with your request you can query all of your accounts submissions. You could also use the calendar endpoint query all of your submissions in the past year, and thus create a much more nuanced leetcode wrapped. (ex: You struggled with this problem the most in 2025.)

I was hesitant to implement this because I obviously people wouldn't trust inputting a cookie into a form, but if this repo gets lots of stars I'll make a chrome extension that gets around this.

Note Note: I used firebase firestore database and trigger email extension to send out emails to users, as well as posthog for analytics. However, you can still clone the repository and run it locally without these features.

联系我们 contact @ memedata.com