This project is a clone of leetcode. Users can solve algorithmic problems on this platform. We use monaco as the online editor and firebase auth for authentication.
Our tech stack is Go, Angular and postgres.
Checkout the Git Wiki for this project for API documentation. https://github.com/harlsh/leechcode/wiki
This repository initially belonged to Yash Tibrewal and it had a Git Projects
for it, but after transferring the ownership to me, we lost the Project.
But, we still have the Issues
saved. So please checkout our Issues to view our project board.
https://github.com/harlsh/leechcode/issues?q=is%3Aissue+is%3Aclosed
Running the Frontend:
https://nodejs.org/en/
npm install
to downloaded necessary packages.npm install -g @angular/cli
ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.Running the Backend:
docker-compose build
docker-compose up
**.rest
files in server -> documentation.
**Note: If you encounter ERROR: for <name> Cannot start service <name>:
docker container ls
to view a list of active containers.docker stop <container id>
Testing the Frontend using Cypress:
npm run cypress:open
to open the Cypress test suiteTesting the Frontend using Angular unit testing:
docker-compose build
docker-compose up
ng serve
ng test
to start the testsIf you want to add data:
leetcode.com
and update in leech1.py
a. After logging in, right-click on the page and press Inspect.
b. Refresh the page.
c. Click on the network tab and look for the leetcode.com request
d. Click on the headers tab and find the request header in the cookie.
e. copy the csrf token and place in leech1.py, the token should match this form csrftoken=<tokenid>;
python leech1.py
. This will generate data.json
python leech2.py
. This will post all the data in data.json to the server.Team Members