Skip to main content

Github Review Dashboard

Overview

Review Dashboard Example

Review Dashboard for individual image

Review Dashboard for teams image

Admin Page Example : Repository Data image

Admin Page Example : User Data image

Review Dashboard Structure

├── README.md 
├── api-server
│ ├── controller
│ ├── routes
│ ├── app.ts (Express application setup)
│ ├── server.ts (Server startup script)
├── frontend
│ ├── App.tsx (React application setup)
│ ├── index.tsx (React application startup script)
│ ├── components
├── github-crawler
│ ├── index.ts (Crawler startup script)
│ ├── githubRestAPIRequest.ts (Github Rest API Request)
├── shared
│ ├── db
│ │ ├── entity
│ │ ├── service
│ ├── database.ts (Database setup)

Getting Started

Prerequisites

Programs

  1. Crawler
  2. API Server
  3. Frontend

How to run

installation and setup

Make sure you have installed the prerequisites.

1. clone the repository and install the dependencies

git clone https://github.com/ray5273/Github-Review-Dashboard-and-Alarm-Bot
npm install

2. Start the database

cd db_deploy
podman-compose build
podman-compose up -d

3. Start the Grafana

cd dashboard_deploy
podman-compose build
podman-compose up -d

4. Add the following environment variables to the .env file in the root directory.

  • GITHUB_TOKEN: Github token to access the Github API
  • POSTGRES_USER: Postgres user name
  • POSTGRES_PASSWORD: Postgres password
  • POSTGRES_DB: Postgres database name
  • POSTGRES_HOST: Postgres host
  • HTTP_PROXY: HTTP proxy for the company network (optional)
  • INTERNAL_GITHUB_HOSTNAME: Github Enterprise hostname
  • INTERNAL_GITHUB_TOKEN: Github Enterprise token to access the Github API
GITHUB_TOKEN=
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
POSTGRES_HOST=
HTTPS_PROXY=
INTERNAL_GITHUB_HOSTNAME=
INTERNAL_GITHUB_TOKEN=

Run the programs

1. Run the crawler

ts-node github-crawler/src/index.ts

2. Run the api-server

API server will run on port 8080 by default.

ts-node api-server/src/server.ts

3. Run the Frontend server

Frontend server will run on port 3000 by default.

But you must set the port environment variable to 8081. which is defined in the .env file in the frontend directory.

cd frontend
npm install
npm start

4. Run the Github Alarm Webhook Bot

ts-node github-alarm-bot/src/server.ts

Plans

  • Create a new project
  • Create a crawler to get the data from Github with the following information:
    • PRs
    • Reviews
    • Comments
  • Create a dashboard to show the data
    • Select the dashboard framework or library
    • PRs
    • Reviews
    • Comments
  • Create an admin page to manage the data
    • Newly added Users
    • Newly added Repositories
    • Delete Users
    • Delete Repositories
  • Internal Repository Management
  • Create a Github bot to send the alarm message to the mattermost channel
    • Create a bot account
    • Send the alarm message to the mattermost channel