Code Monkey home page Code Monkey logo

botkit-starter-ciscospark's Introduction

This repo is deprecated!

To get a fresh Botkit starter kit, use the Yeoman generator or remix a starter kit on Glitch

npm install -g yo generator-botkit
yo botkit

Botkit Starter Kit for Cisco Spark Bots

This repo contains everything you need to get started building a Cisco Spark bot with Botkit.

Botkit is designed to ease the process of designing and running useful, creative bots that live inside messaging platforms. Bots are applications that can send and receive messages, and in many cases, appear alongside their human counterparts as users.

Some bots talk like people, others silently work in the background, while others present interfaces much like modern mobile applications. Botkit gives developers the necessary tools for building bots of any kind! It provides an easy-to-understand interface for sending and receiving messages so that developers can focus on creating novel applications and experiences instead of dealing with API endpoints.

Our goal with Botkit is to make bot building easy, fun, and accessible to anyone with the desire to create a future filled with talking machines!

If you are looking to create a bot on other platforms using Glitch, check out the Botkit project page.

What's Included

  • Botkit core - a complete programming system for building conversational software
  • Pre-configured Express.js webserver including:
    • A customizable "Install my Bot" homepage
    • Webhook endpoints for communicating with platforms
  • Sample skill modules that demonstrate various features of Botkit
  • A component that manages your app's webhook subscriptions

Getting Started

There are a few steps to get started on working on a Botkit bot:

Installing Botkit

Remix this project on Glitch

Deploy to Heroku

Clone this repository:

git clone https://github.com/howdyai/botkit-starter-ciscospark.git

Install dependencies, including Botkit:

cd botkit-starter-ciscospark
npm install

Set up your Cisco Spark Application

Once you have setup your Botkit developer enviroment, the next thing you will want to do is set up a new Cisco Spark application via the Cisco Spark developer portal. This is a multi-step process, but only takes a few minutes.

Read this step-by-step guide to make sure everything is set up.

Update the .env file with your newly acquired tokens.

Launch your bot application by typing:

node .

Cisco Spark requires your application be available at an internet-accessible endpoint. To expose an endpoint during development, we recommend using localtunnel.me or ngrok, either of which can be used to temporarily expose your bot to the internet.

Now comes the fun part of making your bot!

Extend This Starter Kit

This starter kit is designed to provide developers a robust starting point for building a custom bot. Included in the code are a set of sample bot "skills" that illustrate various aspects of the Botkit SDK features. Once you are familiar with how Botkit works, you may safely delete all of the files in the skills/ subfolder.

Developers will build custom features as modules that live in the skills/ folder. The main bot application will automatically include any files placed there.

A skill module should be in the format:

module.exports = function(controller) {

    // add event handlers to controller
    // such as hears handlers that match triggers defined in code
    // or controller.studio.before, validate, and after which tie into triggers
    // defined in the Botkit Studio UI.

}

Customize Storage

By default, the starter kit uses a simple file-system based storage mechanism to record information about the teams and users that interact with the bot. While this is fine for development, or use by a single team, most developers will want to customize the code to use a real database system.

There are Botkit plugins for all the major database systems which can be enabled with just a few lines of code.

We have enabled our Mongo middleware for starters in this project. To use your own Mongo database, just fill out MONGO_URI in your .env file with the appropriate information. For tips on reading and writing to storage, check out these medium posts

Developer & Support Community

You can find full documentation for Botkit on our Docs site.

Need more help?

  • Glitch allows users to ask the community for help directly from the editor! For more information on raising your hand, read this blog post.

  • Join our thriving community of Botkit developers and bot enthusiasts at large. Over 4500 members strong, our open Slack group is the place for people interested in the art and science of making bots.

You can also find help from members of the Botkit team in our dedicated Cisco Spark room!

Come to ask questions, share your progress, and commune with your peers!

Full video of our 2016 event is available on Youtube.

About Botkit

Botkit is a product of Howdy and made in Austin, TX with the help of a worldwide community of botheads.

botkit-starter-ciscospark's People

Contributors

akalsey avatar anonrig avatar benbrown avatar esoelzer avatar jfield44 avatar sinned 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

botkit-starter-ciscospark's Issues

Error while running container built from dockerfile

Error encountered when simply running container built from freshly pulled repo.

1/17/2019 6:28:46 AM/app/node_modules/botkit/lib/SlackBot.js:235
1/17/2019 6:28:46 AM            let timestamp = req.header('X-Slack-Request-Timestamp');
1/17/2019 6:28:46 AM            ^^^
1/17/2019 6:28:46 AM
1/17/2019 6:28:46 AMSyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
1/17/2019 6:28:46 AM    at exports.runInThisContext (vm.js:53:16)
1/17/2019 6:28:46 AM    at Module._compile (module.js:373:25)
1/17/2019 6:28:46 AM    at Object.Module._extensions..js (module.js:416:10)
1/17/2019 6:28:46 AM    at Module.load (module.js:343:32)
1/17/2019 6:28:46 AM    at Function.Module._load (module.js:300:12)
1/17/2019 6:28:46 AM    at Module.require (module.js:353:17)
1/17/2019 6:28:46 AM    at require (internal/module.js:12:17)
1/17/2019 6:28:46 AM    at Object.<anonymous> (/app/node_modules/botkit/lib/Botkit.js:2:16)
1/17/2019 6:28:46 AM    at Module._compile (module.js:409:26)
1/17/2019 6:28:46 AM    at Object.Module._extensions..js (module.js:416:10)

Error while trying to run the build

Tried remixing this on glitch and a local install and I see this error.
Any clues ?

TypeError: Cannot read property 'map' of undefined
at child.handleHttpError (I:\Dan\node\botkit-starter-ciscospark-master\node_modules@ciscospark\spark-core\dist\lib\batcher.js:208:53)
at \node\botkit-starter-ciscospark-master\node_modules@ciscospark\spark-core\dist\lib\batcher.js:142:25
at process._tickCallback (internal/process/next_tick.js:109:7)
(node:9724) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 17): TypeError: Cannot read property 'map' of undefined

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.