Skip to content

Repository files navigation

🌟 starGHazer

Easily track statistics of a GitHub repo without authentication

image

🚧 This project is under construction 🚧

About The Project

Note

The name comes from one of the API endpoint called stargazer (= all the people that starred a repo), combined with GH for GitHub initials

This project allows you to track some statistics of a GitHub repo using GitHub's Rest API. Currently, it tracks count of :

  • ⭐ Repo's stars
  • 🎯 Repo's issues
  • 🔱 Repo's forks
  • 🌿 Repo's branches

You also have the ability to easily add events

No authentication is needed.

Every time you will call the main program, 1 call to the API is made + 1 or more depending on how much branch your repo has (1 request made every 100 branches, which is the max pagination returned by the endpoint).

Important

The API rate limit is 60 call/hour so if you start the main program to many times and/or have too many branches on fetched repo, you might end-up being blocked for an hour

Built With

NodeJS
Chart.js
TypeScript

Getting Started

Requirements

  • node 20+
  • npm 10.9+
  • tsc 4+ (typescript)

Installation steps

  1. Clone the repo and cd into it
git clone https://github.com/Axxiar/starGHazer.git
cd starGHazer/
  1. Rename .env.example file to .env

  2. Edit .env and replace with the owner (REPO_OWNER) and name (REPO_NAME) of the repository you want to track

e.g. to track this repo : https://github.com/catppuccin/palette, the owner is "catppuccin" and the repo name is "palette", so you should have this as .env file :

REPO_OWNER="catppuccin"
REPO_NAME="palette"
  1. Install dependecies and build the project
npm install
npm run build
  1. Finally, start the project
npm run all  # equivalent to:  node dist/starghazer.js --fetch && node dist/starghazer.js --serve

NPM scripts

Here are available npm scripts :

build:server: builds js server-side files from typescript

build:client: builds js client-side files from typescript

build: build:server & build:client

server: start the server

fetch: fetch api data and store them

all: build & fetch & server

dev: build & server

clean: remove built files

Roadmap (ordered by importance)

  • 🗝 Support for events
  • 🗝 Setup config files and guide
  • 🗝 Typescript rewrite
  • 🗝 Support separated stats file to avoid large files
  • 🔥 Support Mermaid graph for READMEs
  • 🔥 Visually select displayed year data
  • 🔥 Terminal wizard for first setup
  • 🔥 Add CI/CD
  • 🔥 Deployment config and guide for linux/raspberry pi based server using cronjobs
  • ❓ Support for multiple days events
  • ❓ More statistics

🗝: key feature 🔥: cool extra feature idea ❓: extra feature idea (wil probably not be added or at least not soon)

Contributing

If you wish to contribute, feel free to do so ! You can fork and open PRs.

License

GNU General Public License v3.0

(back to top)

About

Track statistics of GitHub repo without auth

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages