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.
Koffeemate was made for three purposes:
- Informing others on Slack when freshly brewed coffee is available
- Gathering interesting data of our coffee consumption
- 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.
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.
Of course you do. Here's the steps to get it working:
- Go to the custom integrations page on Slack, and click the
Create a bot user
button. - Click the green
Add Configuration
button on the left. - Choose a username for your bot and click
Add bot integration
. - Configure your bot the way you like. Take note of the API token, you'll need it next.
- IMPORTANT: Invite the newly-made bot to any channels you would like the coffee announcements to be made on.
- Change to a folder of your liking and do a
git clone https://github.com/CodemateLtd/Koffeemate.git
- Don't open the project yet.
- Create an empty
koffeemate.properties
file in your app module with the following contents:
Koffeemate/app/koffeemate.properties:
SLACK_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!
We'd love to have you contribute, and we do not have any strict rules.
However, here's some tips for a great start:
- We love PR's related to test coverage / code cleanliness improvements.
- Out of ideas? Look for the issue tracker for something to do. Tell if you want to do something, and we'll assign it to you.
- If you have something big in mind, create an issue first. Major functionality changes might not necessarily get merged.
Copyright 2016 Codemate Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.