All Projects → IBM-Cloud → github-traffic-stats

IBM-Cloud / github-traffic-stats

Licence: Apache-2.0 License
Manage and automatically collect Github traffic statistics for repositories

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to github-traffic-stats

slack-chatbot-database-watson
Code for the solution tutorial "Build a database-driven Slackbot" (chatbot) with a custom extension in IBM Watson Assistant
Stars: ✭ 23 (-23.33%)
Mutual labels:  db2, ibm-cloud, ibm-cloud-functions, ibm-cloud-solutions
CodeEngine
Samples for using Code Engine
Stars: ✭ 69 (+130%)
Mutual labels:  ibm-cloud, code-engine, ibm-cloud-code-engine
vpc-tutorials
Companion scripts to VPC tutorials
Stars: ✭ 14 (-53.33%)
Mutual labels:  ibm-cloud, ibm-cloud-solutions
openwhisk-workshops
IBM Cloud Functions (Apache OpenWhisk) workshops
Stars: ✭ 16 (-46.67%)
Mutual labels:  ibm-cloud, ibm-cloud-functions
jpetstore-kubernetes
Modernize and Extend: JPetStore on IBM Cloud Kubernetes Service
Stars: ✭ 21 (-30%)
Mutual labels:  ibm-cloud, ibm-cloud-solutions
watson-discovery-sdu-with-assistant
Build a Node.js chatbot that uses Watson services and webhooks to query an owner's manual
Stars: ✭ 20 (-33.33%)
Mutual labels:  ibm-cloud, ibm-cloud-functions
cloudco-insurance
A modern insurance company. The application showcases cognitive and cloud computing ideas in the context of insurance.
Stars: ✭ 43 (+43.33%)
Mutual labels:  ibm-cloud, ibm-cloud-solutions
openwhisk-slackapp
A serverless Slack app built with Slack Events API and IBM Cloud Functions
Stars: ✭ 24 (-20%)
Mutual labels:  ibm-cloud, ibm-cloud-solutions
db2-samples
Db2 application code, configuration samples, and other examples
Stars: ✭ 56 (+86.67%)
Mutual labels:  db2
fb-watson
Hands-on developing an application using IBM Watson services with Facebook Messenger integrated through serverless functions
Stars: ✭ 19 (-36.67%)
Mutual labels:  ibm-cloud
okta-angular-openid-connect-example
Angular + Angular CLI with Authentication from OpenID Connect and Okta
Stars: ✭ 19 (-36.67%)
Mutual labels:  openid-connect
keyonic-v2
A Keycloak Mobile Implementation using Angular v4 and Ionic v3
Stars: ✭ 23 (-23.33%)
Mutual labels:  openid-connect
werther
An Identity Provider for ORY Hydra over LDAP
Stars: ✭ 103 (+243.33%)
Mutual labels:  openid-connect
postman-util-lib
🚀 A crypto utility library to be used from Postman Pre-request and Tests script tabs.
Stars: ✭ 42 (+40%)
Mutual labels:  openid-connect
gsh
GSH is an OpenID Connect-compatible authentication system for systems using OpenSSH servers
Stars: ✭ 21 (-30%)
Mutual labels:  openid-connect
Linux-admin
Shell scripts to automate download of GitHub traffic statistics, cluster administration, and create an animated GIF.
Stars: ✭ 23 (-23.33%)
Mutual labels:  github-traffic
haskell-oidc-client
OpenID Connect 1.0 client (RP) library for Haskell
Stars: ✭ 23 (-23.33%)
Mutual labels:  openid-connect
core-dump-handler
Save core dumps from a Kubernetes Service or RedHat OpenShift to an S3 protocol compatible object store
Stars: ✭ 45 (+50%)
Mutual labels:  ibm-cloud
3scale-security-oidc-demo
Securing APIs with OpenID Connect using 3scale API Management and Red Hat Single Sign On
Stars: ✭ 25 (-16.67%)
Mutual labels:  openid-connect
oidc-server-mock
Configurable Mock Server for OpenId Connect
Stars: ✭ 97 (+223.33%)
Mutual labels:  openid-connect

Github Traffic Analytics: Combining serverless web app and eventing

This repository contains code based on this IBM Cloud solution tutorial. In the tutorial, we create an application to automatically collect Github traffic statistics for repositories and provide the foundation for traffic analytics. Github only provides access to the traffic data for the last 14 days. If you want to analyze statistics over a longer period of time, you need to download and store that data yourself. The app and the serverless action discussed in the tutorial implement a multi-tenant-ready solution to manage repositories, automatically collect traffic data on a daily or weekly schedule, and to view and analyze the collected data.

The original solution was based on Cloud Foundry for the web app and Cloud Functions for the automatic, serverless collection of traffic data. The code has been modified into a single Python app. It runs as dockerized container within IBM Cloud Code Engine. The app can be accessed via its web interface as regular web app. Moreover, utilizing eventing, the app receives signals (time events) to automatically collect GitHub traffic data. If not active, IBM Cloud Code Engine automatically scales down the app.

Architecture diagram

Flow:

  1. User accesses the Python (web) app running in IBM Cloud Code Engine. This is to set up the managed GitHub repositories or to access the collected traffic data.
  2. The app interacts with the IBM AppID service for authentication and user management and Db2 as database for user and GitHub traffic data.
  3. A Code Engine cron subscription based contacts the Python app to signal a time event.
  4. Based on the signaled event (3) or directed by an administrator (user), the Python app retrieves GitHub traffic data.

Highlights

The app utilizes IBM Cloud AppID for authentication. It is based on OpenID Connect 2.0. The authenticated users are matched against profiles in the backend database for authorization. This allows partial data view and multi-tenancy.

Daily and weekly data view in tables and some basic charting are fed asynchronously using AJAX callbacks to the app and implemented data APIs.

charting

Database schema

The database schema, defined in database.sql, can be graphically represented as (source in Graphviz DOT notation in dbschema.gv.txt):

License

See LICENSE for license information.

Contribute / Contact Information

If you have found errors or some instructions are not working anymore, then please open an GitHub issue or, better, create a pull request with your desired changes.

You can find more tutorials and sample code at: https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorials

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].