GitHub Analytics Dashboard

An interactive dashboard for in-depth analysis of GitHub user statistics. Use the dashboard below to get a comprehensive look at any user's profile, including contribution history, language stats, and repository details.

Explore a GitHub Profile

API Documentation

This dashboard is powered by the GitHub Analytics API. You can use it directly in your own projects. For interactive API exploration, see Swagger UI or ReDoc.

General

GET/ Custom API Documentation

+

Provides this custom HTML documentation page for the API.

For interactive API exploration and testing, you can use:

Example Request

GET /

Response

<!DOCTYPE html>
<html>
    <head>...</head>
    <body>... API Documentation ...</body>
</html>

GET/docs Swagger UI API Documentation

+

Provides interactive API documentation using Swagger UI. This interface allows you to explore endpoints, view models, and test API calls directly in your browser.

Example Request

GET /docs

Response

Returns the Swagger UI interface.

<!DOCTYPE html>
<html>
    <head>... Swagger UI ...</head>
    <body>... Interactive Documentation ...</body>
</html>

GET/redoc ReDoc API Documentation

+

Provides alternative API documentation using ReDoc. This interface offers a clean, three-panel view of your API specification, ideal for reading and understanding the API structure.

Example Request

GET /redoc

Response

Returns the ReDoc UI interface.

<!DOCTYPE html>
<html>
    <head>... ReDoc ...</head>
    <body>... API Documentation ...</body>
</html>

User Analytics

GET/{username}/languages Get User's Programming Languages

+

Get the programming languages used in a GitHub user's repositories.

Parameters

exclude Optional comma-separated list of languages to exclude (default: Markdown, JSON, YAML, XML)

Example Request

GET /tashifkhan/languages?exclude=HTML,CSS

Response

[
    {
        "name": "Python", 
        "percentage": 45.0
    },
    {
        "name": "JavaScript", 
        "percentage": 30.0
    }
]

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

GET/{username}/contributions Get User's Contribution History

+

Retrieve a user's GitHub contribution history and statistics, including contribution calendar data, total commits, and longest streak.

starting_year Optional starting year for contribution history (defaults to account creation year)

Example Request

GET /tashifkhan/contributions?starting_year=2022

Response

{
    "contributions": {
        "2023": {
            "data": {
                "user": {
                    "contributionsCollection": {
                        "weeks": []
                    }
                }
            }
        }
    },
    "totalCommits": 1234,
    "longestStreak": 30,
    "currentStreak": 15
}

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

GET/{username}/stats Get User's Complete Statistics

+

Get comprehensive GitHub statistics for a user, combining top programming languages, total contribution count, longest contribution streak, current streak, profile visitors count, and contribution history data.

exclude Optional comma-separated list of languages to exclude

Example Request

GET /tashifkhan/stats?exclude=HTML,CSS,Markdown

Response

{
    "status": "success",
    "message": "retrieved",
    "topLanguages": [
        {"name": "Python", "percentage": 45}
    ],
    "totalCommits": 1234,
    "longestStreak": 30,
    "currentStreak": 15,
    "profile_visitors": 567,
    "contributions": { ... }
}

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

GET/{username}/profile-views Get and Increment Profile Views

+

Gets the current profile views count for a user and optionally increments it. Similar to the GitHub Profile Views Counter service.

increment Optional boolean to increment the view count (default: true)
base Optional base count to set (for migration from other services)

Example Request

GET /tashifkhan/profile-views?increment=true

Response

{
    "username": "tashifkhan",
    "views": 1234,
    "incremented": true
}

Usage Examples

Basic usage (increments count):

GET /tashifkhan/profile-views

Get count without incrementing:

GET /tashifkhan/profile-views?increment=false

Set base count for migration:

GET /tashifkhan/profile-views?base=1000

Pull Request & Organization Endpoints

GET/{username}/me/pulls Get User's Pull Requests (Own Repos)

+

Returns all pull requests created by the user in their own repositories, including their status (merged, closed, or open).

Example Request

GET /tashifkhan/me/pulls

