Around The Table

A server-side Swift project

Posted on September 17, 2018


After a year and a half of development, a rewrite and and several refactorings, I'm happy to announce that Around The Table is now open source and documented!

Around The Table is an open source platform that supports tabletop gaming communities. Players can use it to host games and connect with other players in their area.


This project started out as experiment with server-side Swift. My initial goal was to find out if a framework like Kitura, together with a templating language like Stencil, could be used to build a web application that uses little to no JavaScript.

The answer was a resounding yes and the project grew from an experiment to a product with a growing user base and feature set.

I decided to stick with the server-side architecture to show that server-side Swift is not just about building back-ends for mobile apps and showcase its potential to build web applications.

By open sourcing this project under a permissive license, I hope to see my code used to kickstart many other server-side Swift projects.


This project demonstrates the following:

  • Kitura:
    • Basic routing.
    • Structured routing using subrouters and extensions.
    • Type-safe form parsing using Codable forms.
    • Type-safe rendering using Codable view models.
    • Using the Session middleware to store credentials and preferences.
    • Using the Credentials middleware.
    • Authentication using Facebook Web Login.
    • Authentication using an email address and password.
  • Stencil:
    • Creating and rendering Stencil templates.
    • Template inheritance using {% extends %}.
    • Template composition using {% include %}.
    • Creating custom Stencil filters.
  • Persistence:
    • Implementing a persistence layer using MongoDB and MongoKitten.
  • Configuration:
    • Using JSON files to configure settings.
    • Using environment variables to configure settings and secrets.
    • Using the Configuration package to load settings and cloud services.
  • Testing:
    • Unit testing with XCTest.
    • End-to-end testing with SwiftyRequest.
    • Testing on Linux using Docker.
  • Other:
    • Deploying to IBM Cloud.
    • Caching images in Cloud Object Storage.
    • Calling external APIs using SwiftyRequest.
    • Parsing XML using Foundation.
    • Basic internationalisation using localized strings and templates.

Source code

For more information, see the repository on GitHub.

If you've enjoyed my work or found it helpful, please consider becoming a patron. Your support helps me free up time to work on my books and projects.