Developer connects personal Next.js portfolio to GitHub, Hackatime, and Sanity APIs
A developer recently upgraded their Next.js 16 personal portfolio by replacing hardcoded placeholder content with live data from three real APIs. GitHub's GraphQL API was used to fetch pinned repositories, since the REST API does not expose manually pinned repos. Hackatime, an open-source WakaTime fork by Hack Club, was integrated to display real coding hours and language statistics on the about page. Sanity, a headless CMS embedded within the Next.js app, replaced a static blog array and now allows publishing posts without touching code. Key lessons from the process included the necessity of GraphQL for GitHub pinned repos, the importance of API response caching to avoid rate limits, and a non-obvious CORS flag required to prevent an infinite login loop in the Sanity Studio.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in