Opensource GoChat - play Go in FB Messenger

GoChat is a project born out of my love for playing Go and boredom for my day job. It started at a time when chatbots was the new buzzword and I wanted to create a chatbot for fun. The idea is simple - you can play the board game go in FB messenger. You can start and play a game with your friends easily.

My first commit was on April 18, 2016 and last time I updated was December 7, 2017. With over 500 commits and countless hours, it is one of the bigger projects I’ve worked on on the side. I decided that it’s best to open source the code as I’m no longer investing my time. There are some interesting technical details that I think may be useful for other folks when looking to build similar things.

The open source code is a direct clone from my private repo, and I stripped away the sensitive password/IP information since GoChat is still up and running.

Click here for the code

What features does it have
  • Multi-language support
  • Play with self and play with friends
  • Play multiple games at the same time
  • Complete end to end with stone counting
  • in-game chatting with opponents
  • Simulate moves during the game

It's funny the original intent was to build this so that maybe I can use it myself but I ended up investing way more time just building and testing and never really played with the bot.

While I have built many cool features, some of the most exciting things that I wanted to build didn't materialize because I moved on to other projects. Sometimes I wish if I had more time, I'll build out a game matching system so people can play with anyone else in the world and an AI mode to play with computers. Anyone, as long as you have a FB account can learn how to play Go and instantly you'll have access to the largest social network.

Simply building the ground work for the whole system has taken a tremendous amount of time. Given that my focus has shifted to other projects, these ideas may never come to fruition.

High level technical details

The overall architecture for the system is a standard nginx + mysql + nodeJS.

On the server side, I used express framework, with babel for compiling, flow for static typing, sequelize.js for as DB ORM, chai & mocha for testing, sharp & lwip for image processing, AWS S3 for image storage, and React for client UI (for more complex in-game interactions).

For deployment, I use ansible for infrastructure automation, and I deployed on Digital Ocean machines.

The README on the repo has a bit more in-depth technical explanations.

That's it. Check out the code and hopefully it'll be useful to projects you're working on.