From ba2ead4c4d55bf1aed448b5cb046ef2f0e13c444 Mon Sep 17 00:00:00 2001 From: adityak-06 Date: Wed, 1 Apr 2026 10:51:31 +0530 Subject: [PATCH 1/4] Added detailed README with features and setup --- README.md | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 388fe8e..4b5a9ac 100644 --- a/README.md +++ b/README.md @@ -1 +1,116 @@ -# leetcode-ranking \ No newline at end of file +# 🚀 CodePVG LeetCode Ranking + +A web-based platform developed for CodePVG to track and rank students based on their LeetCode performance. +It allows users to register with their LeetCode username and automatically fetches their problem-solving statistics to display on a leaderboard. + +--- + +## đŸŽ¯ Purpose + +The goal of this project is to: +- Encourage consistent problem-solving among students 📈 +- Create a competitive yet motivating environment 🏆 +- Provide visibility into individual coding progress đŸ’ģ + +--- + +## 🌟 Features + +### 🔐 User Registration +- Users can register using their name and LeetCode username +- Accepts both direct usernames and profile links +- Validates whether the LeetCode user exists before registration + +--- + +### 📊 Leaderboard System +- Displays ranked users based on their LeetCode stats +- Automatically updates rankings based on fetched data +- Clean UI for easy comparison between users + +--- + +### 🔄 Automated Data Fetching +- Periodically fetches user data using LeetCode API +- Updates stored data without manual intervention +- Ensures leaderboard stays up-to-date + +--- + +### 🎨 User-Friendly Interface +- Simple and clean UI design +- Smooth user experience with loading states +- Blur + spinner animation during registration (UX improvement) + +--- + +### ⚡ Input Handling & Validation +- Extracts username even from full LeetCode profile links +- Prevents invalid or non-existent usernames +- Avoids duplicate or incorrect entries + +--- + +### đŸ›Ąī¸ Error Handling +- Handles API failures gracefully +- Displays alerts for invalid inputs +- Prevents multiple submissions during requests + +--- + +## đŸ› ī¸ Tech Stack + +| Layer | Technology | +|------------|------------------------| +| Frontend | HTML, CSS, JavaScript | +| Backend | Node.js | +| API | LeetCode API | + +--- + +## 📂 Project Structure + +leetcode-ranking/ +│── frontend/ # UI (HTML, CSS, JS) +│── data/ # Stored user data +│── scripts/ # Automation scripts +│── server.js # Backend server +│── package.json + + +--- + +## 🚀 How to Run Locally + +### 1ī¸âƒŖ Clone the repository + +```bash +git clone https://github.com/YOUR-USERNAME/leetcode-ranking.git +cd leetcode-ranking + +2ī¸âƒŖ Install dependencies + +npm install +cd frontend +npm install + +3ī¸âƒŖ Run the project + +npm run dev OR node server.js + +📌 Usage + +Open the registration page +Enter your name and LeetCode username +Submit the form +View your ranking on the leaderboard +🤝 Contributing + + +Contributions are welcome! + +Fork the repo +Create a new branch +Make changes +Submit a Pull Request + From 132b92a74e4e09f27fc3c0cd0fc27bab12ab5f69 Mon Sep 17 00:00:00 2001 From: adityak-06 Date: Sun, 5 Apr 2026 23:13:18 +0530 Subject: [PATCH 2/4] updated readme file --- README.md | 134 +++++++++++++++++++++++++++--------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 4b5a9ac..ef0506a 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,116 @@ -# 🚀 CodePVG LeetCode Ranking +# CodePVG LeetCode Ranking A web-based platform developed for CodePVG to track and rank students based on their LeetCode performance. It allows users to register with their LeetCode username and automatically fetches their problem-solving statistics to display on a leaderboard. --- -## đŸŽ¯ Purpose +## Purpose The goal of this project is to: -- Encourage consistent problem-solving among students 📈 -- Create a competitive yet motivating environment 🏆 -- Provide visibility into individual coding progress đŸ’ģ ---- - -## 🌟 Features - -### 🔐 User Registration -- Users can register using their name and LeetCode username -- Accepts both direct usernames and profile links -- Validates whether the LeetCode user exists before registration +- Encourage consistent problem-solving among students +- Create a competitive yet motivating environment +- Provide visibility into individual coding progress --- -### 📊 Leaderboard System -- Displays ranked users based on their LeetCode stats -- Automatically updates rankings based on fetched data -- Clean UI for easy comparison between users +## Features ---- +### User Registration +- Users can register using their name and LeetCode username +- Accepts both direct usernames and profile links +- Validates whether the LeetCode user exists before registration -### 🔄 Automated Data Fetching -- Periodically fetches user data using LeetCode API -- Updates stored data without manual intervention -- Ensures leaderboard stays up-to-date +### Leaderboard System +- Displays ranked users based on their LeetCode statistics +- Automatically updates rankings based on fetched data +- Provides a clean interface for easy comparison ---- +### Automated Data Fetching +- Periodically fetches user data using the LeetCode API +- Updates stored data without manual intervention +- Keeps leaderboard information up-to-date -### 🎨 User-Friendly Interface -- Simple and clean UI design -- Smooth user experience with loading states -- Blur + spinner animation during registration (UX improvement) +### User Interface +- Simple and clean UI design +- Smooth user experience with loading states +- Includes blur and spinner animation during registration ---- +### Input Handling and Validation +- Extracts username from full LeetCode profile links +- Prevents invalid or non-existent usernames +- Avoids duplicate or incorrect entries -### ⚡ Input Handling & Validation -- Extracts username even from full LeetCode profile links -- Prevents invalid or non-existent usernames -- Avoids duplicate or incorrect entries +### Error Handling +- Handles API failures gracefully +- Displays alerts for invalid inputs +- Prevents multiple submissions during requests --- -### đŸ›Ąī¸ Error Handling -- Handles API failures gracefully -- Displays alerts for invalid inputs -- Prevents multiple submissions during requests - ---- +## Tech Stack -## đŸ› ī¸ Tech Stack - -| Layer | Technology | -|------------|------------------------| -| Frontend | HTML, CSS, JavaScript | -| Backend | Node.js | -| API | LeetCode API | +| Layer | Technology | +|----------|------------------------| +| Frontend | HTML, CSS, JavaScript | +| Backend | Node.js | +| API | LeetCode API | --- -## 📂 Project Structure +## Project Structure +``` leetcode-ranking/ -│── frontend/ # UI (HTML, CSS, JS) -│── data/ # Stored user data -│── scripts/ # Automation scripts -│── server.js # Backend server +│── frontend/ # UI (HTML, CSS, JS) +│── data/ # Stored user data +│── scripts/ # Automation scripts +│── server.js # Backend server │── package.json - +``` --- -## 🚀 How to Run Locally +## How to Run Locally -### 1ī¸âƒŖ Clone the repository +### 1. Clone the repository ```bash git clone https://github.com/YOUR-USERNAME/leetcode-ranking.git cd leetcode-ranking +``` + +### 2. Install dependencies -2ī¸âƒŖ Install dependencies npm install cd frontend npm install -3ī¸âƒŖ Run the project +### 3. Run the project + -npm run dev OR node server.js +npm run dev -📌 Usage +or -Open the registration page -Enter your name and LeetCode username -Submit the form -View your ranking on the leaderboard -🤝 Contributing +node server.js +## Usage + +1. Open the registration page +2. Enter your name and LeetCode username +3. Submit the form +4. View your ranking on the leaderboard + +--- -Contributions are welcome! +## Contributing -Fork the repo -Create a new branch -Make changes -Submit a Pull Request +Contributions are welcome. +- Fork the repository +- Create a new branch +- Make your changes +- Submit a Pull Request \ No newline at end of file From 8a51abdee31dd0b297901ef879e934d7bc51ebe7 Mon Sep 17 00:00:00 2001 From: adityak-06 Date: Fri, 10 Apr 2026 15:02:59 +0530 Subject: [PATCH 3/4] Add tooltip to score column explaining scoring system --- frontend/about.html | 6 ++-- frontend/leaderboard.html | 11 ++++++- frontend/styles/main.css | 61 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 4 deletions(-) diff --git a/frontend/about.html b/frontend/about.html index e27d8e3..cdebfbb 100644 --- a/frontend/about.html +++ b/frontend/about.html @@ -12,9 +12,9 @@ diff --git a/frontend/leaderboard.html b/frontend/leaderboard.html index 38afd82..be2a9d7 100644 --- a/frontend/leaderboard.html +++ b/frontend/leaderboard.html @@ -38,7 +38,16 @@

Leaderboard

Easy
Medium
Hard
-
Score
+
Scoreâ„šī¸ + + Scoring:
+ Easy = 1 point
+ Medium = 3 points
+ Hard = 5 points

+ Learn more +
+
+
diff --git a/frontend/styles/main.css b/frontend/styles/main.css index 227c8e5..4984d46 100644 --- a/frontend/styles/main.css +++ b/frontend/styles/main.css @@ -808,4 +808,65 @@ html, body { html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ +} + +.score-header { + display: flex; + align-items: center; + gap: 5px; +} + +.tooltip-icon { + position: relative; + cursor: pointer; + font-size: 14px; +} + +.tooltip-box { + visibility: hidden; + opacity: 0; + width: 180px; + background-color: #222; + color: #fff; + text-align: left; + padding: 8px; + border-radius: 6px; + + position: absolute; + top: 25px; + left: 50%; + transform: translateX(-50%); + z-index: 10; + + transition: opacity 0.3s; + font-size: 12px; +} + +.tooltip-icon:hover .tooltip-box { + visibility: visible; + opacity: 1; +} + +.tooltip-box a { + color: #00bcd4; + text-decoration: none; +} + +.tooltip-box a:hover { + text-decoration: underline; +} + +.tooltip-box { + max-width: 220px; + white-space: normal; +} + +.tooltip-icon { + position: relative; +} + +/* Keep tooltip inside screen */ +.tooltip-icon:hover .tooltip-box { + left: 50%; + transform: translateX(-50%); } \ No newline at end of file From df57672ba17da7fca7b6c35a58e00bc3a4327196 Mon Sep 17 00:00:00 2001 From: adityak-06 Date: Sat, 11 Apr 2026 12:07:23 +0530 Subject: [PATCH 4/4] update and changes --- frontend/leaderboard.html | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/frontend/leaderboard.html b/frontend/leaderboard.html index be2a9d7..b442b14 100644 --- a/frontend/leaderboard.html +++ b/frontend/leaderboard.html @@ -39,27 +39,23 @@

Leaderboard

Medium
Hard
Scoreâ„šī¸ - - Scoring:
- Easy = 1 point
- Medium = 3 points
- Hard = 5 points

- Learn more -
-
+ + Scoring:
+ Easy = 1 point
+ Medium = 3 points
+ Hard = 5 points

+ Learn more +
+ +
- -
- -
+
- -
- -
- - +
+
+ +