Least-privilege GitHub access
LeetBridge uses a GitHub App so users choose which repositories it can access. GitHub host access is requested only when the user starts the connection flow.
Chrome extension case study
LeetBridge automatically captures accepted LeetCode submissions and saves them to a repository selected by the user, including organized source files, problem documentation, and a browsable solution index.

Platform
Chrome, Manifest V3
Integration
GitHub App and REST API
Architecture
Client-side extension
Release
Chrome Web Store
Why I built it
I found existing Chrome extensions that synced LeetCode solutions to GitHub. I liked the convenience, but I was not comfortable giving a solution-syncing tool broad read and write access across my GitHub repositories when it only needed to save code in one place.
That led to the question behind LeetBridge: could I build the same workflow while letting users grant access to just one dedicated solutions repository?
I also wanted to understand how browser extensions are built. This was a chance to learn the full process, from extracting data from a live page to packaging and publishing something other people could install.
The solution
I chose a GitHub App so users can select only the repository they want to use, rather than needing to grant access to every repository. Keeping that scope narrow was a way to reduce unnecessary exposure, not a claim that any integration is risk-free.
LeetBridge listens for an accepted result, validates the submission, checks for duplicates, and writes the solution to the selected repository. It also generates documentation and supports resumable historical imports, keeping the convenience that drew me to the idea in the first place.
System flow
Observe an accepted result on a LeetCode problem page.
Extract the problem, language, code, and submission ID.
Use the GitHub App's user-selected repository scope.
Write the solution and refresh generated documentation.
Engineering decisions
LeetBridge uses a GitHub App so users choose which repositories it can access. GitHub host access is requested only when the user starts the connection flow.
Accepted code moves directly from the browser to GitHub over HTTPS. Credentials and settings remain in Chrome's extension storage on the user's device.
Pagination, request pacing, retry cooldowns, and durable checkpoints let large histories recover from tab closures, service-worker restarts, and upstream rate limits.
Solutions are organized into predictable folders with per-problem documentation and a generated repository index that summarizes difficulty and language usage.
What I learned
Outcome
The finished product combines browser integration, authenticated third-party APIs, durable import state, generated documentation, privacy disclosures, and store-ready packaging in one focused user experience.