<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vishnu Nandan</title>
    <description>The latest articles on DEV Community by Vishnu Nandan (@vishnunandan555).</description>
    <link>https://dev.to/vishnunandan555</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3925275%2F040ccc2a-3ffa-4f94-9e97-1ef81a45dae0.jpg</url>
      <title>DEV Community: Vishnu Nandan</title>
      <link>https://dev.to/vishnunandan555</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishnunandan555"/>
    <language>en</language>
    <item>
      <title>I Built an API to Showcase Top Contributors on GitHub READMEs</title>
      <dc:creator>Vishnu Nandan</dc:creator>
      <pubDate>Mon, 11 May 2026 16:14:40 +0000</pubDate>
      <link>https://dev.to/vishnunandan555/i-built-an-api-to-showcase-top-contributors-on-github-readmes-j7b</link>
      <guid>https://dev.to/vishnunandan555/i-built-an-api-to-showcase-top-contributors-on-github-readmes-j7b</guid>
      <description>&lt;p&gt;I wanted a simple way to &lt;strong&gt;showcase the top contributors across all my GitHub repositories&lt;/strong&gt; directly on my GitHub profile README.&lt;/p&gt;

&lt;p&gt;Something like contrib.rocks, but across all repositories..&lt;/p&gt;

&lt;p&gt;Surprisingly, I couldn't really find a clean solution for it.&lt;/p&gt;

&lt;p&gt;Most existing tools were either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;repo-specific&lt;/li&gt;
&lt;li&gt;difficult to self-host&lt;/li&gt;
&lt;li&gt;dependent on live GitHub API scraping&lt;/li&gt;
&lt;li&gt;heavily rate limited&lt;/li&gt;
&lt;li&gt;or just abandoned&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built one.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 Top Contributors API
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Website:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://top-contributors-api.vercel.app/" rel="noopener noreferrer"&gt;https://top-contributors-api.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it looks like:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3a9cx4fj9x5vl485fpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3a9cx4fj9x5vl485fpq.png" alt=" " width="798" height="284"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤔 Why I Built It
&lt;/h2&gt;

&lt;p&gt;Originally, I just wanted this for my own GitHub profile.&lt;/p&gt;

&lt;p&gt;Something simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;aggregate contributors across all repos&lt;/li&gt;
&lt;li&gt;render avatars nicely&lt;/li&gt;
&lt;li&gt;auto-update&lt;/li&gt;
&lt;li&gt;easy to embed&lt;/li&gt;
&lt;li&gt;no maintenance headaches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I assumed someone had already built it.&lt;/p&gt;

&lt;p&gt;Apparently not.&lt;/p&gt;

&lt;p&gt;Or at least not in the way I wanted.&lt;/p&gt;

&lt;p&gt;So this became one of those:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Fine, I'll build it myself.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ The Real Problem Wasn't the Image
&lt;/h2&gt;

&lt;p&gt;Rendering the image itself was easy.&lt;/p&gt;

&lt;p&gt;The painful part was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;iterating through repositories&lt;/li&gt;
&lt;li&gt;merging contributor data&lt;/li&gt;
&lt;li&gt;pagination&lt;/li&gt;
&lt;li&gt;GitHub API rate limits&lt;/li&gt;
&lt;li&gt;serverless execution limits&lt;/li&gt;
&lt;li&gt;caching&lt;/li&gt;
&lt;li&gt;keeping response times fast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first I tried doing everything live inside a Vercel API route.&lt;/p&gt;

&lt;p&gt;Bad idea.&lt;/p&gt;

&lt;p&gt;If a profile has enough repositories, the function can easily hit execution limits. And repeatedly querying GitHub on every request is basically asking to get throttled.&lt;/p&gt;

&lt;p&gt;So I redesigned the architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 How It Works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. GitHub Actions Handles Aggregation
&lt;/h3&gt;

