Your DSA grind, on your GitHub. Automatically.
Zero-click commits · AI code review · Live analytics · Knowledge graph · Bulk LeetCode import
You grind DSA every day. Your GitHub looks empty. Your solutions disappear into LeetCode's servers. When a recruiter asks to see your work, you have nothing to show — even though you've been coding for months.
CodeLedger fixes that. Install the extension, connect your GitHub, and every accepted solution gets committed automatically — code, problem description, AI review, and all. Your profile becomes a living portfolio. Zero extra steps.
Situation — Developers solving DSA problems on LeetCode and other platforms had no way to showcase that work publicly. Accepted submissions lived inside closed platforms, invisible on GitHub contribution graphs and portfolio pages.
Task — Build a browser extension that intercepts accepted submissions, formats them into a clean repository structure, and commits them to the user's own GitHub — fully automatically, with no third-party storage.
Action — Developed a Manifest V3 extension (pure ES6, no bundler, Preact + htm) backed by a Cloudflare Worker for OAuth. The GitHub Trees API enables atomic multi-file commits. An AI review pipeline supports 6 providers (Gemini, OpenAI, Claude, DeepSeek, Ollama, OpenRouter) and commits the review alongside the code. An analytics dashboard, knowledge graph, cross-device sync, rolling backups, and a bulk LeetCode history importer round out the feature set.
Result — Every solve produces a single atomic commit: solution file, problem description, AI review. The GitHub contribution graph fills up with real, attributed work. The live GitHub Pages dashboard turns a bare repo into a recruiter-ready portfolio.
| Metric | Value |
|---|---|
| Platforms supported | LeetCode (full · bulk import) — GFG & Codeforces (in development) |
| AI providers integrated | 6 (Gemini, OpenAI, Claude, DeepSeek, Ollama, OpenRouter) |
| Files committed per solve | 2 minimum (solution + description) · 3 with AI review |
| Commit type | Atomic via GitHub Trees API — single SHA, never partial |
| External servers that touch your code | 0 — data goes directly to your GitHub repo |
| Time from accept to commit | < 3 seconds |
- Accomplished zero-click automatic GitHub commits for every accepted DSA solution, as measured by a 3-second accept-to-commit pipeline, by intercepting accepted submissions via DOM observation and GitHub Trees API commits.
- Built a bulk LeetCode history importer that brings your entire submission archive into a clean v3 repo layout in a single run, eliminating manual copy-paste for hundreds of solutions.
- Designed AI-powered code review for 6 providers with automatic provider fallback, measured by consistent review commits on >95% of solves, by decoupling the review pipeline from the commit path so neither blocks the other.
- Engineered cross-device sync via a machine-readable
index.jsoncommitted to the repo itself, with zero additional infrastructure beyond the user's own GitHub. - Delivered a live GitHub Pages dashboard (heatmap, topic radar, difficulty donut, knowledge graph) auto-generated on every commit from the repo's own data, requiring no external analytics service.
| Zero-click commits | Every accepted submission is committed to your GitHub the instant it's accepted — solution file + problem description in one atomic git commit. |
| Bulk LeetCode import | Import your entire LeetCode history in one click from your Progress page. Every past accepted solution — with code, description, and stats — committed to your repo instantly. |
| AI code review | Connect any API key and get time/space complexity analysis, optimization suggestions, and hints committed alongside your code. Supports Gemini, OpenAI, Claude, DeepSeek, Ollama, and OpenRouter. |
| Live dashboard | A GitHub-style heatmap, topic radar, difficulty breakdown, and solve velocity chart — built from your own data, hosted on your own GitHub Pages. |
| Knowledge graph | A force-directed graph of everything you've solved, linked by topic. See your strengths and gaps at a glance. |
| AI chat panel | A floating panel on every problem page. Ask about complexity, request hints, paste errors — all with your code pre-loaded via /mycode. |
| AI Behaviour Bank | Personal memory for your AI assistant: save insights, define skills that trigger on command, and build a learning roadmap that auto-injects context into every chat. |
| Cross-device sync | Your entire history synced to GitHub on every startup — open your dashboard on any machine and it's always current. |
| Rolling backups | Automatic snapshots of problems + settings committed to your repo on a configurable schedule. Restore in one click. |
| 100% yours | Your data goes to your GitHub repo, period. No sign-ups, no dashboards on our servers, no scraping. |
After you solve a problem on LeetCode, your repo gets a commit like this — automatically:
[solved] Two Sum
problems/lc-two-sum/
├── lc-two-sum.py ← your code, clean
├── lc-two-sum.md ← problem statement + runtime + memory
└── (lc-two-sum.md) ← includes AI review if provider configured
Your GitHub contribution graph fills up. Your profile becomes a living portfolio.
chrome://extensions → Developer mode ON → Load unpacked → select the src/ folder
Or install directly from the Chrome Web Store → · Edge Add-ons →
about:debugging → Load Temporary Add-on → select src/manifest.json
Or install from Firefox Add-ons (AMO) →
- Click the CodeLedger icon in your toolbar.
- Click Connect GitHub — authorize via OAuth (handled securely through our Cloudflare Worker at
codeledger.vkrishna04.me— no token ever stored on our servers). - Set a repo name (e.g.
my-dsa-solutions). CodeLedger creates and initializes it automatically. - Solve a problem. Check your GitHub. That's it.
Optional: Add an AI provider API key under Settings → AI to unlock AI code reviews.
Already have hundreds of LeetCode solutions? Bring them all in at once:
- Log in to LeetCode and open your Progress page.
- CodeLedger detects your history and shows a "Commit N solutions to GitHub" button.
- Click it — all accepted solutions are imported with proper paths, descriptions, and stats in a single atomic commit.
The bulk importer is also available as a standalone CLI tool:
node dev/import-profile/leetcode-importer.js --github-token=TOKEN --repo=owner/repo
| Provider | Notes |
|---|---|
| Google Gemini | Default — free tier available |
| OpenAI (GPT-4o, o3-mini, …) | Bring your own key |
| Anthropic Claude | Bring your own key |
| DeepSeek | Bring your own key |
| Ollama | Local models — no API key needed |
| OpenRouter | Access 100+ models with one key |
The extension tries providers in order and falls back automatically if one fails.
npm install
npm run build:css # compile Tailwind → src/ui/styles/compiled.css
npm run lint # tsc type-check (run before any PR)
npm run format # prettier format all JS
npm run release # validate → build → zip → commit → tag → push
npm run release -- --dry-run # preview without touching gitLoad unpacked from src/ at chrome://extensions.
GFG and Codeforces handlers are the most-wanted contributions right now. The contract is documented — if you know those platforms, this is a great first PR.
- Create
src/handlers/platforms/{name}/index.jsextendingBasePlatformHandler - Create
dom-selectors.js,page-detector.jsalongside it - Add the hostname in
src/content/handler-loader.js - Run
node dev/generate-manifest-domains.js
See docs/ADDING_PLATFORM_HANDLER.md for the full contract.
src/
├── background/service-worker.js ← orchestrates everything: storage, AI, git
├── content/handler-loader.js ← matches hostname → loads the right platform handler
├── handlers/
│ ├── platforms/ ← leetcode, geeksforgeeks, codeforces
│ ├── ai/ ← gemini, openai, claude, deepseek, ollama, openrouter
│ └── git/github/ ← Trees API commit engine + GitHub Pages template
├── core/
│ ├── constants.js ← single source of truth for URLs, keys, storage key names
│ ├── path-builder.js ← v3 repo layout: problems/{id}/{id}.{ext}
│ └── storage.js ← unified abstraction over IndexedDB + chrome.storage
└── library/ ← dashboard (extension sidebar + standalone web app)
The extension has no bundler, no transpiler — pure ES6 modules, Preact + htm from a vendor shim, Tailwind pre-compiled. Tiny footprint, simple CSP.
- Register a GitHub App — callback URL:
https://<your-worker>.workers.dev/api/auth/github/callback- Permissions: Repository contents (Read & Write), Administration (Read & Write)
- Deploy
worker/withnpx wrangler deployand set secrets from CLAUDE.md. - Update
CONSTANTS.URLS.AUTH_WORKERinsrc/core/constants.js.
Read .github/CONTRIBUTING.md before opening a PR.
GFG and Codeforces platform handlers are actively wanted — see docs/FEATURE_REQUESTS.md for the open tickets. The platform handler contract is fully documented; LeetCode's handler is the reference implementation.
Quick rules:
- All extension API calls go through
src/lib/browser-compat.js— never touchchrome.*orbrowser.*elsewhere. - Use
createDebugger()fromsrc/lib/debug.jsinstead ofconsole.log. - Run
npm run lintbefore pushing.
- Changelog: docs/CHANGELOG.md
- Feature backlog: docs/FEATURE_REQUESTS.md
- Release guide: docs/guides/RELEASE_GUIDE.md
- OpenAPI contract: docs/OPENAPI.yaml
- Adding a platform: docs/ADDING_PLATFORM_HANDLER.md