Kanishk Kacholia

(Leetcode + Discord) Leetcord

👨‍🏫 A rewarding and collaborative way to study

Last updated: December 5th, 2022


Summer 2022

Leetcord is a program designed to make competitive programming exercises more collaborative and fun. It works by interconnecting a Django webserver with a Discord Bot interface to handle user interactions

    azure sqlpythondjangopycordgraphqlpyodbcsqlalchemyazuregitherokuasync programming


Leetcord is a DEPRECATED program designed to make competitive programming exercises more collaborative and fun. It works by interconnecting a Django webserver with a Discord Bot interface to handle user interactions. The program provides users with a "Leeterboard" to hold friendly competitions and allows users to write post-problem writeups to help themselves review or help others learn. It's desgined by default to operate on Heroku and Azure SQL making it free for students. As of November 28th, 2022 Heroku is no longer free to host services hence this project has since been deprecated.


Over the summer, in preperation for CSCI 4041 and general coding interviews I began practicing leetcode in order to improve my programming skills. While studying I reached out to a friend of mine, Alan Hagedorn to build a tool that would make the process much more interesting and fun to do rather than the monotonous and very repetitive activity it had been. In a short week we developed, deployed, and launched Leetcord to the public.


Ever since Alan and I began coding together we had been storing our progress in Notion, keeping tabs and notes for every problem we solved. These included links to the problem, times we did them, and what we took away from it. For the longest time, this had worked fine for what we needed it to do but we slowly realized that notion limited us of the tools which would provide far faster and more pertinant searching.

Our Notion Spreadsheet


When designing this application we first began laying out our values that we most valued. Firstly, our main priority was to create a tool that would allow us to write our solutions for competitive programs to a database which could easily be sorted. Secondly, we wanted to provide a method to give users a random question from the Leetcode website based on their preferences of difficulty and if the question is paid or not. Lastly, our other priority was to make this incredibly cost effective, limiting ourselves to use only tools given to students for free such as Microsoft Azure's student pack and Heroku's free dynos (no longer free).


The development process was split into two parts, one section for the discord bot and another for the web application. Our first goal was to deploy the web application as Django comes pre-installed with an ORM database tool which allowed us to instantly apply our schema and get off the ground running. We followed this up by properly configuring our SQLAlchemy ORM to follow the same naming convention as the Django ORM with a perfect match such that the discord bot could also manipulate the database, thus affecting the website, and vice versa. A majority of the website development centered on making a nice looking UI that, while did not have authentication as all interaction was to be performed through the bot, did provide ample commands to manipulate the site through the discord client. Likewise, a majority of the development for the discord chatbot was to write the proper input sanitization and assign the correct database command to the proper chatbot command.


Upon the conclusion of this tool Alan and I learned quite a lot regarding human interaction and product development. We addressed a problem that had hindered us during our process of bettering our programming skills and addressed it. If you are curious about how our bot responds and interacts with the user I highly reccomend looking at the Commands 💻 section of our github repository. Personally, this tool was extremely helpful and not only helped us speed up our learning process but reminded us that no matter how much we struggle with complex computer science topics, even if we spend hours on a problem, that we're still capable of molding technology to our liking.