How souvik-dey-2029/leetsync works
LeetSync is a local-first browser extension that syncs accepted LeetCode solutions to a user-owned GitHub repository. Its main flow detects or manually starts a sync, asks for confirmation, gathers problem and solution details, checks for existing files, then organizes and uploads solution, README, and statistics data. Options handle Device Flow authentication; the popup and dashboard expose session and repository status. The README documents topic indexing and multi-solution behavior. Unsampled background and GFG modules are represented as capabilities, but their internal links are omitted where source evidence is unavailable.
Main entry points: leetcode.js Sync orchestration · githubDeviceAuth.js Device Flow client · welcome.js Repository dashboard · options.js Authentication settings
Components 19
LeetCode submission
- Manual sync button
scripts/leetcode/submitBtn.js - Submission engine
scripts/leetcode/leetcode.js - Problem parsing
scripts/leetcode/versions.js - Sync confirmation
scripts/leetcode/modal.js - GeeksforGeeks support
scripts/gfg.js
Sync workflow
- Existing solution choice
scripts/leetcode/modal.js - Sync orchestration
scripts/leetcode/leetcode.js - Path and format utilities
scripts/leetcode/util.js - Topic README index
scripts/leetcode/readmeTopics.js
GitHub integration
- Device Flow client
scripts/githubDeviceAuth.js - User repository
Extension UI
- Authentication settings
scripts/options.js - Extension storage
- Popup dashboard
scripts/popup.js - Repository dashboard
scripts/welcome.js - Background worker
scripts/background.js
Other components
- LeetCode page
- GitHub user
- GitHub API
Connections 21
- LeetCode page → Submission engine: provides submission
README.md - Manual sync button → Submission engine: starts sync
scripts/leetcode/submitBtn.js - Submission engine → Sync confirmation: requests consent
scripts/leetcode/leetcode.js - Submission engine → Problem parsing: extracts details
scripts/leetcode/leetcode.js - Submission engine → Sync orchestration: runs sync
scripts/leetcode/leetcode.js - Sync orchestration → Existing solution choice: asks choice
scripts/leetcode/leetcode.js - Sync orchestration → Path and format utilities: formats paths
scripts/leetcode/leetcode.js - Sync orchestration → Device Flow client: calls GitHub
scripts/leetcode/leetcode.js - Device Flow client → Extension storage: stores tokens
scripts/githubDeviceAuth.js - Device Flow client → GitHub API: requests tokens
README.md - Sync orchestration → User repository: uploads files
README.md - Sync orchestration → Topic README index: updates topics
README.md - Authentication settings → Device Flow client: runs Device Flow
scripts/options.js - Authentication settings → Extension storage: saves settings
scripts/options.js - GitHub user → Authentication settings: configures client
README.md - GitHub user → GitHub API: approves access
README.md - Popup dashboard → Device Flow client: validates token
scripts/popup.js - Popup dashboard → Extension storage: reads session
scripts/popup.js - Repository dashboard → Device Flow client: uses GitHub access
scripts/welcome.js - Repository dashboard → User repository: creates or links
scripts/welcome.js - Repository dashboard → Extension storage: reads statistics
scripts/welcome.js