It was finally time for me to start making an interface for users, so I went down to business with twitter bootstrap. I copied the navbar from a template, and added a button in the top left corner so that players can log in. In the center of the page, I placed a title, and drew a chart from my sample data under the name Niels, thus giving me the basic layout for the site. At this point, it was time to start learning Mozilla Persona, the system that Kevin Kwok wanted me to use for login. I did a quick Google search to discover that someone had already created a library for using Persona and Express together. This made things easier, as I just followed the instructions on the project’s github page; however, it turns out that this project has not been updated recently, and thus I ran into an error that express no longer includes many of the submodules necessary for express-persona to function. After spending a while trying different code, I eventually figured out that the best way to get around this error is to use express 3.0 rather than 4.0. Implementing this change caused my code to work flawlessly. Since then, I have been working on cleaning up the website, and have told Kevin that an alpha version is ready for testing. At this point in time he is busy with other projects, but in the near future he will add code to protobowl, and this project will be working!
Despite this, there is still much work for me to do. Right now, all of my code is working with a single html document that is served by index.js, meaning that I am using the same html file for logged in and logged out users. I will create a new html file for when users log in, so that I can easily add an interface that allows them to change certain settings, such as the color for each subject and resetting their score in a subject. I also want to learn how to create a periodic script on the server that will sort the database by total points scored per player, which would allow me to show the top 5 scorers charts on the main page. Overall, I have created an alpha version of the site, but there is still much I want to do with this project.