Minimal streaming service using NATS & shiny on top of Twitter Streaming API.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Streaming Analytics Demo with NATS

This repo contains the assets to create a real-time Shiny app that visualizes tweets based on a certain keyword. Under the hood, we use the Twitter Streaming API to access the tweets and NATS Streaming to process and write them to a MySQL database. The Shiny app queries this database continously to update the data in the dashboard. All the components are containerized and can be deployed using Docker Compose. For more detail, see my blogpost about this project. The dashboard is currently live on

Getting started

You need to have Docker and Docker Compose installed on your machine. To run the the service, clone the repo and build the containers. By default, the keyword to filter the Twitter Stream is "trump". You can change it by updating the .env file.

git clone
cd stream-go-shiny
docker-compose build

To start the service, run:

docker-compose -f docker-compose.yml up

It might take a couple of minutes for all the containers to stand up. You can check http://localhost/twitter for the dashboard, it should look something like this: