Ember powered kegerator
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
public
tests
vendor
.bowerrc
.codeclimate.yml
.editorconfig
.ember-cli
.env.example
.eslintignore
.eslintrc
.gitignore
.jscsrc
.jshintrc
.template-lintrc.js
.travis.yml
.watchmanconfig
CHANGELOG.md
LICENSE
README.md
bower.json
ci_success.sh
ember-cli-build.js
package.json
testem.js

README.md

Danger Brewing Code Climate

The Ember-powered kegerator.

Overview

This is a web application that collects data from the Danger Brewing Hub. Your kegerator might consist of:

  • Flow meters - to monitor beer distribution
  • Sensors - to monitor temperature, humidity, etc.

Administer your kegerator in real-time or let everyone know what's on tap.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone <repository-url> this repository
  • change into the new directory
  • npm install && bower install

Configuration

  • Sign up for Firebase - it's free
    • You might want to create two projects, for development and production.
  • cd into this directory
    • cp .env.example .env.dev
    • cp .env.example .env.production - if using ember-cli-deploy
  • Update each file with ENV variables
    • FIREBASE_API_KEY: Firebase API Key
    • FIREBASE_DOMAIN: Firebase domain
    • FIREBASE_DATABASE: Firebase database URL
    • FIREBASE_STORAGE: Firebase storage bucket
    • GA: Google Analytics property ID
  • The resulting file(s) should look like:
FIREBASE_API_KEY=abc123
FIREBASE_DOMAIN=my-app.firebaseapp.com
FIREBASE_DATABASE=https://my-app.firebaseio.com
FIREBASE_STORAGE=my-app.appspot.com
GA=UA-000-12
  • Setup an admin user
    • Navigate to your Firebase dashboard, Auth
    • Enable email/password authentication.
    • Add a new user with whatever email and password you choose.
  • Add database index
    • Navigate to your Firebase dashboard, Database
    • Click the Rules tab
    • Update your rules to look as follows:
    {
      "rules": {
        ".read": true,
        ".write": "auth != null",
        "beers": {
          ".indexOn": ["active"]
        }
      }
    }
    
  • Integrate with your kegerator - Launch the application:
    • ember server
    • Navigate to Login
    • Log in as your admin user you setup.
    • Navigate to Status and Add Hub.
      • Now that you have a hub, you can add Taps and Sensors.
    • The Hub IDs, along with tap and sensor IDs, will be used to integrate your kegerator to Firebase.

Running / Development

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • ember test
  • ember test --server

Building

  • ember build (development)
  • ember build --environment production (production)

Deploying

  • Heroku

    • Set your ENV values, similar to .env.example
    • heroku buildpacks:set https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz
    • git push heroku master
  • ember-cli-deploy

Contributing

  • Follow the GitHub Flow
    • branch master
    • code
    • issue a pull request when ready

Further Reading / Useful Links