Coder Social home page Coder Social logo

wally's Introduction

Wally Build Status

A toy software status wall application built with Elixir, Phoenix and React. Use it to display your CI build status and latest project activity on a big screen in the office.

Quite a work in progress. Note that this project is absurdly over-engineered, but it is a much a playground as it is an application.

Installation

This project requires both a working installation of Elixir and Node.js (with NPM installed). It uses Redis as its database.

To start your new Phoenix application:

  1. Install dependencies with mix deps.get and then npm install.
  2. Start your Redis database with redis-server.
  3. Start Phoenix endpoint with mix phoenix.server.

Now you can visit localhost:4000 from your browser.

Testing

You can run this project's tests in two parts:

  • Test Elixir back-end code with mix test.
  • Test Javascript front-end code with npm test.
  • As a shortcut, test both using bin/test.

Do make sure you have Redis running the background.

Overview

This application renders a list of projects and their status on the client side, while receiving web hooks from external services on the server side. Using websockets, the client is updated immediately.

Currently the only implemented web hooks are:

  • a Heroku deployment notification;
  • a Codeship build status notification;
  • a Github commit status API notification.

Deploy to Heroku

To deploy this application to a new Heroku application, use this button:

Deploy

wally's People

Contributors

avdgaag avatar tomkr avatar

Stargazers

 avatar Willian Arantes avatar  avatar Angus H. avatar Andrew Kelley avatar Mike avatar Patrick Detlefsen avatar

Watchers

 avatar James Cloos avatar

wally's Issues

Replace Postgres with Redis

It seems that Redis might be good fit for this data model, since we're mostly updating lots of keys and values. Postgres is fine, but Redis is cool and available (in beta) as standard feature on Heroku, which makes setup easy enough.

The main selling point for using Redis would be a much simpler data model, because we no longer need to mangle queries and JSON.

Authentication

Implement an authentication system so only selected services can post to Wally or access its wall (and subscribe to the websocket).

The idea is to track keys in the app and make them part of the URLs you give third parties to post to. That works for hooks, but not for the wall and websockets. This should use a regular browser-based authentication session.

  • Create CRUD interface for API keys (#26)
  • Authenticate key on incoming requests
  • Add regular cookie-based authentication, maybe using HTTP auth, for web interface and websocket.

Inspect projects

Add a Mix task to inspect a project, so you can get the token to add more integrations.

Time ago

Shows a relative date (e.g. "3 days ago")

Acceptance tests

Create some full-stack tests that fire up a browser and see the wall change when events come in.

Application deployment

This is currently implemented for Heroku, but we might want to check if we want to support multiple applications per project.

Omit tokens from front-end code

The React app holds a bunch of data, including project API tokens. It does not need to have that information. Filter it out.

Counter

Shows a simple counter (numeric value)

Remove expired events from front-end

Since events may be removed from the database, we need to let the front-end know they can be removed. Otherwise, the list of events will keep growing forever.

Add expiration to Redis event keys

We don’t need to keep data around forever. Event keys can expire after a while (30 days?) so we track only a limited set of events. The only problem is we also need to update other keys that contain references to those expired keys. We can dot that by observing expirations from Redis and let the application update related keys (the global list of event IDs and project-specific lists of IDs).

Github build state

We only take into account passing or erroring builds. We also get events for pending builds. We can show a yellow indicator then.

CI build status

Accept updates about CI build status. This is currently implemented for Codeship, but maybe this can be adapted to support other services (at the very least, it should not be hard to do so). Also, check if we can support three states: passed, failed and running.

Manage projects

A GUI to manage projects in the system, including their external identification details (a JSON blob).

Logentries webhooks

We can support a range of application-specific notifications as well as Heroku platform error monitoring by implementing hooks at the log level. This feature should support sending custom "events" to Wally (so that Heroku platform errors can be differentiated from new user signups, for example).

Active/all filters

Show either active projects (a few in big type) or all projects (intended for operations on a personal computer, rather than a big screen on the wall).

Update tokens

When things go bad you may want to re-generate the API token for a project. Add a Mix task to do so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.