Summary
Show a breakdown of programming languages the user has been writing, based on their most active repositories.
What to build
- New API route:
GET /api/metrics/languages
- For each repo in the user's top repos (already fetched at
/api/metrics/repos), call GET /repos/{owner}/{repo}/languages
- Aggregate language byte counts across all repos
- Return top 6 languages with percentages
- New component:
src/components/LanguageBreakdown.tsx
- Display as a horizontal stacked bar + legend
- Use distinct colors per language (map popular languages to known colors: TypeScript → blue, Python → yellow, etc.)
Where to add
Wire into src/app/dashboard/page.tsx — add a new row or next to TopRepos.
Acceptance criteria
Difficulty
Medium — requires chained API calls and a new chart component.
Summary
Show a breakdown of programming languages the user has been writing, based on their most active repositories.
What to build
GET /api/metrics/languages/api/metrics/repos), callGET /repos/{owner}/{repo}/languagessrc/components/LanguageBreakdown.tsxWhere to add
Wire into
src/app/dashboard/page.tsx— add a new row or next toTopRepos.Acceptance criteria
Difficulty
Medium — requires chained API calls and a new chart component.