Dev Diary No. 1

To keep you updated, I will regularly post Dev Diaries. Let's talk about vtta.io - the website!

Dev Diary No. 1: vtta.io - the website

vttassets.com was become a unmaintainable beast of code over the last couple of months: The addition of features, the used tech stack and a whole bunch of other decisions led to something that I didn't want to touch - in all honesty. Let'stalk about the state vttassets.com currently is in and then introduce you to the new website: vtta.io.

But first: Why?

Besides the necessary clean up that is detailed below, the new approach is the foundation for changes that currently are in development and that will ease or enhance the way the D&D Beyond integration currently works in quite significantly. I will detail that part later and focus more on the technical issues I was facing and describe how I overcame them in this post.

State of vttassets.com

For vttasset.com, I used technologies I knew or which I wanted to learn:

The issues

Redesign

Even with all those shortcomings, I dreaded touching the website. Working on the website blocks developer time which is always in high demand for the Foundry VTT modules themselves.Therefore, I left everything as-is.

But!

Over time, several issues arose that became more and more pressing:

  1. With the warnings appearing on the Chrome extension for authentication (Firebase Auth not using secure cookies and other issues) and the prospect of those warnings turning into errors when Google strengthens the security further made the rewrite necessary.
  2. Patreon discontinuing their API is adding to concerns of the viability of the whole tech stack.
  3. When thinking about the redesign of the toolchain, it became evident that some parts needed change: The authentication needed to migrate from Firebase to my own solution, making it possible to actually integrate the backend into the parsing process further (more on that topic on a later dev diary)

Focus on simplicity and ease-of-use

For the redesign, I was going through all the functions of the current (web)-server, checking if it's a necessary functionality, a nice-to-have functionality or something that is nice, but not really neccessary. Was the existing functionality working as intended, easy to use and clear in it's meaning? Which nice-to-have things really added and justified adding complexities to the code?

After evaluating all options, I ended up with the following tech stack:

The result

It took a moment to implement the changes, but I am quite happy with the result: I do have clean codebase, a clear vision, seperation of concerns with different services being responsible for different functionalities, better feedback to users and still the easiness to add content using markdown vs. the contentful approach.

From a user-perspective, it is now easier to connect your Patreon and Discord accounts, to get information about when the last Patreon update made it's way into my backend regarding your pledge and 100% transparency about the data stored about you.

The cleaned up codebase should make fixing the unavoidable bugs quicker, the integration with Patreon seems to be more stable (that's easy to say if it's not yet in full production yet ;))... and it's one of the necessary cornerstones that will make the integration from D&D Beyond into Foundry VTT even more awesome. To detail those changes will be another dev diary in the future.