Skip to content

foyzulkarim/github-profile-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Profile Metrics

Automated GitHub metrics tracking with a beautiful dashboard.

Why Use This?

Ever wanted to track your GitHub journey over time? Whether you're building your developer portfolio, showcasing your growth to employers, or just curious about how your projects are performing, this template makes it incredibly easy to visualize your GitHub statistics.

Unlike static stats badges that only show current numbers, this template provides:

  • Historical trends - See how your stars, followers, and views grow over time
  • Interactive charts - Beautiful, responsive visualizations powered by Chart.js
  • Zero maintenance - Once set up, it updates automatically every day
  • No coding required - Just use this template, add one secret, and you're done

It works for any GitHub user regardless of account size - from hobbyist with a few repos to open-source maintainer with hundreds.

Dashboard Preview

GitHub Metrics Dashboard

GitHub Metrics Dashboard

Quick Setup

  1. Use this template → Click the green "Use this template" button above
  2. Name your repository → Must be <your-username>/<your-username> for profile README, or any name for standalone metrics
  3. Create a Personal Access Token:
  4. Add the secret:
    • Go to your new repository → Settings → Secrets and variables → Actions
    • Click "New repository secret"
    • Name: METRICS_TOKEN
    • Value: paste your token
  5. Enable GitHub Pages:
    • Go to Settings → Pages
    • Source: "Deploy from a branch"
    • Branch: main, folder: /docs
    • Save
  6. Run the workflow:
    • Go to Actions → "Update GitHub Metrics"
    • Click "Run workflow"
    • Wait ~2 minutes for completion

Your dashboard will be live at: https://<your-username>.github.io/<repo-name>/


My GitHub Stats

Metric Count
Repositories 0
Stars 0
Forks 0
Watchers 0
Followers 0
Views (14 days) 0

Last updated: 2026-01-18 00:21 UTC


Top Repositories (by views, last 14 days)

Repository Views

Features

  • 📊 Interactive Dashboard - Beautiful Chart.js visualizations
  • 🔄 Daily Updates - Automatic metrics collection via GitHub Actions
  • 📈 Historical Tracking - 365 days of rolling data
  • 📱 Responsive Design - Works on desktop and mobile
  • 🔒 Private Data Safe - Only collects public metrics
  • Zero Maintenance - Set it and forget it

How It Works

  1. GitHub Actions runs daily at midnight UTC
  2. Collects metrics via GitHub's GraphQL and REST APIs
  3. Updates this README with latest numbers
  4. Appends data to metrics-history.json
  5. Dashboard reads JSON and renders charts

Customization

Change Update Frequency

Edit .github/workflows/update-metrics.yml:

on:
  schedule:
    - cron: "0 */6 * * *"  # Every 6 hours instead of daily

Modify Dashboard Colors

Edit docs/index.html and change the colors object:

const colors = {
    repos: '#3b82f6',     // Blue
    stars: '#f59e0b',     // Amber
    forks: '#10b981',     // Green
    followers: '#8b5cf6', // Purple
    watchers: '#ec4899',  // Pink
    views: '#06b6d4'      // Cyan
};

Token Permissions Explained

Scope Why Needed
repo Access traffic data (views) for your repositories
read:user Read your profile information (followers)

Troubleshooting

Workflow fails with 401 error:

  • Your METRICS_TOKEN secret may be expired or invalid
  • Generate a new token and update the secret

Dashboard shows "No data":

  • Wait for the first workflow run to complete
  • Check Actions tab for any errors

Views always show 0:

  • Traffic data requires repo scope on your token
  • Traffic data is only available for repos you own

Credits

Built with:

License

MIT License - feel free to use and modify!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •