|
1 | | -# leetcode-ranking |
| 1 | +# 🚀 CodePVG LeetCode Ranking |
| 2 | + |
| 3 | +A web-based platform developed for CodePVG to track and rank students based on their LeetCode performance. |
| 4 | +It allows users to register with their LeetCode username and automatically fetches their problem-solving statistics to display on a leaderboard. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 🎯 Purpose |
| 9 | + |
| 10 | +The goal of this project is to: |
| 11 | +- Encourage consistent problem-solving among students 📈 |
| 12 | +- Create a competitive yet motivating environment 🏆 |
| 13 | +- Provide visibility into individual coding progress 💻 |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## 🌟 Features |
| 18 | + |
| 19 | +### 🔐 User Registration |
| 20 | +- Users can register using their name and LeetCode username |
| 21 | +- Accepts both direct usernames and profile links |
| 22 | +- Validates whether the LeetCode user exists before registration |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +### 📊 Leaderboard System |
| 27 | +- Displays ranked users based on their LeetCode stats |
| 28 | +- Automatically updates rankings based on fetched data |
| 29 | +- Clean UI for easy comparison between users |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +### 🔄 Automated Data Fetching |
| 34 | +- Periodically fetches user data using LeetCode API |
| 35 | +- Updates stored data without manual intervention |
| 36 | +- Ensures leaderboard stays up-to-date |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +### 🎨 User-Friendly Interface |
| 41 | +- Simple and clean UI design |
| 42 | +- Smooth user experience with loading states |
| 43 | +- Blur + spinner animation during registration (UX improvement) |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +### ⚡ Input Handling & Validation |
| 48 | +- Extracts username even from full LeetCode profile links |
| 49 | +- Prevents invalid or non-existent usernames |
| 50 | +- Avoids duplicate or incorrect entries |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +### 🛡️ Error Handling |
| 55 | +- Handles API failures gracefully |
| 56 | +- Displays alerts for invalid inputs |
| 57 | +- Prevents multiple submissions during requests |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## 🛠️ Tech Stack |
| 62 | + |
| 63 | +| Layer | Technology | |
| 64 | +|------------|------------------------| |
| 65 | +| Frontend | HTML, CSS, JavaScript | |
| 66 | +| Backend | Node.js | |
| 67 | +| API | LeetCode API | |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## 📂 Project Structure |
| 72 | + |
| 73 | +leetcode-ranking/ |
| 74 | +│── frontend/ # UI (HTML, CSS, JS) |
| 75 | +│── data/ # Stored user data |
| 76 | +│── scripts/ # Automation scripts |
| 77 | +│── server.js # Backend server |
| 78 | +│── package.json |
| 79 | + |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +## 🚀 How to Run Locally |
| 84 | + |
| 85 | +### 1️⃣ Clone the repository |
| 86 | + |
| 87 | +```bash |
| 88 | +git clone https://github.com/YOUR-USERNAME/leetcode-ranking.git |
| 89 | +cd leetcode-ranking |
| 90 | + |
| 91 | +2️⃣ Install dependencies |
| 92 | + |
| 93 | +npm install |
| 94 | +cd frontend |
| 95 | +npm install |
| 96 | + |
| 97 | +3️⃣ Run the project |
| 98 | + |
| 99 | +npm run dev OR node server.js |
| 100 | + |
| 101 | +📌 Usage |
| 102 | + |
| 103 | +Open the registration page |
| 104 | +Enter your name and LeetCode username |
| 105 | +Submit the form |
| 106 | +View your ranking on the leaderboard |
| 107 | +🤝 Contributing |
| 108 | + |
| 109 | + |
| 110 | +Contributions are welcome! |
| 111 | + |
| 112 | +Fork the repo |
| 113 | +Create a new branch |
| 114 | +Make changes |
| 115 | +Submit a Pull Request |
| 116 | + |
0 commit comments