CodemateLtd/Koffeemate

Name: Koffeemate

Owner: Codemate Ltd

Description: Fresh coffee announcements on Slack. Brewing accidents and statistics too. For Android, written 100% in Kotlin.

Created: 2016-12-16 09:32:22.0

Updated: 2017-12-21 18:31:06.0

Pushed: 2017-02-20 11:16:56.0

Homepage:

Size: 9658

Language: Kotlin

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Koffeemate Logo

Build Status

Koffeemate Screenshot

What?

We at Codemate love coffee. Numerous cups of that sweet black nectar are brewed every day at our office. Coffee is what keeps us productive, creative and especially on Mondays, awake. Simply put, we just couldn't function without it.

Okay, but still, what?

Koffeemate was made for three purposes:

  1. Informing others on Slack when freshly brewed coffee is available
  2. Gathering interesting data of our coffee consumption
  3. Publicly shaming those who leave a giant mess behind while they try to brew coffee.

This project is also a great opportunity to practice some Android testing and architecture skills.

How does it work?

The system is very elegant: we have a cheap Android phone glued to the wall next to our coffee machine. Running this app is the only thing that phone can do. We made this extra secure by taping some cardboard over the physical buttons.

Every time someone starts the coffee machine, they also press the coffee pot button on the center of the screen. After exactly 7 minutes, which is the most appropriate delay we've found, everyone in the special Slack channel gets notified.

However, if someone fails the coffee brewing process, they can be publicly shamed by using the “Log an accident” button.

That's neat! We want it too!

Of course you do. Here's the steps to get it working:

Create a bot user on Slack
  1. Go to the custom integrations page on Slack, and click the `Create a bot user` button.
  2. Click the green `Add Configuration` button on the left.
  3. Choose a username for your bot and click `Add bot integration`.
  4. Configure your bot the way you like. Take note of the API token, you'll need it next.
  5. IMPORTANT: Invite the newly-made bot to any channels you would like the coffee announcements to be made on.
Make it work with Koffeemate
  1. Change to a folder of your liking and do a `git clone https://github.com/CodemateLtd/Koffeemate.git`
  2. Don't open the project yet.
  3. Create an empty `koffeemate.properties` file in your app module with the following contents:

Koffeemate/app/koffeemate.properties:

K_AUTH_TOKEN = your_api_token // Replace with the actual token, without quotation ("") marks

Now you can open the project in Android Studio. Make sure you have the Kotlin plugin installed.

Install the app to an old phone, glue it to a wall near a coffee machine and enjoy!

Contributing

We'd love to have you contribute, and we do not have any strict rules.

However, here's some tips for a great start:

License

right 2016 Codemate Ltd

nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.