Code Monkey home page Code Monkey logo

teatime's Introduction

TeaTime ☕

Docker Pulls GitHub

TeaTime is the Russian Roulette of tea making (although not strictly limited to tea).

Overview

TeaTime allows your teams to start a round of tea, join with their choice of tea, and (on round end) randomly select someone to make the round of tea.

Slack

Commands

Description Command
Show a list of available commands /teatime help
Start a new round /teatime {group}
Join a round /teatime join {option}
End a round /teatime end
Volunteer to make the round /teatime illmake

Groups

Description Command
Add a group /teatime groups add {name}
Remove a group /teatime groups remove {name}

Options

Description Command
Add a new option for a group /teatime options add {group} {name}
Remove an option from a group /teatime options remove {group} {name}

Example Usage

  1. Create a group called tea

    /teatime groups add tea
    
  2. Add some options to your group

    /teatime options add tea "Earl Grey"
    /teatime options add tea "English Breakfast"
    
  3. Start a new round of tea

    /teatime tea
    

    image

  4. Wait for everyone to join...

    (for those who like commands)

    /teatime join "Earl Grey"
    

    image

  5. (optional) Be a good sport and volunteer to make the round

    /teatime illmake
    

    image

  6. End the round

    /teatime end
    

    image

  7. Congratulations?

Running

Docker

The TeaTime docker image can be found on Docker Hub.

An example docker-compose.yml

version: '3'
services:
  web:
    image: dockdockcontainer/teatime:latest
    restart: always
    ports:
     - "80:80"
    environment:
      SELFHOST: https://demo.example
      MYSQL__HOST: localhost
      MYSQL__USERNAME: username
      MYSQL__PASSWORD: password
      SLACK__OAUTH__ENABLED: true
      SLACK__OAUTH__CLIENTID: demoid
      SLACK__OAUTH__CLIENTSECRET: demosecret
      SLACK__REQUESTVERIFICATION__ENABLED: true
      SLACK__REQUESTVERIFICATION__SIGNINGSECRET: secret

Supported tags

  • latest
  • dev

Environment Variables

Variable Required Description
SELFHOST false The host of the TeaTime application including the scheme, host and port. If not set, this will be generated from the request. Eg https://runteatime.com
MYSQL__HOST true The mysql server host.
MYSQL__PORT false (default 3306) The mysql server port.
MYSQL__USERNAME true The mysql users username.
MYSQL__PASSWORD true The mysql users password.
MYSQL__DATABASE false (default teatime) The mysql database.
SLACK__OAUTH__ENABLED false (default false) Set to true to enable the "Add to Slack" button".
SLACK__OAUTH__CLIENTID true if enabled The "Client ID" for the Slack app.
SLACK__OAUTH__CLIENTSECRET true if enabled The "Client Secret" for the Slack app.
SLACK__REQUESTVERIFICATION__ENABLED false (default false) Set to true to enable Slack request verification
SLACK__REQUESTVERIFICATION__SIGNINGSECRET true if enabled The "Signing Secret" for the Slack app.

License

This project is licensed under the MIT License - see the LICENSE file for details

teatime's People

Contributors

dependabot[bot] avatar matt-trengrove avatar mrsmoke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

teatime's Issues

Use slack dialogues for adding/updating/deleting groups and options

Slack has an option to use dialogues. It would be nice to use a text box in that instead of having to type /teatime options add tea "This is the option i want to add" when creating.

Also would be good to show a dialogue confirming with the user before deleting something.

Quick Fire Round

/teatime tea quickfire <time>

Starts a round of teatime like any other, but the window to join is only <time> and then the round ends itself.

No illmake option

It would be nice when you run teatime you can specify no illmake. Leave it all up to the random lords

Run statistics

There should be the ability to display statistics about runs made in a given room.

Things like

  • Made most tea
  • Made least tea
  • Had most tea made for them
  • etc

Add missing indexes to MySQL tables

Seems that most of the tables only have primary keys.

  • Add foreign keys (which also add indexes for us in MySQL)
  • Add indexes to cover other queries

Random join option

An option to join a round but with a random option (maybe called any?) for those who don't care what they want.

Possible slack commands:
/teatime joinrandom
/teatime joinany
/teatime luckydip
/teatime join random will break if theres an option called random

Automatic run ending

It would be nice to have a run automatically end after a set amount of time without having to type /teatime end

Setting a Time for Tea Time

It would be great to have the functionality to set a time for the tea break.

This is quite common and allows users to give a timeframe for tea orders.

for example:
/teatime set [day] [time] which would set a new tea time (e.g. /teatime set today 2pm)

You could also output the '/teatime end' data at that specific time as a nice additional touch.

1.0.0

Todo

  • Use slack usernames for the orders on run end
  • Install slack button
  • Page styling
  • Store slack access tokens

Options

  • Add
  • Remove

Groups

  • Add
  • Remove

Reminders

After a user is selected as the runner (maker), there should be the ability to keep reminding the user at a given interval to make the tea until dismissed (ie tea has been made).

The time taken to make the tea (or until dismissed) could be logged for use in #2.

Would require a bot user for Slack to pester the user.

illmake command

Implement the illmake command.

  • Running illmake should set the runner of that run to the user who ran the command (thats a lot of run/runner/ran)

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.