QuizSMS - A Hack for a Conference

Oct 26, 2016 14:10

During Hackference we ran a short (it was due to be longer, but due to other issues, it was only an hour long) quiz, which enabled anybody to SMS a number with an answer to a question, and if they were correct, they would enter a raffle to win a prize from a sponsor. Having only a short space of time to build something (don't ask - but it was about an hour, two including testing and deploying 😫) I hooked up two sponsors - Nexmo for interacting with SMS messages and Pusher for Pub/Sub messaging.

quizsms

The system is very simple at the moment, and follows this user flow:

  • User SMS messages's a number bought from Nexmo.
  • Nexmo posts data about the text to a webhook
  • QuizSMS will parse the message body
  • QuizSMS will decide if the answer is correct
  • QuizSMS will send a message via Pusher to the dashboard - which is used to notify an administrator that stuff is working!

I know what your thinking - thats not THAT much for an hours work - but that does also include researching what gets sent when Nexmo sends a webhook. Massive 👏 to Nexmo for having great documentation.

If you would like to check the code out - I have posted it to Github (link below). Feel free to download, fork and pull apart my hacky code. Hopefully it might spark your imagination into some things you can build by using a few API's together.

The github link is: https://github.com/JakePrice86/QuizSMS