A: first draft of criterion A

master
ALI Hamza 2020-09-14 21:44:12 +07:00
parent 6c4f615e9c
commit 18c8077979
Signed by: hamza
GPG Key ID: 22473A32291F8CB6
1 changed files with 37 additions and 0 deletions

37
A.md

@ -0,0 +1,37 @@
# 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. A great feature of Discord is that it has support for programmable bots that the community can build. This makes it possible to add tons of interactivity to the server and is a great form of amusement and utility. 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. This is far from ideal for them, as this is a rather inaccessible way for people to get a second chance in the community, especially when members are wrongfully banned.
The system has been attempted to be created twice before by other members of the staff team, but has always been unsuccessful, as members have been busy with their own projects and lives. 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
I think that there are 3 important factors for such a project. The first is that it is able to merge well with the rest of the community's software, such as their [website](https://theprogrammershangout.com/). Second, I wanted to make sure to use software that their staff has experience with, so that they are able to make changes if needed. Finally, I also need to make sure that the solution is flexible. This community is quite large, so it is important to keep in mind how things might change in the future, so creating software that is more configurable will be very beneficial.
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. The next will be a bot on the main server itself, that when a request is processed, will allow the users to rejoin with limited access to the server, so that the staff team can further look into their case and ask more questions. Finally, there is going to be an addition to their current website to that will interface with the backend API [needs elaboration].
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
1. Identifies whether or not users are banned on the server
1. Interfaces with the backend REST API to submit an appeal request
1. Uses an email client to inform users information about their appeal request
1. Connects with the Discord Bot (known as Contrition) to allow users limited access on TPH
1. Has a logging system to keep track of misuse and errors
1. Has a flexible configuration system to stay flexible if the TPH server setup is changed