Giter Club home page Giter Club logo

contribution-graph's Introduction

GitHub Contribution Graph Generator

GitHub Contribution Graph

This project provides a service to generate and display GitHub-style contribution graphs for any GitHub user. It's perfect for adding a visual representation of your GitHub activity to your profile README or any other markdown file.

Features

  • Generate contribution graphs similar to those on GitHub profiles
  • Customizable for any GitHub username
  • Responsive SVG output that scales well on different devices
  • Includes month and day labels for better context
  • Displays a color legend for contribution intensity

Usage

To use this in your GitHub README or any markdown file, simply add the following line:

![GitHub Contribution Graph](https://contribution-graph-ohi6.onrender.com/api/graph?username=YourGitHubUsername)

Replace YourGitHubUsername with the GitHub username for which you want to generate the graph.

Usage

  1. Customizing Size

    You can adjust the size of the graph by using HTML in your markdown:

    <img src="https://contribution-graph-ohi6.onrender.com/api/graph?username=YourGitHubUsername" width="720" height="112" alt="GitHub Contribution Graph" />
  2. Linking to Profile

    Make the graph clickable and link to the GitHub profile:

    [![GitHub Contribution Graph](https://contribution-graph-ohi6.onrender.com/api/graph?username=YourGitHubUsername)](https://github.com/YourGitHubUsername)
  3. Refreshing the Graph

    To ensure your graph is up-to-date, add a query parameter that changes:

    ![GitHub Contribution Graph](https://contribution-graph-ohi6.onrender.com/api/graph?username=YourGitHubUsername&v=1)

    Increment the v value when you want to refresh the image.

API

The API endpoint is:

https://contribution-graph-ohi6.onrender.com/api/graph

Query Parameters:

  • username: The GitHub username (required)

Local Development

  1. Clone the repository
  2. Install dependencies with npm install
  3. Create a .env.local file and add your GitHub token:
    GITHUB_TOKEN=your_personal_access_token
    
  4. Run the development server with npm run dev
  5. Open http://localhost:3000 in your browser

Deployment

This project is designed to be easily deployed on platforms like Render or Vercel. Make sure to set the GITHUB_TOKEN environment variable in your deployment settings.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by the GitHub contribution graph
  • Built with Next.js and React

contribution-graph's People

Contributors

johndev19 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.