Project Summary

Overview

HAAC is a Discord bot that creates user accounts and links multiple services together in order to provide statistics across multiple platforms. The project features a website which is fully functional. The bot itself features commands that will enable the end user to create an account and begin the process of linking the accounts together.

Overview of Work

My work has involved starting with a shelled Discord bot written in C# using the Discord.NET 2.0 library. I chose to use .NET Core 2.1 as its a framework that enables multiple operating system support. Then I wrote up some commands that simply responded to the user at first and then progressed towards the actual features that I specified in the proposal. I set it up to use a MySQL database which runs locally aside the bot. This database stores important information including a table containing the profile statistics of a now deprecated service. Once I had the bot, database and website all talking with each other I started to really work on the core functionality of the application. Once the functionality was provided and there was little to no bugs with the commands and the programming involved in making these three systems communicate with each other, I asked for some feedback from a few users. These users are the people who would actually be using this sort of features in the future so it was detrimental to hear what they had to say. Sadly, those users ended up providing almost nothing constructive in terms of feedback.


One of the original functionalities of this application was to provide those profile statistics to the end user in the form of a custom image that the user would be able to modify given that they set the parameters correctly which the application also checks for that so its like bowling with the guard rails up. Whilst the API documentation specified that what library I wanted to use would support cross operating system functionality it actually gave me more issues so I had to abandon that feature and replaced it with something far more basic. I tried to use .NET Core 3.0 which according to a thread I found on Github, fixed this issue. When I tried out this new framework I realized that it broke my code on Windows this time which is critical for my testing procedure since I develop on Windows and deploy in a Linux environment.


Christopher is one of my main contributors on another project of ours which this project will feed into after this class. He has been a huge help with some of my more complicated questions and also helping me figure out an appropriate path to take when something doesn’t work properly. The only other sources of help I reached out for was double checking or learning how to write a couple lines here and there as I already knew how to develop all of the core features I wanted out of the project but I don’t always remember the exact lines that it take to accomplish what I want. You can see the helpful sources I used in the research bibliography.

Depth Requirements

Design a project development and implementation plan.

I developed a gantt chart which outlines the time frame in which each part of the project would have time dedicated to it. I did not follow this much throughout the project but it showed me how difficult it can be to get everything organized within a specific date range. I wouldn’t go as far as to say that I ignored it but it's hard to organize these date related events and work on them on the specific date due to the fact they depend on another so everything was kind of done whenever I got around to it. I also created an ERD given a tool provided to me by PHPMyAdmin which outlines the database schema including all of the tables, properties and the connections or links between them which helps an outside party or perhaps someone joining this project as a contributor understand how the scheme works.


Value teamwork, leadership, and consensus building.

As I stated before, Christopher is a contributor with the original project that HAAC will be merged into once the class is completed. He has worked with me for a few years now and has been a huge help making new features and advancements to our parent project. He has also been a huge help with developing real coding standards and implementing them into my current and future projects. Rob Storm is also one of the members who inspired all of this to transpire. Without him, all of this coding and efforts would be wasted energy. I value him and christopher as team members and also mentors when it comes to not only programming but also life itself.


Develop consulting, decision making and time management skills.

At the end of the day the people I consult the most are the end users who are using this application since I will see them interact with the bot. The other person I consult is Rob Storm the founder of the game this is built around for. He is also the one who has the final say in what comes into the Discord server where this bot will be hosted at. It is between Christopher and I to decide what gets added and then we consult with Rob on if these features or functionality would improve. That is at least how it works for our on-going project outside of this class but for this project in specific, it's all about the end users want. I wanted to build this application to help these users reach a goal that they want. No one else is offering a solution to this issue or desire so I figured I could fill in the gap. As far as time management - I sit down a few times a week and devout many hours towards the end product. My journal might not seem like I have done a whole lot of work but I spend more time on programming and developing these features instead of documentation which for my parent project, comes much later after the functionality has been established so it's kind of a reversed order for this project.


Identify and specify the processes which solve the organizational problem being addresses.

The problem or issue that this application solves is linking multiple accounts into one streamlined account so that the end user can see profile statistics for their accounts combined or separated depending on what the user wants theirs to look like. As mentioned earlier, this is all for a game which can be found on Steam. Many users played the game prior to the launch on the Steam platform. During this transition their profiles were wiped to make way for new account and authentication backend. Many users, including myself, want to see the combined statistics of both profiles or at least be able to see their old statistics in general. I want the functionality that this application provides to also impact the community. The organization wants to see higher user interaction between the rest of the community and in general such as interactions with the bot.


