How this portfolio shows live GitHub stats with Next.js
The GitHub section on this portfolio is a Next.js server component. It calls the GitHub REST API for my profile and my repositories, so visitors never wait on the browser to fetch it.
Responses are cached with a one-hour revalidation window. That keeps the page fast and keeps me well inside GitHub's anonymous limit of 60 requests per hour. Adding a personal access token as an environment variable raises that limit.
Forks are filtered out so the numbers reflect work I wrote. Languages are counted per repository, and the top repositories are sorted by stars, then by most recent push.
If GitHub is unreachable, the section falls back to a link to my profile instead of breaking the page. A new repository shows up on the site within the hour without any code change.