4 ms·
Show HN: Most Influential GitHub Repo Stars
I like to occasionally look through the list of who has starred or forked one of my GitHub repos, and I found the process pretty tedious and slow. The lists are shown on GitHub in chronological order, with just the username shown. To see anything about the users themselves, you need to click on their profiles in a new tab-- otherwise the navigation doesn't work well and takes you out of the list of users when you hit the back button.
What I really wanted was to see if any "notable" users had starred or forked a repo. That is, a user with a bunch of their own popular repos, or someone with tons of followers on GitHub because they are well known in the tech world for whatever reason. But there didn't seem to be any easy way to do this other than clicking on a ton of usernames and checking each one manually. So I decided to make this project.
Basically, you give it a link to a public repo on GitHub, and it then goes through each user who has starred or forked the repo, and for each one, it gets various metrics, like the total number of stars received by that user from their own projects, the number of followers they have on GitHub, the number of contributions, etc. It then compiles all this into a score using a simple formula:
function calculateScore(stars, followers, contributions, recentActivity) {
return stars * 2.5 + followers * 2.0 + contributions * 0.1 + recentActivity * 0.1;
}
It then returns a nicely formatted table of these results. This screenshot shows what the output looks like:
https://raw.githubusercontent.com/Dicklesworthstone/most-influential-github-repo-stars/main/screenshot_2.webp https://raw.githubusercontent.com/Dicklesworthstone/most-inf...
In order to deal with GitHub API rate limits (which are pretty strict), it breaks up the users into small groups and tries to get each group separately. It then detects when the rate limit has kicked in and automatically waits until the API allows more requests. It also uses caching with SQLite so that it only needs to download a user's data once (at least until the cached data automatically invalidates after 20 hours), so if you want to look up a couple different repos, as long as there is decent overlap in the users who have starred/forked each of the repos, it can avoid a lot of requests and get the data from the cache instead. I also built in the ability for the user to securely specify their own Github API key (this stays in the user's own browser and is never sent to the backend).
It's also fully open source:
https://github.com/Dicklesworthstone/most-influential-github-repo-stars https://github.com/Dicklesworthstone/most-influential-github...
So it's easy enough to spin up on a spare machine and try yourself. But to make it easier for people to try, I hosted it myself at:
https://influential-stars.com/ https://influential-stars.com/
This is just using my own personal GitHub API key and is running on a somewhat modest VPS instance with 10 cores, so if this becomes popular, it's probably going to melt down pretty fast. If anyone who works at GitHub/Microsoft is reading this, I would love to get a higher rate limit for this project or some special API key I can use for it, since I think this is a pretty useful tool for people who make open source software and want to better understand their user base, and most people aren't going to want to spin up their own version just to use it.
As an aside, this is one of the first applications I've made using NextJS (I mostly use Python and vanilla JS), and I have to say that I found it pretty nice to work with and easy to make something that looks pretty slick. Going from the development version to the production version was also quite easy (I'm using pm2 and nginx). I'll certainly consider NextJS for future projects.
- breck 2y ago> You can securely use your own GitHub API Key. It's never sent to our server and is kept securely in your own browser. Okay, what is the URL where I can get the exact key I need? There are lots of kinds of GitHub API keys.
- eigenvalue 2y agoIt's a bit annoying to do using the GitHub website. From my readme file: Install the GitHub CLI: sudo apt update sudo apt install gh Authenticate with your GitHub account: gh auth login Follow the prompts to complete the authentication process. Generate a new API key: gh auth token This will create and display a new Personal Access Token. Copy the generated token and use it in the application or set it as the GITHUB_API_KEY environment variable.
- breck 2y agoHTTP error! status: 500, message: <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-b06b66723d67b20c.js" defer=""></script><script src="/_next/static/chunks/framework-f66176bb897dc684.js" defer=""></script><script src="/_next/static/chunks/main-767e09ee30044af1.js" defer=""></script><script src="/_next/static/chunks/pages/_app-6a626577ffa902a4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-1be831200e60c5c0.js" defer=""></script><script src="/_next/static/4919R7O7MJDIQlyB6QDOX/_buildManifest.js" defer=""></script><script src="/_next/static/4919R7O7MJDIQlyB6QDOX/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"4919R7O7MJDIQlyB6QDOX","isFallback":false,"isExperimentalCompile":false,"err":{"name":"Internal Server Error.","message":"500 - Internal Server Error.","statusCode":500},"gip":true,"scriptLoader":[]}</script></body></html>