Explain and develop standards and policies associated with the project.

Stylecop is an extension you can use for Visual Studio that tells me if something isn’t formatted properly or if something needs documentation. This develops a coding standard that I try my best to adhere to. As for the website, I try my best to avoid using in-line CSS inside of the HTML which is something we were informed is bad practice in CIT351. For a security standard the usage of SHA256 encryption is used whenever managing the passwords for the users. All contents that are sent to the database are escaped to ensure no basic SQL injections can be ran. For the database I chose to use UTF8_General_US collation which is to ensure that entries added into the DB are following basic ASCII characters. Another coding standing I am using is model, view, controller (MVC). This means that if you want to create an object class, you store things about that object within the model. The view class is a way to obtain that object which you can do things such as read, update, modify, remove, add, etc. The controller class is a way to manipulate that object or objects depending on your usage.


Explain the benefits of cross functional teams.

Cross functional or as I like to call it, multi-functional teams help out in areas of perhaps lesser focus. For example, my core skillset involves a lot of backend related items rather than front end. I am not a designer. If I had another member on my team for this project or the parent project, the website might not look like a total pile of garbage to a user. Sure, it gets the job done but not something I am proud of. Currently, the website works and has functionality on it which is more important to me. Front end developers in general would make my life much easier with not only this project but my parent project as well. As mentioned earlier, Christopher helps out with the parent project and I consider a cross functional member of my parent project’s team. He helps out where his skillset is vastly improved compared to mine. This can range from database work, to javascript, to C# itself. I’m very thankful for all of his efforts and welcome others to help out with the parent project as it's a lot of work for even two people to undertake.


Explain and apply various life cycle concepts in engaging in and completing a project.

First I started with the core development of the application and then try to setup other interfaces or areas of interest that the application depends on such as the database or website. After there is some end user functionality I would then take a sample of users and have them go through the functionality and report back to me their feedback and suggestions. The development undergoes another iteration of development and the cycle repeats where I deploy or launch the application, get some feedback and use that to my advantage. This follows the agile development life cycle concept. The steps could be summarized as the following; hypothesis, development, design, deploy, test, collect results, repeat. Ask the question or determine the issue that this application would fill a void or purpose. Develop foundations to build upon and then design these foundations in a user-friendly way to ensure fluid interaction. Then deploy or launch the application and have other users interact with it. Collect their feedback and then use that feedback to hopefully form a better solution. Iterate these steps until desired or completed.


Prepare appropriate end-user documentation.

There is not a whole lot of user interactions for this application. A user requests an account, the bot gives that user an account. The user logs into the website which should be natural to the end user assuming they’ve created or have signed up for a website in the past. They link their account with another service which only contains one button so there is not much a user could fudge. All of the documentation can be found on the website which essentially outlines every command or interaction a user has with the bot itself. There is no documentation on how to login, reset password, or link to steam. Not entirely relating to documentation but the application will tell the user if they’re mishandling a command or action.


Explain how your project addresses the synthesis, application and analytical skills used throughout the degree program.

As discussed within the proposal, MTH160 has helped me be able to look at some data and be able to make an educated guess as to what that data means. Its also taught me that correlation doesn't imply causation. This is more geared towards

Breadth Requirements

Databases

The bot and website both use the same database which is locally hosted. It has a few linking tables which fits the requirements. The bot and website also contain multiple queries that manipulate the database in order to edit records. The bot itself uses the database to obtain player statistics which contains stats from both profiles.


Documentation and Support

On the website there is a short - yet complete list of commands that a user can run and how they interact with those commands. The bot will tell the user if the command was entered and didn’t supply it with a valid argument. This ensures that the user knows if the command was ran or not and if it succeeded. Since there is not a whole lot of user interaction with this project the documentation might seem relaxed but there are even examples on how to run the commands a user would trigger.


Information Assurance and Security

For this project I wanted to make sure the users would feel comfortable with the bot creating their account for them and supplying them with a password. I wanted to try to avoid having the user type in plaintext a password out as an argument to send to the bot as someone could be near them and see it. Let it be known that this project does not skimp out on security just because I generate a random password for each user. Each password when stored into the database is encrypted using SHA256 and a salt which is unique to each user, even the default password provided to the user is incredibly secure given its obscure length and character choices. When logging into the website, either through resetting your password or just the regular login portal the last login is saved into the database which is used as a salt for the user’s password.


