DEV Community

Cover image for The Story of GoBadge: How It All Started
CinfiniteDev
CinfiniteDev

Posted on

The Story of GoBadge: How It All Started

A journey from a simple idea to a badge service for modules


It Started with a Simple Problem (and a Wearing Out F5 Key)

"Why do I need a CLI tool just for live reload?"

If you're a Go developer, you know the drill. You make a change. You compile. You run. You repeat. Your F5 key is slowly giving up.

Existing solutions? They're CLI tools. External processes. Version mismatches. Config files. Zombie processes. "It works on my machine."

That's when GoWatcher was born — a library, not a CLI. Just import it, call gowatcher.Watch("."), and your app reloads itself. No external tools. No version chaos. No separate processes to babysit.

But here's the thing: once you build something useful, you want the stats.


The Second Problem: "How Many Projects Use My Module?"

You made a module , good , people are using it , good , BUT how many ?How do you check your module is creating impact ?

For npm packages, you look at downloads. For crates.io, you see downloads. For Go? There's nothing.

Shields.io has badges for everything — except Go modules.

That's when the lightbulb clicked: someone should build this.


Building the Badges

SO built the badges . get the data .. Done
Next: making them look like real badges. Done

SVG was the answer. Dynamic SVGs that:

  • Have the correct width based on text length
  • Use clipPath for rounded corners
  • Use linearGradient for that signature look
  • Cache for 1 hour (to avoid rate limits)

This First Version

The first working version had three endpoints:

/api/imports/{owner}/{module}
/api/importedby/{owner}/{module}
/api/stars/{owner}/{repo}
Enter fullscreen mode Exit fullscreen mode

Drop them into markdown:

![Imported By](https://gobadge.vercel.app/api/importedby/cinfinit/gowatcher)
![Stars](https://gobadge.vercel.app/api/stars/cinfinit/gowatcher)
Enter fullscreen mode Exit fullscreen mode

And it shows live data. No approximations. Just real numbers.


Why This Matters

Go is the second-largest ecosystem on GitHub. Millions of developers use it daily. But there's no easy way to show package impact.

npm has 30B+ downloads. Go has... nothing visible.

GoBadge fixes that. Now Go modules can show:

  • 📦 How many dependencies your module has
  • 🔗 How many projects depend on you

And the best part? GoWatcher was the first project to use these badges:

[![Go Version](https://img.shields.io/github/go-mod/go-version/cinfinit/gowatcher)](https://github.com/cinfinit/gowatcher)
[![Imported By](https://gobadge.vercel.app/api/importedby/cinfinit/gowatcher)](https://gobadge.vercel.app/)
Enter fullscreen mode Exit fullscreen mode

Lessons Learned

  1. The obvious source isn't always the right one — Go proxy had nothing useful
  2. Data is often hidden in plain sight
  3. APIs change, HTML break — Caching is essential
  4. SVG gives you full control — No dependencies, just clean rendering

Requirements

Note: Your Go module must be registered at https://pkg.go.dev/ for the Imports and Imported By badges to work.


Try It Out

![Imported By](https://gobadge.vercel.app/api/importedby/gin-gonic/gin)
![Stars](https://gobadge.vercel.app/api/stars/gin-gonic/gin)
Enter fullscreen mode Exit fullscreen mode

Check out these live examples:

And of course, the project that started it all:



GoBadge — Because every module deserves to show its impact.

Top comments (0)