GithubHelp home page GithubHelp logo

tweag / ciscospark-doorman Goto Github PK

View Code? Open in Web Editor NEW
5.0 6.0 6.0 252 KB

Bot for Cisco Spark that lets you invite people to your space via a URL

License: MIT License

Shell 1.54% JavaScript 51.34% HTML 3.60% CSS 43.52%
cisco-spark bot botkit-bots

ciscospark-doorman's Introduction

๐ŸŽฉ Doorman Bot for Cisco Spark

Doorman is a bot that can manage invitations to a private space. Invite him to a space and he'll give you a URL that you can give to people who might want to join. Add the URL to a forum, email chain, Twitter, or whatever.

Doorman will ask you to review any guests before letting them join your space (or not).

Try it out

The official Doorman bot is [email protected]. Add him to your space and play around.

Deploying your own Doorman bot

Here are instructions for deploying on Heroku, but this can be adapted to any host.

  1. Create a new bot account on Cisco Spark

  2. Clone this repo

  3. Create a new app on heroku

     heroku apps:create my-doorman-bot
    
  4. Add environment variables to the heroku app to match those in .env. e.g.

     heroku config:add PUBLIC_ADDRESS=https://my-doorman-bot.herokuapp.com
    
  5. Add a Redis addon. The Heroku Redis is a good one.

  6. Push to heroku

     git push heroku
    
  7. Add your bot to your space. He'll tell you what to do from there.

Development

Work on the bot

  1. Create a new bot account on Cisco Spark

  2. Clone this repo

  3. Install dependencies

     nvm install
     yarn install
    
  4. Install Redis. If you're on a Mac, do brew install redis

  5. Copy .env to .env.local and customize

     cp .env .env.local
    
  6. Start the local development server

     npm start
    
  7. Run ngrok (or something like it).

    Because Spark uses webhooks to talk to bots, you must run something like ngrok locally to expose your server to the web. We've included a script to do this for you (requires ngrok)

     npm run ngrok
    

Work on the web UI

If you want to redesign the web UI, use these commands to start a server and watch the stylesheets directory for changes.

yarn install
npm run webui-dev

Tests

Run the tests:

npm test

Run the test watcher:

npm run test-watch

ciscospark-doorman's People

Contributors

andrewcroce avatar gsterndale avatar jfield44 avatar nicholaides avatar weddle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ciscospark-doorman's Issues

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.