&lt;p&gt;A scheduled GitHub Actions workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scans public repositories&lt;/li&gt;
&lt;li&gt;aggregates contributor stats&lt;/li&gt;
&lt;li&gt;generates a lightweight &lt;code&gt;contributors.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;commits it back into the repository&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It uses GitHub’s built-in &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;, so setup stays extremely simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Vercel Only Renders the Image
&lt;/h3&gt;

&lt;p&gt;The API route:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reads the JSON file&lt;/li&gt;
&lt;li&gt;renders contributor avatars using &lt;code&gt;canvas&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;returns a PNG image&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fast response times&lt;/li&gt;
&lt;li&gt;edge caching&lt;/li&gt;
&lt;li&gt;minimal GitHub API usage&lt;/li&gt;
&lt;li&gt;no live scraping during requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, using PNGs avoids GitHub README SVG sanitization weirdness, which was another unexpected rabbit hole.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 Two Versions
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Main Version (Recommended)
&lt;/h2&gt;

&lt;p&gt;Repository:&lt;br&gt;
&lt;a href="https://github.com/vishnunandan555/top-contributors-api" rel="noopener noreferrer"&gt;https://github.com/vishnunandan555/top-contributors-api&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This version is meant for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;self-hosting&lt;/li&gt;
&lt;li&gt;private usage&lt;/li&gt;
&lt;li&gt;maximum reliability&lt;/li&gt;
&lt;li&gt;zero public API dependency&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Fork the repository&lt;/li&gt;
&lt;li&gt;Enable GitHub Actions&lt;/li&gt;
&lt;li&gt;Run the &lt;code&gt;Aggregate Top Contributors&lt;/code&gt; workflow once&lt;/li&gt;
&lt;li&gt;Deploy to Vercel&lt;/li&gt;
&lt;li&gt;Use your Vercel Link&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No environment variables required.&lt;br&gt;
This avoids public rate limits entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  OTG Edition
&lt;/h2&gt;

&lt;p&gt;This version provides a public API.&lt;br&gt;
(you can find it in the website)&lt;/p&gt;

&lt;p&gt;You just:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;place your GitHub username in the URL&lt;/li&gt;
&lt;li&gt;paste it into your README&lt;/li&gt;
&lt;li&gt;done&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Perfect for quick setup.&lt;/p&gt;

&lt;p&gt;Because it's a shared public instance, it &lt;em&gt;can&lt;/em&gt; get rate limited under heavy usage, although in normal usage it usually works fine.&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 Future Plans
&lt;/h2&gt;

&lt;p&gt;Currently the output is a static image.&lt;/p&gt;

&lt;p&gt;One thing I really want to add is interactive contributor avatars, so clicking a contributor directly opens their GitHub profile.&lt;/p&gt;




&lt;h2&gt;
  
  
  📎 About Contribution Calculation
&lt;/h2&gt;

&lt;p&gt;Currently, contributors are ranked using aggregated commit counts across repositories via GitHub’s contributors API.&lt;/p&gt;

&lt;p&gt;Is commit count a perfect measure of contribution? &lt;strong&gt;Not really.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It ignores things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code reviews&lt;/li&gt;
&lt;li&gt;issue triage&lt;/li&gt;
&lt;li&gt;mentoring&lt;/li&gt;
&lt;li&gt;discussions&lt;/li&gt;
&lt;li&gt;documentation/design work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But commits are the &lt;strong&gt;most practical&lt;/strong&gt; metric GitHub exposes that is fast, scalable, and reliable for an automated README widget.&lt;/p&gt;

&lt;p&gt;In the future, &lt;strong&gt;I’d like to experiment with a smarter scoring system&lt;/strong&gt; that can better &lt;strong&gt;represent contribution quality&lt;/strong&gt; instead of just raw commit volume.&lt;/p&gt;

</description>
      <category>github</category>
      <category>api</category>
      <category>opensource</category>
      <category>readme</category>
    </item>
  </channel>
</rss>
