A Chrome extension that lets you compare LeetCode profiles side-by-side with detailed statistics, difficulty breakdowns, and visual charts.
- Profile Comparison: Compare two LeetCode users side-by-side
- Detailed Statistics: View total problems solved, difficulty breakdown (Easy/Medium/Hard), rankings, and acceptance rates
- Visual Charts: Interactive line charts showing difficulty-based comparison
- Side Panel UI: Clean, dark-themed interface that opens in Chrome's side panel
- Real-time Data: Fetches live data from LeetCode profiles
- Framework: WXT
- UI Library: React 19 + TypeScript
- Styling: Tailwind CSS v4
- Components: shadcn/ui
- Charts: EvilCharts
- Build Tool: Vite
- Runtime: Node.js + Express
- Language: TypeScript
- Authentication: JWT
- Deployment: Vercel (Serverless)
leetcode-buddy/
├── extension/ # Chrome extension (frontend)
│ ├── src/
│ │ ├── entrypoints/
│ │ │ ├── background.ts # Service worker
│ │ │ ├── content.ts # Content script
│ │ │ └── sidepanel/ # Side panel UI
│ │ │ └── pages/
│ │ │ ├── Login.tsx # Authentication page
│ │ │ ├── ProfileInput.tsx # Username input
│ │ │ └── Chart.tsx # Comparison view
│ │ ├── services/
│ │ │ └── api.ts # API client
│ │ └── components/ # Reusable UI components
│ └── wxt.config.ts # Extension configuration
│
└── backend/ # Express API server
├── config/ # Environment config
├── controllers/ # Request handlers
├── middlewares/ # Auth middleware
├── routes/ # API routes
├── utils/ # JWT utilities
├── scrapper.ts # LeetCode data fetcher
└── server.ts # Main server file
- Node.js 18+ and pnpm
- Chrome browser
- Navigate to backend directory:
cd backend
npm install- Start development server:
pnpm run dev- finding errors:
web-ext lint
pnpm lintBackend will run on http://localhost:3001
- Navigate to extension directory:
cd extension
pnpm install- Start development server:
pnpm run devExtension dev server will run on http://localhost:3000
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in top right)
- Click Load unpacked
- Select the folder:
extension/dist/chrome-mv3-dev - The extension icon should appear in your toolbar
- Click the LeetCode Buddy extension icon in Chrome
- Side panel opens on the right
- Click Get Started
- Enter two LeetCode usernames (e.g.,
touristandjiangly) - Click Compare
- View detailed comparison with:
- Total problems solved
- Easy/Medium/Hard breakdown
- Global rankings
- Acceptance rates
- Interactive difficulty comparison chart
pnpm run dev # Start dev server with hot reload
pnpm run build # Build production extensionpnpm install
pnpm run dev # Start dev server with tsx watch- Real-time validation of usernames
- Fetches live data from LeetCode
- Side-by-side stats display
- Color-coded difficulty indicators
- Interactive line chart
- Difficulty comparison (Easy/Medium/Hard/Total)
- Responsive design
- GitHub-inspired dark theme
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Made for the competitive programming community
