LeetCode Gate
Lock VS Code behind a daily coding challenge.
Solve the daily problem to unlock your editor for the day.
Features
- Daily gate that blocks file editing until the challenge is solved.
- 660+ Easy/Medium problems across major DSA categories.
- Sidebar problem explorer with difficulty filter and solved indicators.
- Practice mode (open any problem without changing daily selection).
- Starter code templates are intentionally unsolved (function signatures + placeholders, no embedded full answers).
- Learning dashboard with:
- day streak
- total solved metrics
- category progress chart
- difficulty breakdown chart
- 30-day heatmap
- Open Today's Challenge quick button
- Run vs Submit workflow:
- Run Tests: sample checks only (no unlock popup)
- Submit: full checks (hard tests + time checks), unlocks on pass
- Multi-language solving:
- JavaScript (vm sandbox)
- Python (python3 subprocess)
- Java (jshell, JDK 11+)
How The Gate Works
- VS Code starts and the extension activates (
onStartupFinished).
- If today's challenge is not solved, the gate panel opens.
- Opening a text editor while locked immediately closes that editor and returns focus to the gate panel.
- You can Run Tests any time, but only Submit can unlock.
- On successful Submit:
- solved history is stored
- today's gate is marked solved
- success modal appears
- editor access is restored
- Next day, a new challenge is selected.
Daily Challenge Selection
- Source: local bundled problem bank in
src/problems/*.
- Selection rule: day-of-year modulo
PROBLEMS.length.
- Stability: selected problem ID is persisted for the current day, so restarts show the same challenge.
Dashboard
The dashboard shows progress from solved history (GatekeeperState).
- Streak: consecutive solved days.
- Totals: all solved, easy solved, medium solved.
- Category chart: solved vs total per primary tag.
- Difficulty chart: easy/medium progress bars.
- Heatmap: last 30 days activity.
- Today's Challenge card with status and Open Today's Challenge button.
Commands
| Command |
Description |
LeetCode Gate: Show Today's Problem |
Open or focus the daily gate panel |
LeetCode Gate: Learning Dashboard |
Open learning metrics dashboard |
Filter by Difficulty |
Filter sidebar to All/Easy/Medium |
Refresh Problem List |
Refresh sidebar solved states |
LeetCode Gate: Reset Today's Progress (Dev) |
Reset today's gate state for testing |
Language Runtime Requirements
- JavaScript: no external runtime needed.
- Python:
python3 available on PATH.
- Java:
jshell (JDK 11+) available on PATH.
Security And Validation Notes
- JavaScript solutions run in a restricted vm context with time limits.
- Python/Java validations run in subprocesses with timeouts.
- Full Submit path includes heavier anti-bruteforce checks.
Development
cd leetcode-gate
npm install
npm run compile
npm test
Press F5 in VS Code to open an Extension Development Host.
Packaging
npx vsce package --no-dependencies
Changelog
See CHANGELOG.md for release history.
License
MIT
| |