Skip to content

pluce/frik

Repository files navigation

frik

A slack app to exchange virtual money

Build Status

Dependencies

Needs a Mongo database. Using docker, link name is "mongo" and port 27017.

Install

  • Deploy this somewhere accessible from outside. Docker will help a LOT, Dockerfile is provided and also build script for GKE / Kubernetes.
  • Configure your Slack app commands to use it.

Environment variables

  • MONGO_ADDR sets the mongo host name, default to mongo
  • LOG_LEVEL sets the log level (uahey), default to debug
  • SLACK_TOKEN sets the Slack slash-commands verification token, default to null and no check.

Concepts

A "realm" is an abstraction for a team / world / organization. An "account" is a wallet. The "holder" is the owner of an account.

API

These URL are answering to Slack commands

  • /slack-api/bank returns user account status (command: /bank)
  • /slack-api/pay transfers money from one to another (command: /pay 100 @pluce)
  • /slack-api/forbes returns a Top 10 of the realm account (command: /forbes)

Contributing

Feel free to file bugs or features. If you want to contribute, you can implement something and make a pull request.