Code Monkey home page Code Monkey logo

slackengine's Introduction

SlackEngine

Enable public access to your Slack server!

This is a (partial) clone of slackin for Google App Engine.

It provides

  • A landing page you can point users to fill in their emails and receive an invite
  • A free SSL-secured endpoint at https://<your-project>.appspot.com!

Why Google App Engine?

Most Slack inviters require you to run a server 24/7 to work. However, most users will visit the app once and never come back to it!

With App Engine, you can run your Slack inviter with the App Engine free tier and never worry about it again! If your community starts to receive a lot of traffic, App Engine will automatically scale to handle the load as well.

Slackin is my favorite Slack inviter, but won't run on App Engine without using the Flexible environment. So SlackEngine was born!

How to use

Setup

  • Install the App Engine SDK for PHP if you don't have it.
  • Visit the Google Developers Console, and create a new project.
  • Visit reCAPTCHA, and register your website.
  • Install reCAPTCHA library with Composer
    • run composer install
  • Rename constants.php.example to constants.php
    • Run: mv constants.php.example constants.php
  • Edit constants.php
    • Replace <YOUR-SUBDOMAIN> with your team's Slack subdomain, e.g., if your Slack is myteam.slack.com, your subdomain is myteam
    • Replace <YOUR-API-TOKEN> with your Slack API token
      • You can find your API token at https://api.slack.com/custom-integrations/legacy-tokens
      • Note that the user you use to generate the token must be an admin.
      • You should create a dedicated @slackin-inviter user (or similar), mark that user an admin, and use a token from that dedicated admin user.
      • Replace <YOUR-reCAPTCHA-SECRET> with your reCAPTCHA secret
      • Replace <YOUR-reCAPTCHA-SITEKEY> with your reCAPTCHA site key
      • Replace <YOUR-NOTE> with a small note you want to display
      • Optional Performance Improvements
        • By default, $GETINFO is set to 'true', so SlackEngine will query the Slack API to get the following values. However, this can impact performance once your community goes above 5000 users, causing App Engine to run out of memory and crash.
        • There are two choices to fix this:
          • Set $GETINFO to 'false' and define the following constants:
            • Replace <<YOUR-COMMUNITY-IMAGE> with the URL of a square image representing your community.
            • Replace <<YOUR-COMMUNITY-NAME> with the name of your community.
            • Replace <<YOUR-COMMUNITY-USERCOUNT>> with the approximate number of users in your community.
          • Edit app.yaml
            • Upgrade the instance_class from F1 to F2, F4, or F4_1G.
            • Note: This will stop App Engine from crashing, but will increase costs (only F1 instances are eligible for the free tier). It also won't fully solve the performance issues. The first method will be much faster and cheaper.
  • Launch your app:
    • Run gcloud init to select your project
    • Run gcloud app deploy to deploy to App Engine

Credits

  • The look and feel is heavily inspired by slackin
  • The decision to use PHP was inspired by this gist

License

Licensed under Apache 2.0, see LICENSE for details.

Disclaimer

This is not an official Google product.

slackengine's People

Contributors

mbrukman avatar neojato avatar thesandlord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slackengine's Issues

Backend Failure

Not sure why I keep getting a backend failure everytime the invtier is run..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.