Networks

Networking wise I use putty to login to my virtual private server or as I call it, a droplet. Hosted by DigitalOcean. The bot connects to the Discord.API which is a cloud hosted service. The website and database are also hosted on this droplet so there is some networking between the stack. The bot and website both have a connection to the database using local host. NGINX is also configured to direct web traffic to its appropriate destinations.


Programming

The bot itself is written in C# using the .NET Core 2.1 framework. The .NET Core framework enables the bot to be cross-platform and be ran on Linux and Windows environments assuming the application is compiled for that operating system. The website uses a mix of PHP, HTML, CSS, and some other web based languages. The database uses SQL but it would be best to say that the website uses SQL queries inside of the PHP code. Rather than specifying that the database uses SQL since I don’t actually need to code the database using SQL.


Web Technologies

The website portion of the project like I stated above uses a mix of web based languages. The site is using bootstrap as its front end framework. I brought in a Steam linking library which was written in PHP. This helps the process of verifying a user’s Steam account information which is mostly handled by Valve corporation. The company that developed and maintains Steam.

Research

In my original proposal I discuss about doing research on OAuth authentication which I later scrapped in favor of doing my research solely on dependency injection. I only wanted to do OAuth authentication due to the fact that I would be working with linking Steam accounts to my website and figured I would need to understand it more. The PHP library mentioned earlier enabled me to not have to work with OAuth as the library handles all of that implementation for me. Dependency injection is riddled throughout my entire project and is something I know how to use but did not fully understand the purpose of it or why it works. Why it was necessary? After reading up on it I have gained an understanding of its importance but its downfall as well as it applies to my project. A lot of classes depend on one another and passing around multiple objects so in order to ensure that two or more classes being called on at the same time are not trying to manipulate the same object dependency injection is a way to create an instance of a class that all classes can use. I do this through the use of singletons. There are two scoped singletons which ensure that the classes aren’t holding onto anything when another class tries to reach out and obtain an object.

Timeline

In my original proposal I discuss about doing research on OAuth authentication which I later scrapped in favor of doing my research solely on dependency injection. I only wanted to do OAuth authentication due to the fact that I would be working with linking Steam accounts to my website and figured I would need to understand it more. The PHP library mentioned earlier enabled me to not have to work with OAuth as the library handles all of that implementation for me. Dependency injection is riddled throughout my entire project and is something I know how to use but did not fully understand the purpose of it or why it works. Why it was necessary? After reading up on it I have gained an understanding of its importance but its downfall as well as it applies to my project. A lot of classes depend on one another and passing around multiple objects so in order to ensure that two or more classes being called on at the same time are not trying to manipulate the same object dependency injection is a way to create an instance of a class that all classes can use. I do this through the use of singletons. There are two scoped singletons which ensure that the classes aren’t holding onto anything when another class tries to reach out and obtain an object.

Conclusion

To give a final summary and overview of the project, I created an application stack which solves a common complaint/issue that many end users face who play a game which this project is for. I maintain a project very similar to this for the past five years now. This is the parent application for this project. The reason I bring this up is because the elements learned through this project will bleed into the parent project as its something I wanted to bring to the forefront of the entire Discord Server. Something that I already knew coming into the project is that I can procrastinate a lot when it comes to writing a feature or functionality for the parent project. Something I did not know coming into the project is how quickly I developed the application stack but I reckon this is due to this project now involving a grade from school. Since I have been maintaining the parent project for so many years, I have already learned what it means to be a project administrator. The parent application serves over 5,000 users. Collects analytics based on the activity of the Discord Server, and so much more. I have used all of that time to analyze what void or jobs could be filled and automated by the bot. The parent bot has at least four total contributors. This entire experience has shown me that anyone can develop something to serve a larger purpose and figure out how to get other people engaged and excited to help continue managing and developing for this ecosystem.


“There is an intrinsic value in creating something for the sake of creating it. Even better than that - there is this beauty in dropping it into a community of your own making. And seeing it dispersed and seeing younger, different talent take it to levels you can’t even imagine. Because that lives on.” - Rodney Mullen