Skip to content

Zarin21/Github-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Commit Graph Visualizer

A beautiful, interactive web application that visualizes Git commit history as an interactive graph. Built with React and powered by the GitHub API, this tool helps you understand repository evolution at a glance.

🌐 Live Demo: github-visualizer-pi.vercel.app

Features

  • Interactive Graph Visualization: View commit history as an interactive, hierarchical graph using vis-network
  • Direct GitHub Integration: Fetches commit data directly from GitHub's API
  • Click to Explore: Click any commit node to open it directly on GitHub
  • Easy to Use: Simply paste any GitHub repository URL to visualize its commits

Design

The application features a modern, eye-catching design with:

  • Animated gradient background (purple to blue tones)
  • Floating blob effects for visual depth
  • Custom Bitcount font family for a unique aesthetic
  • Smooth animations and hover effects
  • Hierarchical left-to-right commit graph layout

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/Zarin21/github-visualizer.git
cd github-visualizer
  1. Install dependencies:
npm install
  1. Start the development server:
npm start
  1. Open http://localhost:3000 in your browser

Usage

  1. Enter a GitHub repository URL (e.g., https://github.com/facebook/react)
  2. Click "Load Graph"
  3. Explore the interactive commit history visualization
  4. Click any commit node to view it on GitHub
  5. Use mouse controls to:
    • Zoom: Scroll wheel
    • Pan: Click and drag
    • Select: Click on nodes

Built With

  • React - Frontend framework
  • vis-network - Graph visualization library
  • axios - HTTP client for API requests
  • GitHub API - Commit data source
  • Bitcount Fonts - Custom typography

Project Structure

github-visualizer/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html          # Main HTML template
β”‚   └── manifest.json       # PWA manifest
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Graph.js        # Graph visualization component
β”‚   β”‚   └── RepoInput.js    # Repository URL input form
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── githubAPI.js    # GitHub API integration
β”‚   β”œβ”€β”€ App.js              # Main application component
β”‚   β”œβ”€β”€ index.js            # Application entry point
β”‚   └── index.css           # Global styles and animations
└── package.json

Key Features Explained

Graph Visualization

  • Hierarchical layout with commits flowing left to right
  • Each node represents a commit with its message
  • Edges show parent-child relationships between commits
  • Color-coded nodes with hover effects
  • Navigation buttons for easy graph exploration

GitHub Integration

  • Fetches up to 100 most recent commits
  • Displays commit messages, authors, and dates
  • Direct links to GitHub commit pages
  • Works with any public GitHub repository

Controls

  • Zoom In/Out: Mouse wheel or navigation buttons
  • Pan: Click and drag on empty space
  • Move Nodes: Click and drag individual nodes
  • View Commit: Click any node to open on GitHub
  • Tooltip: Hover over nodes to see author and date

Main Interface

image

Commit Graph Visualization

Commit Graph

Interactive Features

When you click on a node, aka a commit, it redirects you to that commit, as shown below: image image

Limitations

  • GitHub API has rate limits (60 requests/hour for unauthenticated users)
  • Currently fetches the last 100 commits from the main branch
  • Requires public repositories (no authentication implemented)

Future Enhancements

  • GitHub OAuth integration for private repos
  • Branch selection dropdown
  • Commit filtering by author/date
  • Search functionality within commits
  • Multiple branch visualization

License

This project is open source and available under the MIT License.

Acknowledgments

About

This project aims to visualize complex commit histories with several branches, merges, and other changes, neatly as a commit graph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors