Code Monkey home page Code Monkey logo

consonancejsbot's Introduction

ConsonanceJsBot

Creating a more secure and efficient voting system with a bot using Javascript. This project aims to widen and test our knowledge of Javascript, How to create and manage Bots and most importantly how to work with open source projects. We should try to properly document any additions we are making and try to write the code in the most simple and straight forward way possible.

Stack used

The stack we are using is Botkit bots framework. The docs can be found at their official Github repo And this is also a quick tutorial on how to use Botkit to make and manage slackbots

Local Setup

To setup this project locally, there are two options:

  1. Use Docker (Recommended): A Dockerfile is included in the repository that builds an image for the application. Also a docker-compose.yml file has been included which builds the application image and setups all the dependencies required for testing. So All you have to do is docker-compose up and the bot will be up and running.
  2. Install all dependencies: You would need to install nodejs and mongodb locally in your environment. The run npm start to start the application.

NOTE: Before running each of the steps, ensure all the required environment variables are set. Look inside .env.sample for a list of all required environment variable. If you are using docker, you just need to make a copy of .env.sample and name it .env before running docker compose.

How it should work

Basically, this is a slack bot. There should be a form of interaction between the user and the bot. These are a list of use cases that you can pick up and try to document in the bot.

  1. As a user, one should be able to ask the bot to start a vote (or poll) and specify voting duration.
  2. As a user, one should also be able to tell the bot to stop a poll (or vote) at any time
  3. As a user, one should also be able to request for a summary of all the votes ever casted on the group with thier date and duration.
  4. During a voting period, the channel to vote in should be specified.
  5. We should be able to specify a precise numer of voters expected on a poll in order to avoid spam votes
  6. We should be able to specify a form of voting in which me might have a "for or against" vote or a vote where we can give an array of the parameters to be voted for

Contribution.

You can contribute to this project by simply forking the repo, add your own and send a Pull request.

Questions?

You should contact the project co-ordinator in person of Otuoniyo Harny.

consonancejsbot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.