..

Sharif AI Challenge 2022 Web

In this post, I will talk about the web team of Sharif AI Challenge 2022. If you haven’t read the introduction post, I suggest you read it first.

AIC 2022 Langing Page

The web team was responsible for implementing the website of the competition. The website was the main interface between the participants and the competition. It was used for registration, submitting the codes, showing the results, showing the leaderboard, and so on. It was also used by the admins to manage the competition. The admins could manage teams and users, post announcements and blog posts, create tournaments, and so on. We also had some minor features like UTM tracking.

The web team consists of two sub-teams: the front-end team and the back-end team. The front-end was written in Vue.js and the back-end was written in Django and used PostgreSQL as the database. Front-end and back-end were dockerized and had their own CI/CD pipelines to be deployed on the docker swarm cluster — I will talk about the infrastructure in another post.

The development process of both the front-end and the back-end was pretty straightforward. However, that doesn’t mean it was easy and there were no challenges. For example, we stored the submissions in a directory with the team name in the Linux file system and later uploaded them to the object storage. That was enough for a team with the name /dev/null to break the system.

We also had a very critical issue with matchmaking in the final tournament. Because it was a piece of python code that iterated over a Django QuerySet by index, and since the QuerySet doesn’t have a fixed order, some maps were played twice and some were not played at all. This simple bug cost us a dinner for all of the staff and participants, since we had to re-run the final tournament and announce the winner same night. (You can see the commit that fixed the issue here!)

The repository of the front-end is available here and the repository of the back-end is available here. The actual website was brought down after the competition, but the front-end is still available in GitHub Pages for documentation purposes here.