DEV Community

Davide Santangelo
Davide Santangelo

Posted on

GitHug: Finding Your Code Soulmate in the Octoverse

Let's face it: GitHub is a social network where we rarely get social.

We follow the rockstars—the creators of Next.js, the core maintainers of Linux, the people with 50k stars. But what about the developer three blocks away who is also struggling with the same obscure Rust borrow checker error? Or the person in your city building a project just like yours?

That's why I built GitHug.

It’s not another "LinkedIn for Developers." It’s a tool to cut through the noise and find people, not just profiles.


🔍 The Problem with "Followers"

On GitHub, the "Follow" graph is mostly a "Fan" graph. You follow people you admire, not necessarily people you can collaborate with.

I wanted to answer a different question: "Who should I actually be talking to?"

To solve this, I needed an algorithm that cares about:

  1. What you write (Languages)
  2. What you love (Stars)
  3. Where you live (Location)
  4. Who you are (Bio keywords)

And I wanted it to run entirely in the browser (mostly).


🧠 The "Secret Sauce" Algorithm

GitHug doesn't use a massive vector database or AI embeddings. It uses a heuristic scoring engine that runs locally in your client after fetching raw data from GitHub.

Here is exactly how the match score (0-100%) is calculated:

1. The Stack Overlap (30%)

This is the heavy lifter. If you write mostly in Go and Svelte, you don't want to match with someone who only does Java.
The algorithm looks at your top languages and applies a decay factor. Sharing your #1 language adds more points than sharing your #5.

// Simplified logic
if (candidate.languages.includes(your.primaryLanguage)) {
  score += 30; // BOOM. Instant connection.
}
Enter fullscreen mode Exit fullscreen mode

2. The "Fanboy/Fangirl" Factor (20%)

Ever notice how you instantly click with someone who likes the same libraries?
GitHug checks the maintainers of the repos you stared. If you stared shadcn/ui, and the candidate is shadcn (or a frequent contributor), that's a huge signal.

3. Bio Context & Topics (30% Combined)

We parse the bio for keywords. If your bio says "Building AI agents" and theirs says "AI researcher," that's a match. We also look at repository topics (machine-learning, web3, a11y).

4. Proximity & Influence (15%)

We parse the messy free-text location field from GitHub (San Francisco, CA vs SF). If we detect you are in the same country or city, you get a bump.
We also look for an "Influence Ratio" (Followers/Following). We want to match you with active peers, not bots.


⚡ Under the Hood: The Stack

I didn't want to manage a database for this. The architecture is Stateless & Serverless.

Frontend: React + Vite + Tailwind

The UI is built to be "minimal but cool."

  • Glassmorphism cards using backdrop-blur.
  • Lucide React for crisp iconography.
  • Local Storage caching so we don't spam the GitHub API.

Backend: Netlify Functions

The only server-side component is a tiny auth.js function.
Why? Because GitHub OAuth requires a client_secret exchange that can't happen in the browser.

  1. App redirects you to GitHub.
  2. GitHub sends a code back.
  3. React sends code to Netlify Function.
  4. Netlify Function swaps code for access_token and returns it.

Zero database. Zero user tracking. 100% Privacy.


🌟 Star the Repository on GitHub

If you like the code, the design, or just the idea of making open source a little less lonely, drop a ⭐️. It helps me ship more cool stuff.

Happy Coding!

Top comments (0)