contrition/A.md

3.2 KiB

Criterion A: Planning

The Programmer's Hangout Unban System

Defining the Problem

veksen is a senior moderator of TPH (The Programmer's Hangout), an online community with over 55,000 members from all over the world. The community is on Discord, a very popular chatting platform where people can hang out. veksen, alongside with the rest of the TPH staff team have a rather clunky way of handling those who misbehave, manage to get themselves banned from the server, and want a second chance. Usually, they either have to create a new account and join the server in an attempt to get in touch with the staff team, or have to get a friend to help them out.

In September, veksen approached me and discussed the issue at hand, wanting an unban system with an online interface, so that it is accessible for those who can't join the community anymore. The online interface would authenticate you with the very open Discord API, be able to validate, that a user is in fact banned from the server, and allow users to fill out a form to appeal their punishment(s). This seemed like a fantastic project for me to complete for my Internal Assessment, as I would be able to solve a programming-related problem, the actual implementation isn't going to be completely non-trivial and simple to solve, and I would be helping out a community that has been so helpful and useful to not only myself, but thousands of others alike.

In order to get more details, I decided to hop in a call with veksen on September 11th, and get more information about how the system would work.

Rationale for Proposed Solution

There is going to be three main parts to the system. Firstly, there is going to be a REST API that their current website will hook into. This API will have access to information about users who authorize themselves with Discord, so that those who are appealing can be identified when filling out the request. Next, their current website will hook up with the backend API. Finally, there will be a "bot" on the community itself. when a request is processed, will allow the users to rejoin with limited access, so that the staff team can further look into their case and ask more questions.

I have decided to write the bot, as well as the backend REST API in TypeScript because

  • The rest of the staff team at TPH have experience with it
  • Easy to write and maintain, especially in comparison with JavaScript, which is purely dynamically typed
  • Has great libraries available to create REST APIs, as well as Discord bots

The frontend will be written with React/Gatsby, as that's what the current website is using, and rewriting it all from scratch will be undesirable.

The Success Criteria

  1. Allows users to authorize themselves with Discord's OAuth Api
  2. Identifies whether or not users are banned on the server
  3. Interfaces with the backend REST API to submit an appeal request
  4. Uses an email client to inform users information about their appeal request
  5. Connects with the Discord Bot (known as Contrition) to allow users limited access on TPH
  6. Has a logging system to keep track of misuse and errors
  7. Has a flexible configuration system to stay flexible if the TPH server setup is changed