Skip to content

MaadhavBhatt/fork-this-idea-slack-bot

Repository files navigation

Fork This Idea (Slack Bot)

A Slack bot for submitting and voting on ideas, built with Python. Submitted ideas are stored in a Firebase database, and displayed on a web page developed here.

The Slack bot component of this project is being developed under the Thunder You-Ship-We-Ship by Hack Club.

I'm following the tutorial from Slack Developer Tools in the initial stages.

MVP Features

  • Submit ideas
  • Vote on ideas

Future Features

  • View top ideas
  • View recent ideas

Firebase Setup

  1. Create a Firebase project:
  • Go to the Firebase Console
  • Click "Add project" and follow the setup wizard
  • Enter a project name and accept the terms
  • (Optional) Configure Google Analytics
  • Click "Create project"
  1. Create a Realtime Database:
  • In your Firebase project console, click on "Build" in the left sidebar
  • Select "Realtime Database"
  • Click "Create Database"
  • Choose a location for your database (typically the default option is fine)
  • Start in test mode for development (you can update security rules later)
  1. Add a service account key to your project:
  • In your Firebase project console, go to Project Settings (gear icon)
  • Select the "Service accounts" tab
  • Click "Generate new private key" button
  • Save the JSON file securely (you'll need this for your application)
  • Never commit this file to version control

Nest Setup

If you're hosting this bot on Hack Club's Nest, follow these steps:

  1. Create a nest account following the instructions here.
  2. Connect to nest via ssh as described in the guide above.
  3. Clone this repository in the pub/ directory:
cd pub/
git clone https://github.com/MaadhavBhatt/fork-this-idea-slack-bot.git
cd ..
  1. Move update_repo.sh to the root and make it executable. Use it to clone the repository automatically every time you deploy:
mv pub/fork-this-idea-slack-bot/update_repo.sh .
chmod +x update_repo.sh
  1. Create a .env file in the root directory and copy the contents from .env.example, then fill in your Firebase and Slack credentials:
cp pub/fork-this-idea-slack-bot/.env.example .env
nano .env
  1. Copy the example service file into the systemd directory:
cp pub/fork-this-idea-slack-bot/ftibot.service.example ~/.config/systemd/user/ftibot.service
  1. Enable the service and check its status:
systemctl --user daemon-reload
systemctl --user enable --now ftibot.service
systemctl --user status ftibot.service

About

Slack bot for submitting and voting on ideas

Resources

Stars

Watchers

Forks