Skip to content
Chris Shockley

Software Engineer

Back to Blog

GitHub Profile Analyzer

Deep insights into your GitHub activity and coding patterns

GitHub Profile Analyzer

The Challenge

GitHub's REST API has strict rate limits (5,000 requests/hour). Fetching data for users with hundreds of repositories and analyzing language statistics would quickly exhaust the limit.

The Solution

Implemented an in-memory caching strategy with 5-minute TTL that reduces API calls by 80% for returning users. Added batch processing for repository language analysis and a rate limit monitoring endpoint that displays current usage.

My Role

Solo Full-Stack Developer

Timeline

Personal Project - 2024

Technologies Used

Next.js 15TypeScriptTailwind CSS 4NextAuth.js 5@octokit/restRechartsFramer MotionBiome

Key Features

  • OAuth authentication with secure GitHub integration
  • Visual analytics including language distribution, activity timelines, and contribution heatmaps
  • Interactive Year in Review with story-style presentation
  • Smart caching system with 5-minute TTL to optimize API rate limits

Challenges & Solutions

GitHub API Rate Limiting

Challenge:

GitHub's REST API has strict rate limits (5,000 requests/hour). Fetching data for users with hundreds of repositories and analyzing language statistics would quickly exhaust the limit.

Solution:

Implemented an in-memory caching strategy with 5-minute TTL that reduces API calls by 80% for returning users. Added batch processing for repository language analysis and a rate limit monitoring endpoint that displays current usage.

Data Visualization Performance

Challenge:

Rendering contribution heatmaps (365 data points) and complex charts caused performance issues on mobile devices, particularly during animations.

Solution:

Leveraged Recharts' built-in optimizations, implemented progressive loading with React Suspense, and used Next.js Server Components for initial rendering. Added loading skeletons for better perceived performance. Achieved consistent 60fps animations.

OAuth Flow Complexity

Challenge:

Managing OAuth flows across development and production environments while handling edge cases (denied permissions, network errors, invalid tokens) was complex and error-prone.

Solution:

Integrated NextAuth.js 5 which handles OAuth flows, session management, and token refresh automatically. Created environment-specific configuration for callback URLs and implemented comprehensive error handling with user-friendly messages.

What I Learned

  • 💡Rate limiting isn't just about hitting limits - proactive caching improves UX even when under limits
  • 💡NextAuth.js is worth the learning curve - OAuth is complex and easy to get wrong
  • 💡Progressive loading and skeletons matter more than raw speed for perceived performance
  • 💡Server Components in Next.js 15 significantly reduce client-side JavaScript and improve initial load
  • 💡Visualization libraries like Recharts handle optimization better than custom D3 implementations

Interested in working together?

Let's build something amazing together

GitHub Profile Analyzer: Making Code Stories Visual

GitHub's native analytics provide basic statistics, but developers lack a comprehensive way to understand their coding patterns, language preferences, and contribution trends. I wanted to create a tool that transforms GitHub data into beautiful, shareable insights.

The Vision

As developers, our GitHub profiles tell a story - but that story is scattered across dozens of repositories, thousands of commits, and years of contributions. This project aggregates that data into a cohesive narrative with intuitive visualizations.

Technical Architecture

Built on Next.js 15 with the GitHub REST API, the application uses OAuth for secure authentication and implements a sophisticated caching layer to work within GitHub's rate limits. The frontend leverages Recharts for performant data visualization and Framer Motion for smooth animations.

Key Technical Decisions

NextAuth.js for OAuth: Rather than implementing OAuth flows manually, I chose NextAuth.js to handle the complexity of token management, session storage, and refresh logic.

In-Memory Caching: A 5-minute TTL cache dramatically reduces API calls for returning users while keeping data fresh enough for meaningful updates.

Server Components: Next.js 15's Server Components handle initial data fetching, reducing client-side JavaScript and improving time-to-interactive.

The Year in Review Feature

The standout feature is an interactive "Year in Review" that presents a developer's statistics in a story-style format with keyboard navigation. It aggregates commits, languages, repositories, and contributions into a shareable celebration of their work.