Home

Awesome

Scrappy

Scrappy is the Slack bot that powers scrapbook.hackclub.com. Scrappy generates your Scrapbook and Scrapbook posts via Slack messages. For more information about how to sign up for Scrapbook, check out the about page.

Click here to view the Scrapbook repository, which hosts the Scrapbook web code.

Commands

Scrappy provides some helpful commands in Slack. These commands are also documented in our Slack if you send the message /scrappy in any channel.

Contributing

Contributions are encouraged and welcome! There are two GitHub repositories that contain code for Scrapbook: the Scrapbook website and Scrappy (the Slack bot). Each repository has a section on contributing guidelines and how to run each project locally.

Development chatter happens in the #scrapbook-dev channel in the Hack Club Slack.

Running locally

In order to run Scrappy locally, you'll need to join the Hack Club Slack. From there, ask @sampoder to be added to the scrappy (dev) app on Slack.

  1. Clone this repository
    • git clone https://github.com/hackclub/scrappy.git && cd scrappy
  2. Install ngrok (if you haven't already)
    • Recommended installation is via Homebrew
    • brew install ngrok
  3. Install dependencies
    • yarn
  4. Create .env file at root of project
    • touch .env
    • Send a message mentioning @creds in Hack Club's Slack asking for the .env file contents
  5. Link your .env with your Prisma schema
    • npx prisma generate
  6. Start server
    • yarn dev
  7. Forward your local server to ngrok
    • ngrok http 3000
    • Your ngrok URL will be printed out after running this command, which you will need for the next step
  8. Update the Slack settings
    • Click the toggle to enable events
    • Update the URL request URL to be <your-ngrok-url>/api/slack/message. An example would look like https://ea61-73-68-194-110.ngrok.io/api/slack/message
    • Save changes and reinstall the Slack app
    • This will regenerate Scrappy's oauth tokens, so make sure to update these in the .env file