LeetCode Metrics is a lightweight full-stack app that fetches and displays LeetCode progress by difficulty (Easy/Medium/Hard) with submission stats.
- Search any valid LeetCode username
- Difficulty-wise solved progress with animated circular charts
- Submission summary cards (overall + difficulty-wise)
- Responsive, modern UI (desktop + mobile)
- Frontend: HTML, CSS, Vanilla JavaScript
- Backend: Node.js + Express
- API Source: LeetCode GraphQL endpoint
leetcode-metrics/
├── public/
│ ├── index.html
│ ├── style.css
│ ├── styles/
│ │ ├── base.css
│ │ ├── layout.css
│ │ ├── components.css
│ │ └── responsive.css
│ ├── script.js
│ ├── logo.png
│ └── favicon.ico
├── server.js
├── package.json
└── README.md
- Node.js 16+
- npm
npm install
npm startOpen:
PORT(default:5000) — server port
PowerShell example:
$env:PORT=5001
npm startRequest body:
{
"username": "leetcode_username"
}Responses:
200user stats payload400username is required404user not found500internal/server or upstream error
- CORS enabled for cross-origin requests
- Basic request validation for username presence
- Graceful error handling for upstream LeetCode API failures
public/style.cssacts as the entry stylesheet.- Actual styles are split by concern under
public/styles/for easier maintenance.
- If old UI appears, hard refresh (
Ctrl + F5) once. - If
EADDRINUSEappears, run on another port:
$env:PORT=5001
npm start- Aditya Kumar
- GitHub: https://github.com/debug-node