I built a badge API for your GitHub README

puf17640 profile image Julian Pufler ・2 min read

GitHub logo puf17640 / git-badges

An API serving useful badges for your GitHub Profile README 🚀🎉

You probably heard of the new GitHub profile READMEs, right?
If not you, check out my last article so you know what this is all about! Basically, you can now add a README and thus display markdown content directly on your profile page and that's awesome, because it allows us to add dynamic content to a profile.

Soon people started building projects that served these dynamically generated images so people could use them and I thought that was really cool!

I came across a visit tracker for READMEs and quickly found out it wasn't working anymore, so I figured I'd just build it myself and see how it works.

I quickly spun up a new node app on my dedicated server and played around with it, it worked great. I initially wanted to call the project 'gh-visitors' or something like that but then I thought that there might be a few other types of badges that people would want to show on their profile so I called the project 'git-badges' to leave open the possibility of more than just visit tracking.

I built the API using ExpressJs and MongoDB and the SVG generating is done by shields.io.

Soon someone started working on a badge that shows how long you have been on GitHub, so I had the idea to dig around in the GitHub API docs. After that I added another badge that show how many repositories you have publicly available.

You can embed the badges on every service that supports markdown but the visit tracker will only be updating the count if the request comes from a github server to mitigate people faking visit counts.

Visits badge (puf17640/git-badges)

Visits Badge

Years badge (puf17640)

Years Badge

Repos badge (puf17640)

Repos Badge

If you have an idea for a new badge, please let me know either by creating an issue on the repository or by writing a comment down below! 👍

Posted on by:

puf17640 profile

Julian Pufler


19 years old. IT student from Vienna. Mostly NodeJS, C#, Java, Python. Core-Team Member of disease.sh


markdown guide