Response

[
    {
        "repo": "RepoName",
        "number": 123,
        "title": "Fix bug in feature X",
        "state": "merged",
        "created_at": "2023-01-01T12:00:00Z",
        "updated_at": "2023-01-02T12:00:00Z",
        "closed_at": "2023-01-02T12:00:00Z",
        "merged_at": "2023-01-02T12:00:00Z",
        "user": "tashifkhan",
        "url": "https://github.com/tashifkhan/RepoName/pull/123",
        "body": "This PR fixes ..."
    }
]

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

GET/{username}/org-contributions Get Organizations Contributed To

+

Returns all organizations where the user has contributed (via merged PRs), and the repositories they contributed to.

Example Request

GET /tashifkhan/org-contributions

Response

[
    {
        "org": "openai",
        "org_id": 123456,
        "org_url": "https://github.com/openai",
        "org_avatar_url": "https://avatars.githubusercontent.com/u/123456?v=4",
        "repos": ["repo1", "repo2"]
    }
]

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

GET/{username}/prs Get PRs Opened in Other People's Repos

+

Returns all pull requests opened by the user in other people's repositories (not their own), including their status (merged, closed, or open).

Example Request

GET /tashifkhan/prs

Response

[
    {
        "repo": "OtherRepo",
        "number": 456,
        "title": "Add new feature",
        "state": "closed",
        "created_at": "2023-02-01T10:00:00Z",
        "updated_at": "2023-02-02T10:00:00Z",
        "closed_at": "2023-02-02T10:00:00Z",
        "merged_at": null,
        "user": "tashifkhan",
        "url": "https://github.com/otheruser/OtherRepo/pull/456",
        "body": "Implements ..."
    }
]

Error Responses

404 - User not found or API error

500 - GitHub token configuration error

Dashboard Details

GET/{username}/repos Get User's Repository Details

+

Retrieves detailed information for each of the user's public repositories, including README content (Base64 encoded), languages, commit count, and stars count.

Example Request

GET /tashifkhan/repos

Response

[
    {
        "title": "RepoName",
        "description": "A cool project.",
        "live_website_url": "https://example.com",
        "languages": ["Python", "JavaScript"],
        "num_commits": 42,
        "stars": 25,
        "readme": "BASE64_ENCODED_README_CONTENT"
    }
]

Error Responses

404 - User not found (may return empty list if service handles this way)

500 - GitHub token configuration error or API error

GET/{username}/stars Get User's Stars Information

+

Retrieves stars information for a user's repositories including total stars and detailed repository information. Repositories are sorted by star count (highest first).

Example Request

GET /tashifkhan/stars

Response

{
    "total_stars": 150,
    "repositories": [
        {
            "name": "RepoName",
            "description": "A popular project",
            "stars": 100,
            "url": "https://github.com/user/repo",
            "language": "Python",
            "created_at": "2023-01-01T00:00:00Z",
            "updated_at": "2023-12-01T00:00:00Z"
        }
    ]
}

Error Responses

404 - User not found or API error

500 - GitHub token configuration error or API error

GET/{username}/commits Get User's Commit History Across All Repositories

+

Retrieves a list of all commits made by the user across all their owned repositories, sorted by timestamp (most recent first).

Example Request

GET /tashifkhan/commits

Response

[
    {
        "repo": "RepoName",
        "message": "Fix: A critical bug",
        "timestamp": "2023-01-01T12:00:00Z",
        "sha": "commit_sha_hash",
        "url": "https://github.com/user/repo/commit/sha"
    }
]

Error Responses

404 - User not found (may return empty list if service handles this way)

500 - GitHub token configuration error or API error

Error Responses

User not found

+
{
    "status": "error",
    "message": "User not found or API error",
    "topLanguages": [],
    "totalCommits": 0,
    "longestStreak": 0,
    "currentStreak": 0
}

Server error

+
{
    "status": "error",
    "message": "GitHub token not configured",
    "topLanguages": [],
    "totalCommits": 0,
    "longestStreak": 0,
    "currentStreak": 0
}