A simple dynamic LeetCode stats card that can be embedded in your GitHub README. It fetches your LeetCode stats and renders them as an SVG card with progress bars for Easy, Medium, and Hard problems.
The card updates automatically whenever your stats change.
- Dynamic LeetCode stats
- Easy / Medium / Hard progress bars
- SVG card (lightweight and fast)
- Works directly inside GitHub README
- Deployable on Vercel serverless functions
You must pass your LeetCode username as a query parameter.
https://your-vercel-domain/api/stats?username=YOUR_LEETCODE_USERNAME
Example:
https://your-vercel-domain/api/stats?username=nabeel
Add this to your README.md.
Example:
You can also use HTML if you want more control.
<img
src="https://your-vercel-domain/api/stats?username=YOUR_LEETCODE_USERNAME"
/>Example:
<img src="https://your-vercel-domain/api/stats?username=nabeel" />LeetCode Stats
Easy ███████████
Medium ██████████████
Hard ███
Run the project locally using Vercel CLI.
npx vercel dev
Then open:
http://localhost:3000/api/stats?username=YOUR_LEETCODE_USERNAME
The project is designed to run on Vercel Serverless Functions.
Steps:
- Push the repository to GitHub
- Import the project in Vercel
- Deploy
After deployment your API will be available at:
https://your-project.vercel.app/api/stats
- Node.js
- Vercel Serverless Functions
- LeetCode GraphQL API
- SVG Rendering
If you find this project useful, consider giving it a star on GitHub. It helps others discover the project and motivates further improvements.
You can star the repository here:
⭐ https://github.com/NabeelOG/LeetCode-Card
Thank you for your support!