AI News Hub Logo

AI News Hub

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

DEV Community
Nischay Bandodiya

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. The app has two completely separate modes: 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) 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 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. 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 // โŒ 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) Gemini free tier = 15 requests/minute. So I added a 6 second gap between each repo analysis with a progress bar and stop button. // โŒ Old (deprecated) headers["Authorization"] = `token ${token}` // โœ… New (recommended) headers["Authorization"] = `Bearer ${token}` headers["X-GitHub-Api-Version"] = "2022-11-28" GitHub fine-grained tokens are strict about permissions โ€” affiliation=owner causes 422 errors, use type=all instead Gemini model names matter โ€” gemini-2.0-flash-lite with v1beta is the most reliable free tier option Mobile coding is hard but possible โ€” this entire project was built on a mobile phone using GitHub Codespaces ๐Ÿ˜… ๐Ÿ”— 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) [ ] 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