Leetcode Tracker is Discord Bot that assists users with keeping track of their leetcode problem completion progress.
The main focus is allowing the users to input the link of the completed problem and the bot will store that information in a database which can be viewed at a later time. With this, users will to see their current progress - whether a statistical overview or a full view list of all the problems he/she has completed separated by category & chronological order. Lastly to "game-ify" their experience, there is a ranking system that compares against the Total/Easy/Medium/Hard problem count completed amongst all users.
On the technical side, the discord bot uses JavaScript on the front end to interact with the user and the code is hosted on Oracle Cloud Infrastructure Compute Service through a Virtual Machine. The process of the bot is kept alive using a daemon process manager: pm2. The backend is entirely made up of Amazon Web Services, more specifically API Gateway, Lambda, & DynamoDB. The bot makes API calls to either create, update, or retrieve data stored in the NoSQL database. Other libraries used are Puppeteer and Cron.
-
/create
to only create an account (once) -
/complete
to input the link of the newly completed problem which will add to their problems completed -
/progress
to retrieve their data in a statistical overview or problem list layout -
/ranking
to view the rankings (problem count) based on a difficulty chosen: Easy, Medium, Hard, Total -
/help
to see what the Leetcode Tracker bot is along with its functionalities -
/codeshare
to generate a new codeshare link that will expire after 24 hours - Responses are in an embed format
- User can start/end a session that other users can join, which will also have it's own ranking while the session is active
- Problems completed here will also contribute to the user's overall progress
-
/progress list
response message will have a multi-page embed- Once users complete many problems, the response message will eventually become too long. This will combat that problem by maintaining a certain embed size
- An example can be seen here on a stackoverflow question
- This is to only be ran once before a user starts using the other commands
- If the command is ran a second time from the same user, they will be told that their account already exists
- Upon successful create, DynamoDB creates a new row with blank user data
- Takes in an argument of a link to the problem
- The user can input any part of the problem they wish: Description, Discussion, Solutions, Submissions. The "default" link (no extra path) will be updated to the database and reflected on the bot's response message
- An empty nest emoji indicates that there is no data available for that given attribute (🪹)
- The user will be returned their overall statistics while using the Leetcode Tracker bot. The data showcase is:
- Total Count of Problems Completed
- Easy/Medium/Hard Count of Problems Completed
- The latest problem completed --> Link, Difficulty, Date, Days since completion
- The user will be returned a list of their completed problems separated by difficulty
- The user can select which difficulty to see the rankings: Total, Easy, Medium, or Hard
- Based on each user's difficulty count, the bot will showcase the top 3 completed problems count for the difficulty selected
- If a user wants to learn more information about the Leetcode Tracker bot or about the available commands, this command is for them
- If a user wants to create a codeshare link, they are able to with this command
Installation is currently unavailable.
If there are any quesetions about this bot, please email me at: cameron1998@gmail.com!