Inspiration
Leetcode is boring. Leetgram is not. Leetgram - A webapp that makes grinding your life away in front of a screen more communal and friendly. A website to compete against your friends and foes.
What it does
Input your Leetcode account details and it ranks you against your friends, from the efficiency of your solution to the difficulty of the questions.
How we built it
Bottle: We used Bottle to host the server.
Selenium: Selenium is an open source project designed to automate webapps for testing. In order to use the Leetcode API, a user must log in, grab two specific cookies, and return their corresponding values. Using Selenium, we automated this process down to having the user input their details to automatically grabbing the cookies and sending it through to the API.
Leetcode-API: We built it by fetching data from Leetcode-API and sending it to the database (Saving all the users, complete problems, and the problem difficulties). We had to analyzing the given API functions, retrieve the proper data from the API, and send it to the database.
MySQL: We used MySQL to store the data
Challenges we ran into
Our greatest challenge was learning how to work as a team and figuring out how to modularize and divide work. If one part didn't work, our whole project wouldn't run. Identifying and solving bottlenecks in our team was paramount to finishing the project.
Getting the session ID and csrf-token was a problem. We worked around that by using selenium. Auto-entering the username and password, we can log in autonomously and get the Session ID and the token. While also understanding the API without any documentation.
Accomplishments that we're proud of
The database works like a charm. Every data we store are well organized and easily accessible.
What we learned
Selenium: I learned to use Selenium to access certain parts of a website automatically, input corresponding text, and automate web scraping. Leetcode-API: We learned how to use this API. MySQL: We learn how to access and store data efficiently.
What's next for Leetgram:
Shortly, we will add features such as a chat server and private DMs. Furthermore, we will add features like runtime to compare problems solved by friends. While also making the website more visually appealing. The website will also include Daily problems.
Built With
- html
- javascript
- leetcode-api
- mysql
- pip-install-packing
- pip-install-selenium
- python
Log in or sign up for Devpost to join the conversation.