Build a Twilio Client Web App – Introducing Ahoy Hoy!


In my last two posts I taught you how the build a basic Twilio Client Web App (Part 1 | Part 2). Now I am finally ready to introduce my Twilio Client app, Ahoy Hoy! Ahoy Hoy is a very basic stranger chat application that allows you to talk to a random stranger about a topic you pick. In the post I’ll talk briefly about why I chose this idea and some of the technology behind it.

Stranger Chat?!? Is it 2009?!?

The whole stranger chat idea seemed to gain a lot of attention a couple years ago (Chatroulette, Omegle) and so it may seem a little odd that I’m building a new app around the concept now. I chose this idea for two main reasons. First, from a technical perspective it seemed like a fun challenge. WebSockets still haven’t turned into what everyone hoped they would be and aren’t widely supported, so managing user state in real time seemed like an interesting task to take on. Second, I’ve always wanted to see a more directed stranger chat. I may want to talk to someone random, but about something specific (the same reason why I like specific sub-reddits over I also think that there’s potential for a real business if you can connect random people and generate meaningful conversation.

How Does It Work?

The user experience on Ahoy Hoy is very simple. You visit the homepage, click one of the four topics and you are (if another user is available) connected to a random stranger who wants to talk about the same topic as you (screenshot above). The technology behind Ahoy Hoy is surprisingly straight forward. At the heart of things we have the Twilio Client. It facilitates all communication in the app. All user state management is done via AJAX calls to the server which stores user state information in a mongo database. I try and be as intelligent as possible in managing user state by taking advantage of the Twilio Client connect and disconnect callbacks, as well as the onunload action. Since all this won’t capture user state all of the time I do some short-polling to make sure the user state hasn’t changed without me knowing it.

What’s Next?

My hope is that the project will be well received and develop enough of a user base to warrant some expansion. The #1 thing on my list is allow users to pick ANY topic, not just the predefined 4 (spoiler alert: there’s a secret 5th one as well). This way users can have even more control over what they consider to be meaningful. After that, who knows? It all depends on user feedback. I want to build something that people want to use and so if I start getting feedback I hope to be agile in incorporating it into the site. Oh yeah, and of course LOTS of bug fixes.

I hope that you check out Ahoy Hoy and enjoy it! Feel free to drop me a comment or an e-mail if you have any feedback.