DEV Community

Cover image for I Built a GitHub Portfolio Analyzer with Next.js + Gemini AI
Nischay Bandodiya
Nischay Bandodiya

Posted on

I Built a GitHub Portfolio Analyzer with Next.js + Gemini AI

The Problem

I had 50+ GitHub repositories and absolutely no idea which ones were worth showing to recruiters or adding to my portfolio.

Some were full products, some were half-finished experiments, and some were just "I was learning this on a Sunday" repos.

So I built a tool to solve this โ€” GitHub Portfolio Analyzer.


What It Does

The app has two completely separate modes:

๐Ÿ“Š Tab 1: Normal Analyze (Metadata)

This mode uses only GitHub API data โ€” no AI, instant results.

Every repo gets scored from 0 to 100 based on:

Score = Stars (max 40) 
      + Activity/last push (max 25)
      + Completeness: description, homepage, topics (max 25)
      + Community: forks + watchers (max 20)
Enter fullscreen mode Exit fullscreen mode

Then it auto-categorizes:

  • ๐Ÿ“ฆ Product โ€” Score โ‰ฅ 50 or has live demo + stars
  • ๐Ÿ› ๏ธ Project โ€” Score โ‰ฅ 22 or recently active
  • ๐Ÿงช Experiment โ€” Everything else

You also get:

  • ๐Ÿ† Top 3 "Most Impressive" repos with podium
  • ๐Ÿ’Ž Showcase Picker โ€” portfolio-worthy repos highlighted
  • Filter by category, search by name, sort by score/stars/date

๐Ÿค– Tab 2: Deep AI Analyze (Google Gemini)

This mode reads each repo's README and sends it to Gemini 1.5 Flash for an honest review.

For each repo, AI returns:

  • AI Score (0-100)
  • Category: Product / Project / Experiment / Learning
  • 2-3 sentence summary
  • Strengths & Improvements
  • Showcase Potential: High / Medium / Low
  • Tech Stack detection

The two tabs are completely separate โ€” no mixing of metadata scores and AI scores.


Tech Stack

Next.js 15        โ€” App Router
TypeScript        โ€” Strict mode, zero `any`
Tailwind CSS      โ€” All styling
GitHub REST API   โ€” Fetch repos + README files
Google Gemini     โ€” Free tier AI analysis
Enter fullscreen mode Exit fullscreen mode

Key Technical Decisions

1. Sequential fetch instead of parallel

// โŒ Old approach - hard to debug errors
const [user, repos] = await Promise.all([fetchUser(), fetchAllRepos()])

// โœ… New approach - validate credentials first
const user = await fetchUser(username, token)
const repos = await fetchAllRepos(username, token)
Enter fullscreen mode Exit fullscreen mode

2. Rate limit safe AI analysis

Gemini free tier = 15 requests/minute. So I added a 6 second gap between each repo analysis with a progress bar and stop button.

3. Using Bearer instead of token prefix

// โŒ Old (deprecated)
headers["Authorization"] = `token ${token}`

// โœ… New (recommended)
headers["Authorization"] = `Bearer ${token}`
headers["X-GitHub-Api-Version"] = "2022-11-28"
Enter fullscreen mode Exit fullscreen mode

What I Learned

  1. GitHub fine-grained tokens are strict about permissions โ€” affiliation=owner causes 422 errors, use type=all instead
  2. Gemini model names matter โ€” gemini-2.0-flash-lite with v1beta is the most reliable free tier option
  3. Mobile coding is hard but possible โ€” this entire project was built on a mobile phone using GitHub Codespaces ๐Ÿ˜…

Try It

๐Ÿ”— Live Demo: https://github-portfolio-analyzer.vercel.app

โญ GitHub: https://github.com/Nischayb99/github-portfolio-analyzer

You'll need:

  • GitHub username (for public repos)
  • GitHub Personal Access Token (for private repos โ€” free, read-only)
  • Google Gemini API key (for AI analysis โ€” free tier)

What's Next?

  • [ ] Backend + auth to save analysis history
  • [ ] Team/org support
  • [ ] Export as PDF report
  • [ ] Compare with other developers

Would love your feedback! What feature would you find most useful?


Built with โค๏ธ by Nischay Bandodiya โ€” Full-stack developer from Indore, India

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.