Click on the image below to view the demo video of the project
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!
-
Deployment of the server from ngrok to the cloud ☁️ - via Heroku. We no longer need re-routing of localhost to ngrok since our server has been deployed on the cloud (https://slackpoint-server.herokuapp.com/).
-
Deployment of the database from local to the cloud ☁️ - on Heroku Postgres which uses AWS EC2 instances at the backend to scale up and down dewpending on the amount of data.
Here is a list of features added during phase 2 of this project:
- Functionality for assigning a user while creating task - tasks can now be assigned to different members of the slack channel.
- Ensuring that the person updating task to completed has to be the same person who the task has been assigned to.
- Viewpending tasks for me - Any user can now see what tasks assigned to them specifically are pending. This enables real-time agile board style coordination on slack.
- Notifications: The person who the task is assigned to gets notified when this happens. Notifications have also been added for a variety of edge cases (for instance, if a user tries to mark a task not assigned to them as completed)
- Update tasks: A major functionality that allows updating tasks has been added. A wide array of edge cases have been handled here (such as a person who has not created a task cannot update it, etc).
- View tasks pending today: Users can view the list of tasks pending today.
The docs
folder incorporates all necessary documents and documentation in our project.
Code formatter: black and flake8
Tech stack: Flask, PostgreSQL
-
- Download Python3.x.
- Download Flask.
- Download PostgreSQL
- Download Pgadmin
Clone the project
git clone https://github.com/kartikson1/slackpoint.git
Go to the project directory
cd Slackpoint
Create a virtual environment:
python3 -m venv test_env
Activate the virtual environment: Linux/MacOS:
source test_env/bin/activate
Windows:
./test_env/Scripts/activate
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()'
- flask
- slackclient
- python-dotenv
- slackeventsapi
- flask-sqlalchemy
- psycopg2
- pytest
- pytest-mock
- black
- pylint
- coverage
- pytest-cov
List of miracles that slackpoint can perform✨:
- Create a new task
- Mark task as done
- View pending tasks
- View completed tasks
- Ask for help
lets go over these one by one...
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
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
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
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
This command will return the list of incomplete tasks. Relax! no parameters required here
Command: /viewpending [no parameters]
Above command will display a list of pending tasks
Like the above command this will return a list of completed tasks. No parameters here as well!
Command: /viewcompleted [no parameter]
Above command will display a list of completed tasks
Want to get competitive? Take a peek at the leaderboard and try to beat the winner!
Command: /leaderboard [no parameters]
It displays the list of the top performers on the channel along with their points.
Newbie at using slackpoint? You could use some help...
Command: /help [no parameters]