Skip to content

๐Ÿ“Š GitHub Stats Enhanced - Beautiful analytics dashboard for any GitHub profile. Features interactive charts, ๐Ÿ† 30+ achievement badges, โšก XP & leveling system, ๐Ÿ”ฎ statistical predictions, and โš”๏ธ battle mode to compare developers. Built with Next.js 16, Tailwind, Recharts & shadcn/ui. No auth required! #10/365 Year Coding Challenge

Notifications You must be signed in to change notification settings

Infyneis/github_stats_enhanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitStats Enhanced

๐Ÿ“Š GitStats Enhanced

Beautiful GitHub analytics with gamification & predictions

Discover your coding patterns, earn achievements, and showcase your developer journey

GitHub LinkedIn

Next.js React TypeScript Tailwind Shadcn Recharts SWR


โœจ Overview

A modern GitHub analytics dashboard that transforms boring stats into an engaging experience. View beautiful visualizations of your contributions, earn achievement badges, level up with XP, get statistical predictions, and battle other developers in head-to-head comparisons!

Completed Theme


๐Ÿš€ Features

Feature Description
๐Ÿ“Š Beautiful Charts Interactive heatmaps, line charts, pie charts, and velocity graphs
๐Ÿ† 30+ Badges Earn achievements across 6 categories with 5 rarity tiers
โšก XP & Levels Level up from "Code Newbie" to "GitHub Legend" (100 levels)
๐Ÿ”ฎ Predictions Statistical forecasts for commits, streaks, and milestones
โš”๏ธ Battle Mode Compare stats with up to 4 developers in competition style
๐ŸŒ™ Dark/Light Mode Beautiful themes with smooth transitions
๐Ÿ“ฑ Mobile First Fully responsive design for all devices
๐Ÿ“ค Export & Share Download stats as PNG, share via link or social media
๐Ÿ”’ No Auth Required Works with any public GitHub profile
โšก Fast & Cached SWR caching for optimal performance

๐Ÿ› ๏ธ Tech Stack

Next.js
Next.js 16
React
React 19
TypeScript
TypeScript
Tailwind
Tailwind 4
shadcn
shadcn/ui
Recharts
Recharts
SWR
SWR
Lucide
Lucide Icons
pnpm
pnpm
GitHub API
GitHub API

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Next.js Frontend                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ ๐Ÿ” Search    โ”‚  โ”‚ ๐Ÿ“Š Dashboard โ”‚  โ”‚ โš”๏ธ Battle Mode        โ”‚  โ”‚
โ”‚  โ”‚ (Home Page)  โ”‚  โ”‚ (User Stats) โ”‚  โ”‚ (Comparisons)         โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    SWR Data Fetching + Caching
                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Core Services                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ ๐Ÿ“ˆ Stats     โ”‚  โ”‚ ๐ŸŽฎ Gamify    โ”‚  โ”‚ ๐Ÿ”ฎ Predictions        โ”‚  โ”‚
โ”‚  โ”‚ Calculator   โ”‚  โ”‚ (XP/Badges)  โ”‚  โ”‚ (Statistical)         โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   GitHub REST API โ”‚
                    โ”‚   (Public, Cached)โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‚ Project Structure

github_stats_enhanced/
โ”œโ”€โ”€ ๐Ÿ“ฆ package.json                   # Dependencies & scripts
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ  layout.tsx             # Root layout with theme provider
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ” page.tsx               # Home page with search
โ”‚   โ”‚   โ””โ”€โ”€ [username]/
โ”‚   โ”‚       โ””โ”€โ”€ ๐Ÿ“Š page.tsx           # User profile dashboard
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ charts/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“… contribution-heatmap.tsx   # GitHub-style calendar
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ activity-chart.tsx         # Area chart
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿฅง language-chart.tsx         # Pie chart
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ โฐ productivity-heatmap.tsx   # Hours x Days grid
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‰ velocity-chart.tsx         # Trend line chart
โ”‚   โ”‚   โ”œโ”€โ”€ features/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ค profile-header.tsx         # User info card
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š metric-cards.tsx           # Stats grid
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ† badge-wall.tsx             # Achievement display
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ โšก level-display.tsx          # XP progress
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ”ฎ predictions-panel.tsx      # Forecasts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ โš”๏ธ comparison-view.tsx        # Battle mode
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ค export-share.tsx           # Export/share buttons
โ”‚   โ”‚   โ”œโ”€โ”€ providers/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐ŸŒ™ theme-provider.tsx         # Dark/light mode
โ”‚   โ”‚   โ”œโ”€โ”€ shared/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽจ header.tsx                 # App header
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐ŸŒ™ theme-toggle.tsx           # Theme switcher
โ”‚   โ”‚   โ””โ”€โ”€ ui/                               # shadcn components
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ”„ use-github-data.ts             # SWR data hook
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒ github-api.ts                  # GitHub API client
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š stats-calculator.ts            # Stats computation
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽฎ gamification.ts                # XP, levels, badges
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ”ฎ predictions.ts                 # Statistical forecasts
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ”ง utils.ts                       # Utilities
โ”‚   โ””โ”€โ”€ types/
โ”‚       โ””โ”€โ”€ ๐Ÿ“ github.ts                      # TypeScript types
โ””โ”€โ”€ ๐Ÿ“– README.md

๐Ÿš€ Quick Start

Prerequisites

  • ๐ŸŸข Node.js 18+ - Download
  • ๐Ÿ“ฆ pnpm - npm install -g pnpm

Installation

# Clone the repository
git clone https://github.com/Infyneis/github-stats-enhanced.git

