In this post, we'll be building a simple GitHub issue tracker similar to waffle.io that shows active issues on a project with specific workflow labels and updates in real time as issues are created and updated on GitHub.

Why Use deepstream?

deepstream.io is an open-source, real-time data streaming server designed for speed and reliability. It's also very simple to get up and running, and there are clients available in a number of programming languages, as well as for JavaScript in the browser. That means we could use deepstream as an out-of-the-box dynamic backend for a static hosted webpage.

deepstream will take care of managing our data and sharing it to the browser client, so we only need to setup deepstream and build a connector that keeps it up-to-date with our GitHub issues.

This post will focus on building a connector using deepstream's Java API and Kohsuke Kawaguchi's GitHub API for Java. I will assume a basic understanding of Java. For brevity, we'll be using a frontend that I built earlier. If you'd like to read more about integrating deepstream with React.js, read the deepstream react tutorial.

Setting Up

Within the client directory, run npm install to install the client dependencies, then run python -m SimpleHTTPServer to start a test server. You should then be able to view the client at localhost:8000.

It's also possible to put your GitHub credentials in this file to avoid this step — see here.

I recommend setting up a test GitHub repository with some issues, and labeling some of them with 'roadmap', 'ready', 'in progress', 'awaiting review', or 'in review'. It's also a good idea to give those labels some nice colors — we'll be using those later on.

Install ngrok which will allow us to listen for external connections from the webhook we'll use later on. Start it using ngrok http 8080, and make note of the forwarding address.

We're using Gradle to manage dependencies.

Building the GitHub connector

Project Setup

In our main method, we set the details of our local deepstream server, the webhook URI given when you start ngrok, and the GitHub repository that we're getting our issues from.