- url: https://leetcode.com/graphql
- get user:
{ matchedUser(username: "YOUR_USERNAME") { username submitStats: submitStatsGlobal { acSubmissionNum { difficulty count submissions } } } }
- get recent list:
{ recentAcSubmissionList(username: "Ethan-ZYF", limit: 50) { id title titleSlug timestamp } }
- front end
- user profile page Modal of problem list with given difficulty
- Change the header of each page
- Better UI
To run this project locally, you should know we have two parts: backend and frontend.
- For backend, we write scripts to add users, problems and get users' submissions from leetcode api, all of those data will be stored in
./frontend/public/data
folder.- why we use
./frontend/public/data
folder? Because we usecreate-react-app
to build our frontend, and it will put all the static files in./frontend/public
folder, so we put all the data in./frontend/public/data
folder.
- why we use
- For frontend, we use data generate by backend to build a website to show the data.
- Since we split our project into two parts, you may need to run two times
npm install
to install the dependencies of each part (a.k.a runnpm install
in both folder).
If you want add new users, the easiest way is to modify ./backend/new_user.json
file, and then run node add_user.js
to add new users (please notice, we use lots of relative path in our project, so you should go ./backend/src
folder to run most of our scripts).
If you want to get your data as soon as possible rather than auto script run on scheduled time, you can run node index.js
to get all data of users that registered.
Ofc, don't forget to update problems list by running node get_all_problems.js
in ./backend/src
folder, otherwise your submission of new problems may not be shown.
If you want to contribute to this project, please follow the instructions below:
- Fork this repo
- write your code
- make a pull request
- wait for review
If you have any questions, please open an issue.