# Navigate to project
cd github-stats-enhanced

# Install dependencies
pnpm install

# Start development server
pnpm dev

Then open http://localhost:3000 and enter any GitHub username!


๐Ÿ“Š Analytics Features

๐Ÿ“ˆ Core Metrics

Metric Description
๐Ÿ’ป Commits Total commits with trend indicator
๐Ÿ”€ Pull Requests PRs opened and merged
๐Ÿ› Issues Issues created and resolved
๐Ÿ‘€ Code Reviews PR reviews conducted
โญ Stars Earned Total stars across repositories
๐Ÿด Forks Repository forks
๐Ÿ”ฅ Streaks Current and longest streak
๐Ÿ“ Repositories Public repository count

๐Ÿ“… Visualizations

Chart Description
๐ŸŸฉ Contribution Heatmap GitHub-style calendar grid
๐Ÿ“ˆ Activity Timeline Commits, PRs, issues over time
๐Ÿฅง Language Breakdown Top 10 languages with colors
โฐ Productivity Heatmap When you code (hours ร— days)
๐Ÿ“‰ Velocity Trends Weekly commit trends with moving average

๐Ÿ† Gamification System

๐ŸŽ–๏ธ Badge Categories

Category Examples
โฐ Productivity Night Owl, Early Bird, Weekend Warrior
๐Ÿ”ฅ Consistency Week Streak, Month Streak, 365 Day Streak
๐Ÿ‘ฅ Collaboration Code Reviewer, Team Player, Review Master
โญ Impact First Star, Rising Star, Superstar, Polyglot
โšก Velocity Productive Day, Sprint, Speed Demon
๐ŸŽฏ Milestone Beginner, Intermediate, Advanced, Legend

๐Ÿ’Ž Rarity Tiers

Tier Color Difficulty
โšช Common Gray Easy (60%+ users)
๐ŸŸข Uncommon Green Moderate (30-60%)
๐Ÿ”ต Rare Blue Challenging (10-30%)
๐ŸŸฃ Epic Purple Very Hard (1-10%)
๐ŸŸก Legendary Gold Exceptional (<1%)

โšก XP & Leveling

Activity XP
Commit 10 XP
PR Opened 25 XP
PR Merged 50 XP
PR Review 20 XP
Issue Opened 15 XP
Issue Closed 30 XP
Star Received 5 XP
Fork Received 10 XP

Level Titles: Code Newbie โ†’ Junior Developer โ†’ Developer โ†’ Senior Developer โ†’ Lead Developer โ†’ Principal Engineer โ†’ Architect โ†’ Code Wizard โ†’ GitHub Master โ†’ GitHub Legend


๐Ÿ”ฎ Predictions

All predictions use statistical methods (no AI):

Prediction Method
๐Ÿ“Š 30-Day Forecast Linear regression on last 90 days
๐Ÿ”ฅ Streak Probability Survival analysis on historical patterns
๐ŸŽฏ Milestone ETAs Velocity-based extrapolation
๐Ÿ“… Productive Days Day-of-week probability distribution

โš”๏ธ Battle Mode

Compare stats with other developers in competition style:

  • ๐Ÿ‘ฅ Add up to 4 users
  • ๐Ÿ† Head-to-head metric comparisons
  • ๐Ÿ“Š Competition score calculation
  • ๐Ÿฅ‡ Winner highlighting with trophy
  • ๐Ÿ“ค Shareable comparison links

๐ŸŽจ Design System

Color Palette

Color Light Mode Dark Mode Usage
๐Ÿ”ต Primary #1d4ed8 #60a5fa Accents, buttons
๐ŸŸข Success #22c55e #34d399 Positive metrics
๐ŸŸก Warning #f59e0b #fbbf24 Alerts, priorities
๐Ÿ”ด Danger #ef4444 #f87171 Errors, decreasing
โšซ Background #ffffff #0a0a0a Main background
โšซ Card #f9fafb #18181b Card surfaces

Components

  • Glassmorphism cards with backdrop blur
  • Gradient accents and backgrounds
  • Smooth animations with CSS transitions
  • Responsive mobile-first design

๐Ÿ“ฆ Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint

๐ŸŒ API & Rate Limits

GitHub API

Type Rate Limit
Unauthenticated 60 requests/hour
Authenticated 5,000 requests/hour

Caching Strategy

  • User Profile: 5 minutes
  • Repositories: 10 minutes
  • Events: 2 minutes
  • Computed Stats: Session-based

๐Ÿ› Troubleshooting

Rate limit exceeded

# Check current rate limit
curl -s https://api.github.com/rate_limit | jq '.rate'

# Wait for reset or use cached data

User not found

  • Verify the username exists on GitHub
  • Check for typos
  • Ensure the profile is public

Slow loading

  • GitHub API may be slow for users with extensive history
  • Data is cached after first load

๐Ÿš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Self-hosted

# Build
pnpm build

# Start
pnpm start

๐Ÿ“„ License

This project is open source and available for personal/educational use.


๐Ÿ™ Acknowledgments


Made with ๐Ÿ’š by Samy DJEMILI

โฌ†๏ธ Back to top

About

๐Ÿ“Š GitHub Stats Enhanced - Beautiful analytics dashboard for any GitHub profile. Features interactive charts, ๐Ÿ† 30+ achievement badges, โšก XP & leveling system, ๐Ÿ”ฎ statistical predictions, and โš”๏ธ battle mode to compare developers. Built with Next.js 16, Tailwind, Recharts & shadcn/ui. No auth required! #10/365 Year Coding Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published