Skip to content

jarodreyes/shakespeare

Repository files navigation

Twilio

Help Me Shakespeare!

An SMS bot that:

  • Registers a user via sms
  • Analyzes sentiment (positive or negative) on incoming SMS
  • Generates unique poems from shakespeare sonnets
  • Generates images of those sonnets

This was built using:

  • Express.js
  • Mongoose
  • Node.js & npm
  • twilio-node: a node helper library for the Twilio REST API
  • The IBM Watson add-on for Twilio Messages
  • PoetryDB
  • node-gd (an image manipulation library)

Local Development

This project is build using Express web framework and depends on MongoDB.

  1. First clone this repository and cd into it.

    $ git clone git@github.com:jarodreyes/shakespeare.git
    $ cd shakespeare
  2. Install the requirements.

    $ npm install
  3. Start the server.

    $ npm start
  4. Check it out at http://localhost:3000.

Expose the Application to the Wider Internet

  1. Expose your application to the wider internet using ngrok. You can click here for more details. This step is important because the application won't work as expected if you run it through localhost.
$ ngrok http 3000

Once ngrok is running, open up your browser and go to your ngrok URL. It will look something like this: http://9a159ccf.ngrok.io

  1. Configure Twilio to call your webhooks.

You will also need to configure Twilio to call your application when calls are received on your Twilio Number. The SMS & MMS Request URL should look something like this:

http://<sub-domain>.ngrok.io/shakespeare/incoming

Configure SMS

How To Demo

  1. Text your twilio number "Hello".

  2. Should get the following response:

    Hello, I am Shakespeare. It would be heavenly to assist ye. First question, what be thy first name?:
    
  3. Reply with your name...

  4. After registration is complete text a poem of your own to shakespeare or type 'SONNET' to receive a custom sonnet:

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio's Team 37: A labratory for inspiring ideas.

About

Help me shakespeare! A Twilio-powered SMS bot with sentiment analysis, and original sonnets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors