Skip to content

tedious ramblings

The blog of Robert Hafner

Menu
  • Projects
  • Resume
  • Sponsor
  • Archives
  • About
Menu

GitStars – A Github API for Front End Development

Posted on May 27, 2019May 26, 2019 by Robert Hafner

TLDR: GitStars Github, Documentation, and New Badges.

Developers love badges. For these reason there are a ton of different Github Badges websites that let you build out your own badges for your projects. Most of them have the same issue though- they stop working quickly due to the Github API Ratelimiting, which only allows 60 requests each hour if you're calling it directly from the browser.

I also love badges, and wanted them to work for my new portfolio page. The problem is that with almost forty projects I was hitting that ratelimit pretty hard, to the point where refreshing the page once was enough to do it.

So I made my own API, GitStars, which I am now sharing with all of you.

GitStars has a few features that make it nice for front end development-

  • No Ratelimit- if a project has been loaded once it will always load again after.
  • Smaller Responses as the service strips out data (such as URLs) that can be easily generated.
  • Faster Responses due to caching- most responses come from SQLite rather than calling Github, returning responses in about 20ms.
  • Higher Resilience, as it will return cached results when errors occur.
  • Browser Caching, as various headers (such as Expires) are added. This speeds up page reloads significantly.
  • Easy Migration since the service mirrors the Github API endpoints and responses. Changing "api.github.com" to "stars.gitconsensus.com" will work for most projects.

As part of this project I also launched gitbuttons.tedivm.com, which forks a popular github badges project and has it use this new API.

GitStars is available now on Github and at stars.gitconsensus.com.

Share this:

  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on X (Opens in new window) X
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to print (Opens in new window) Print
  • More
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to email a link to a friend (Opens in new window) Email

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About

Robert Hafner is a Principal Engineer based in Chicago focusing on distributed applications, infrastructure, and security. This blog is a running journal of projects, tutorials, and random ideas that pop into his head.

  • GitHub
  • Mastodon
  • LinkedIn

Popular Posts

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

©2025 tedious ramblings | Built using WordPress and Responsive Blogily theme by Superb