A Chrome Extension to Code Daily with LeetCode

Written by akumar5 | Published 2021/10/14
Tech Story Tags: leetcode | learn-to-code | code-daily | chrome-extension | leetcode-chrome-extension | software-engineering | software-development | chrome-extension-code-daily

TLDRBuilt to motivate you to solve a coding problem daily, as simple as name of the extension Code Daily with LeetCode. You can either solve a preselected question or choose from any topic and difficulty of your choice. To keep track of my progress, I decide to tweet everyday with the details of the questions/problems that I solved. You can view my tweets on twitter. The extension will select a problem randomly based on the topic and the difficulty set by me or randomly suggest me everyday. I'm glad that I picked this project, learnt a lot from it.via the TL;DR App

I built a Chrome extension based on LeetCode to motivate you to solve a daily coding problem. You can either solve a preselected question or choose from any topic and difficulty of your choice.

How did I build it?

Recently, I decided to code a problem daily for 100 continuous days, without a single day off. While I'm writing this article, I have already reached my 50th day. To keep track of my progress, I decided to tweet the details of the questions/problems that I solved daily. You can view my tweets on Twitter.

https://twitter.com/meashishkmr

Every day, I used to go to LeetCode and select a problem to solve, then I had an idea. Why not develop a chrome extension? The chrome extension will select a problem randomly based on the topic and the difficulty set by me or randomly suggest me every day.

One of the main hurdles during the development process was that LeetCode doesn't have any API docs nor do they mention anywhere how to use them.

Out of curiosity, I first opened the Network tab on the console and look at all the endpoints that The LeetCode page call and after some research, found that they use GraphQL under the hood and their API's are open. Did some reverse engineering and constructed the API endpoints myself, it was fun as well as interesting

I'm glad that I picked this project, learned a lot from it. You can find the source code of the extension on my GitHub.

Source code for the extension

https://github.com/Ashi-s/leetcode-chrome-extension

Thanks for reading this article, If you have a suggestion that would make this chrome extension better, feel free to open a PR or you can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

Happy Coding!!!


Written by akumar5 | Coder by Day, learning to code at night
Published by HackerNoon on 2021/10/14