📊 A dynamic SVG badge generator for Code::Stats profiles, perfect for embedding your XP and top languages in your GitHub README.
- Displays total XP from your Code::Stats profile
- Shows your top languages by XP (customizable with
?limit=
) - Returns a custom SVG you can embed anywhere
- Easy to deploy on Vercel, Render, or your own server
/api/code-stats?user=<your_codestats_username>&limit=6

You can control the appearance of your badge using query parameters:
-
Show/hide progress bar:
UseshowProgressBar=false
to hide the progress bar.
Example:/api/code-stats?user=yourusername&showProgressBar=false
-
Display language XP instead of level:
UseshowLangXP=true
to show XP for each language instead of the level.
Example:/api/code-stats?user=yourusername&showLangXP=true
-
Theme (light or dark):
Usetheme=light
for a light background, ortheme=dark
for a dark background (default is dark).
Example:/api/code-stats?user=yourusername&theme=light
This project supports both local Express server and Vercel serverless function usage.
npm install
npm run start
Then open:
http://localhost:3000/api/code-stats?user=yourusername
If you want to test the Vercel serverless function locally:
vercel dev
This project works great on:
- Vercel (recommended, uses
api/code-stats.js
serverless function) - Render (runs Express server)
- Heroku (runs Express server)
- Any Node.js-capable host
- Font choices
- Customizable color palette via query parameters
- Support for compact/minimal badge layout
- Add last updated timestamp
This project is licensed under the GNU GPL v3.
Inspired by anuraghazra/github-readme-stats
Made with ❤️ to level up your README.