Giter Club home page Giter Club logo

hub-traffic's Introduction

Build Status

Demo page view: demo Logged in view: demo

Motivation

Under the Insights->Graphs->Traffic on your repo page, GitHub offers charts that present the traffic statistics (views/clones numbers) for your repo. Unfortunately only stats from the last 14 days are accessible.

!WARNING!

Whoever hosts this app has access to all of the users' GitHub API tokens and repo traffic stats. Access to the tokens is needed for the cron job that updates users' repo stats daily (so that you can log in just once a year, and have stats accessible from the whole year period). Because of that I recommend self-hosting this app for yourself.

Users can revoke their OAuth tokens granted to the hub-traffic app at any time from the GitHub page https://github.com/settings/applications.

Deployment

  1. register new GitHub OAuth app on https://github.com/settings/applications/new
    relevant docs: https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/registering-oauth-apps/
git clone https://github.com/adw1n/hub-traffic
cd hub-traffic
# put in src/main/resources/application.yml your Client ID and Client Secret obtained during step 1)
sudo mkdir -p /opt/hub-traffic/pgdata
sudo docker-compose build
sudo docker-compose up -d

App should be now accessible at http://localhost:8080.

I created a sample nginx config file config/hubtraffic.example.com.nginx that you can put in /etc/nginx/sites-available and then symlink to if from /etc/nginx/sites-enabled. Obviously you need to change the domain name both in the file name and in the file itself.

sudo cp config/hubtraffic.example.com.nginx /etc/nginx/sites-available
sudo ln -s /etc/nginx/sites-available/hubtraffic.example.com.nginx  /etc/nginx/sites-enabled/hubtraffic.example.com
sudo service nginx reload

hub-traffic's People

Contributors

adw1n avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Forkers

enterstudio

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.