Leetcode widget 2.0
Overview
LeetCodeWidget is a lightweight Electron desktop widget that sits on your desktop and gives you a quick snapshot of your LeetCode progress — total solved, difficulty breakdown, and recent activity — without needing to open the browser.
Highlights
-
Compact always-available desktop widget
Frameless, transparent Electron window that stays out of your way. -
Comprehensive stats at a glance
Displays total problems solved with Easy / Medium / Hard breakdown. -
Daily activity tracking
“Questions Solved Today” counter with a 7-day activity graph. -
No login required
Just provide your LeetCode username. -
Efficient backend
Uses LeetCode’s public GraphQL API via a small Node/Express backend.
New / Recent Improvements
Per-card loading state
- Main stats card shows a subtle loading overlay with spinner while fetching data.
- Prevents accidental interaction and makes background refreshes smoother.
Global loading screen
- Full-screen loading view on cold start.
- Transitions automatically to the widget once data is ready.
Window positioning
- Opens near the top-left corner of the primary display with a small offset.
- Predictable placement on multi-monitor setups while avoiding OS chrome/taskbars.
Theme toggle (light / dark)
- One-click theme switcher.
- UI and charts update together.
- Easy / Medium / Hard colors adapt for better readability.
Legend view toggle
- Toggle between:
- Difficulty breakdown view
- “Questions Solved Today” focused view
- Collapsed mode highlights today’s solved count in a compact layout.
Auto-refresh of stats
- Automatically refreshes every 5 minutes.
- Manual refresh (when enabled) reuses the same loading logic.
Persistent username storage
- LeetCode handle stored locally using electron-store.
- Setup screen shown only once; subsequent launches load automatically.
Backend aggregation
The server aggregates:
- Overall solved counts by difficulty.
- Recent accepted submissions.
- Unique problems solved per day.
Returns a normalized JSON payload used by the client to render:
- Donut chart (difficulty breakdown)
- 7-day activity line chart
Known Limitations
- Data accuracy depends on the LeetCode GraphQL API and hosted stats server.
- No offline mode — network access is required.
- Auto-update and in-app backend configuration are not yet implemented.