eessex / apr-dashboard

Home Page:https://aprd.artsy.net/dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APRd (Artsy Real-time Dashboard) CircleCI

APRd (aka. APR dashboard), is a real-time dashboard built in Elixir on Phoenix Framework. For it's real-time dashboard it's using Phoenix Live View to be able to provide websocket based pages that can update in real-time based on updates on the server side.

Meta

Setup

  • Fork the project to your GitHub account

  • Clone your fork:

    $ git clone git@github.com:your-github-username/apr-dashboard.git
    
  • Install dependencies with mix deps.get

  • Create and migrate your database with mix ecto.setup

  • Install Node.js dependencies with cd assets && npm install

  • Copy .env.example to .env

  • We use Phoenix Live View for our real-time data presentation. Make sure to set SECRET_SALT in your .env. Generate a secret salt with:

    • mix phx.gen.secret 32
  • Make set your RabbitMQ setting in .env

  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000/dashboard from your browser.

Architecture

APRd listens on RabbitMQ for different topics. Once it receives a new event, it will store a copy of that event locally in it's database so we can later process the data and provide detailed and aggregated data.

Whenever we receive a new event, after storing the event locally, we use Phoenix's local PUB/SUB to broadcast we received an event. And then our websocket live views are listening on this internal PUB/SUB and they update the data on listening Webosckets reflecting the latest event updated.

About

https://aprd.artsy.net/dashboard


Languages

Language:Elixir 77.7%Language:Shell 7.1%Language:HTML 6.5%Language:JavaScript 5.7%Language:CSS 2.3%Language:Dockerfile 0.7%