Skip to content

hackclub/isabelle

Repository files navigation

Isabelle

Isabelle

Isabelle is a Slack bot for discovering events in the Hack Club Slack. It provides an easy way for SAD members to add events to the Hack Club events website and for Hack Clubbers to find events and show interest in events.

Features

  • Event Timeline
  • Creating Events & event management
  • Showing Interest in Events
  • Alerts when an event starts via DMs and email (email is currently disabled)
  • Serving a rest API with all the events

Visit the App Home to see upcoming events and create or propose new events.

Development

To run the bot locally, you'll need to set up a Slack app and run a postgresql database. You'll need to set the following environment variables:

  • SLACK_SIGNING_SECRET - the signing secret for the Slack app. Found on the Slack app dashboard
  • SLACK_BOT_TOKEN - the bot token for the Slack app. Found on the Slack app dashboard after authorising the app
  • SLACK_SAD_CHANNEL - the ID of the private SAD channel. Get this from the channel URL
  • SLACK_APPROVAL_CHANNEL- the ID of the channel events are sent to for approval. Get this from the channel URL
  • POSTGRES_PASSWORD
  • POSTGRES_HOST
  • POSTGRES_PORT
  • GOOGLE_USERNAME - the email address of the Google account to use for sending emails
  • GOOGLE_PASSWORD - the app password of the Google account to use for sending emails
  • PORT - optional, defaults to 3000

For the Slack app, here is the manifest you will need. Make sure to change the command and request URLs.

{
    "display_information": {
        "name": "Isabelle",
        "description": "Broadcasting events straight to you!",
        "background_color": "#1a8779"
    },
    "features": {
        "app_home": {
            "home_tab_enabled": true,
            "messages_tab_enabled": true,
            "messages_tab_read_only_enabled": true
        },
        "bot_user": {
            "display_name": "Isabelle",
            "always_online": false
        },
        "slash_commands": [
            {
                "command": "/create-event",
                "url": "REQUEST_URL",
                "description": "Create an event for events.hackclub.com",
                "should_escape": false
            }
        ]
    },
    "oauth_config": {
        "scopes": {
            "bot": [
                "channels:history",
                "chat:write",
                "chat:write.public",
                "commands",
                "groups:history",
                "groups:read",
                "users:read",
                "users:read.email"
            ]
        }
    },
    "settings": {
        "event_subscriptions": {
            "request_url": "REQUEST_URL",
            "bot_events": [
                "app_home_opened"
            ]
        },
        "interactivity": {
            "is_enabled": true,
            "request_url": "REQUEST_URL"
        },
        "org_deploy_enabled": false,
        "socket_mode_enabled": false,
        "token_rotation_enabled": false
    }
}

To actually run the bot, you can use the following commands:

First, start the database

podman run -d --name isabelledb -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:latest
git clone https://github.com/hackclub/isabelle EventManager
cd EventManager
uv sync
source .venv/bin/activate
# for the full app
python3 main.py
# for the development slack app in socket mode
python3 isabelle/__main__.py

About

Bringing Hack Club events to you

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •