A modern, full-stack Next.js application that calculates and displays your GitHub contribution streak stats. You can use this app to generate beautiful, highly accurate contribution streak badges and embed them directly into your GitHub README.
Existing GitHub streak tracking tools often fall short by only measuring public contributions, completely ignoring the hard work developers put into private repositories. This can be highly frustrating when your "streak" drops to zero despite you coding every single day. I built this GitHub Streak Counter to overcome that limitation—it accurately measures all your activity, including your private commit history, ensuring your true dedication and daily coding efforts are properly recognized.
- Accurate Streak Calculation: Utilizes the GitHub GraphQL API to fetch user contribution data and accurately determine the current and longest streaks.
- Beautiful UI: Designed with Tailwind CSS v4, featuring smooth transitions, dynamic background gradients, and dark mode support.
- Debounced Search: A seamless user experience with debounced username searching, displaying loading states and error handling elegantly.
- Customizable Themes: Multiple carefully tuned themes (Default, Emerald, Ocean, Sunset, Midnight, Monochrome, Neon) to customize your streak display.
- Embeddable Badges: (Planned/Available) easily generate URLs to embed SVG/PNG badges directly into your
README.mdon GitHub.
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling: Tailwind CSS v4
- Icons: Lucide React
- Data Fetching: GitHub GraphQL API
You will need a GitHub Personal Access Token to authenticate with the GitHub API.
- Go to your GitHub Settings > Developer Settings > Personal access tokens.
- Generate a new token (classic or fine-grained) with
read:userandrepo(if you want to include private contributions) permissions.
-
Clone the repository:
git clone https://github.com/your-username/github-streak.git cd github-streak -
Install dependencies:
npm install # or yarn install # or pnpm install
-
Set up environment variables: Create a
.env.localfile in the root directory and add your GitHub token:GITHUB_TOKEN=your_personal_access_token_here
-
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 with your browser to see the application.
To be configured based on your deployment URL.
Once deployed, you can add your streak stats to your GitHub README by using an image tag pointing to the API route:
[](https://your-deployment-url.com/)Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.