sakshampandey27 / slackpoint-v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an image DOI

License: MIT Github GitHub contributors

build GitHub top language GitHub last commit codecov

Gamify your slack tasks! 💻

A lot of teams use Slack to get things done. However when you have ton of things to do with no short term rewards in sight, it gets difficult to check off those tasks. That's where SlackPoint comes to the rescue! SlackPoint aims to make work more fun and get people motivated to finish their tasks by gamifying Slack!

Check out Slackpoint v1

Our friends had started on this journey of making tasks easy and fun! We're continuing their work to make sure you don't slack off 😉

Check them out here

OldVideo.mp4

Built with

Flask
Python
PostgreSQL

How the Hell do you use this?

List of miracles that slackpoint can perform✨:

  • Create a new task
  • Mark task as done
  • View pending tasks
  • View completed tasks
  • Check the leaderboard to see who's winning!
  • Edit an existing task
  • Get a daily summary delivered to you. Or view it when you want!
  • Get reminders for tasks nearing their deadline
  • Ask for help

lets go over these one by one...

1. Create new task:

You can create a new task by simple using the /create-task command. We ask for just a few more parameters in addition to that:

Command: /create

Create Task GIF

This particular command will create a new task with the description as Hey! This is my new task having 100 points and a deadline of 15th October 2022

2. Mark task as done:

Here you can mark a task as completed. You just need to give the task ID as a parameter

Command: /task-done [task ID]

Example: /task-done 10214

Task Done GIF

This will mark the task having task ID 10214 as completed. Further, updates records to show that this task is completed by user who posted this command

3. View pending tasks:

This command will return the list of incomplete tasks. Relax! no parameters required here

Command: /viewpending [no parameters]

View pending GIF

Above command will display a list of pending tasks

4. View completed tasks:

Like the above command this will return a list of completed tasks. No parameters here as well!

Command: /viewcompleted [no parameter]

View completed GIF

Above command will display a list of completed tasks

5. Leaderboard:

Want to get competitive? Take a peek at the leaderboard and try to beat the winner!

Command: /leaderboard [no parameters]

Leaderboard GIF

It displays the list of the top performers on the channel along with their points.

6. Edit a task:

Made a mistake while adding a task? No problem! Edit the task with values pre-populated as you had entered before.

Command: /edit-task [task ID]

Edit GIF

This particular command will edit your existing task with the description as Hey! This is my edited task having 4 points and a deadline of 15th December 2022

7. Summary:

Got too many tasks? Can't keep track of everything? Now use the summary command to get a summarized version of all tasks and the leaderboard! What's better? You get it delivered to your message box automatically every day!

Command: /summary [no parameters]

Summary GIF

This command will display a list of pending tasks, completed tasks, and the leaderboard.

8. Reminder:

"Am I expected to remember all my tasks with their deadlines?" Well, not anymore! Get reminders delivered to you a day before tasks are due, so you don't have to munch on almonds all the time.

Reminder GIF

This command will display a list of pending tasks due the next day.

9. Help:

Newbie at using slackpoint? You could use some help...

Command: /help [no parameters]

Help GIF

This will provide you will all the available commands and how to use them. Same sh*t this section is doing.

Project documentation

The docs folder incorporates all necessary documents and documentation in our project.

Tools used

Code formatter: black and flake8

Tech stack: Flask, PostgreSQL

📖 Getting started:

Run Locally

Create a virtual environment:

  python3.x -m venv test_env

Activate the virtual environment: Linux/MacOS:

  source test_env/bin/activate

Windows:

  ./test_env/Scripts/activate

Clone the project

  git clone https://github.com/nihar4276/slackpoint-v2.git

Go to the project directory

  cd Slackpoint

Install dependencies

  pip install -r requirements.txt

Log on to api.slack.com and create your own slack bot.

On ngrok shell run 'ngrok http 5000' to get the public IP address in your local machine.

Add all the /commands in the bot configuration and paste the url from ngrok shell to requesting url section in the bot configuration.

Finally, change the URL in interactivity and shortcuts, URL: /slack/interactive-endpoint.

Start the server

  flask run
 - Site will be hosted at:
   `http://127.0.0.1:5000/` 

Before creating the database,

(1) Create a database in PgAdmin with any name convention.

(2) Change the local path of PostgreSQL in .env file (DATABASE_URL= 'postgresql://postgres:(password)@localhost/(database name from PgAdmin')

(3) Provide the Slack sigining secret and Slack bot token from the bot you created.

To create tables in the database,

First run the command 'flask shell'
Next command to create the database - 'db.create_all()'

Project Dependencies

  • flask
  • slackclient
  • python-dotenv
  • slackeventsapi
  • flask-sqlalchemy
  • psycopg2
  • pytest
  • pytest-mock
  • black
  • pylint
  • coverage
  • pytest-cov

Future of this project

  • Assign users to tasks while creating each task
  • Add a command to reassign users
  • Progress of a task is currently binary. It can be improved to allow a percentage progress improvement
  • Improve code coverage
  • UI/UX: Improve leaderboard command response to show gifs/graphs to further make the leaderboard more attractive and gamify it

Developed by NC State students

Hey! We are a group of Graduate students at NC State University, or to be more specific, we are dreamers who want to be pioneers of the Computer Science world. Consider this homework to be one of our many steps at achieving our dreams! 😉

Chat Channel

Our team

  • Nihar Rao, Manish Shinde, Palash Jhamb, Saksham Pandey, Shruti Verma

Reach out to us!

About

License:MIT License


Languages

Language:Python 80.5%Language:PowerShell 10.5%Language:C 5.5%Language:Shell 3.5%