Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetGit Logo

LeetGit

Automatic LeetCode to GitHub Sync with AI Code Analysis & Peer Reviews

Manifest V3 OAuth 2.0 AI Powered License


🎯 Overview

LeetGit is a modern Chrome (Manifest V3) extension designed to automatically sync your accepted LeetCode solutions directly to your GitHub repository. It acts as your personal coding portfolio builder, generating AI-powered problem explanations and automated code quality reviews on every submission.


🌟 Key Features

Feature Description
🔐 Seamless GitHub OAuth Connect via GitHub's Device Flow — 1-click authorization with zero raw tokens stored in code.
Accepted-Only Interception Intercepts LeetCode's judge results and only pushes code when your solution is Accepted.
🤖 AI Complexity Analysis Automatically generates problem descriptions + Time & Space complexity breakdowns in README.md.
📋 AI Code Reviews Creates a dedicated REVIEW.md file with code quality ratings and optimization suggestions.
📊 Dashboard & Streaks Interactive SVG ring chart tracking Easy / Medium / Hard solved counts and daily coding streaks.
📶 Offline Queueing Submissions are cached locally during network drops and auto-synced when back online.
📁 Flexible Folder Layouts Organize your repo by Difficulty (solutions/Easy/two-sum), Language, or Flat structure.

🔄 Workflow

[LeetCode Submit] ➔ [Judge: Accepted] ➔ [LeetGit Interceptor]
                                                  │
       ┌──────────────────────────────────────────┴──────────────────────────────────────────┐
       ▼                                                                                    ▼
 [GitHub Commit]                                                                     [AI Dispatcher]
  Push solution code to repo                                                          Generate README & REVIEW
  1. Solve a LeetCode problem and click Submit.
  2. LeetGit watches the judge result — if Accepted, it immediately triggers.
  3. Pushes code to GitHub in your preferred directory structure.
  4. AI generates docs — Gemini / OpenRouter creates README.md (complexity analysis) and REVIEW.md (peer review).
  5. Dashboard updates — Increments your Easy/Medium/Hard counters and daily streak automatically.

🚀 Quick Setup Guide

Step 1: Install Extension

  1. Clone or download this repository:
    git clone https://github.com/salim7-s/Leetgit.git
  2. Open Chrome and navigate to chrome://extensions.
  3. Enable Developer mode (toggle in top-right corner).
  4. Click Load unpacked and select the LeetGit directory.

Step 2: Connect GitHub & Target Repo

  1. Create a target repository on GitHub (e.g., leetcode-solutions).
  2. Click the LeetGit icon in your Chrome extension bar.
  3. In Settings, click Connect GitHub Account (1-click OAuth login).
  4. Enter your target Repository Name (e.g., leetcode-solutions).
  5. Click Save Changes.

🤖 AI Provider Setup (Optional)

LeetGit supports multiple free AI providers to generate code reviews:


📁 Repository Folder Structures

Choose how solutions are organized inside your GitHub repository:

  • By Difficulty (Default): solutions/Easy/two-sum/two-sum.py
  • By Language: solutions/Python/two-sum/two-sum.py
  • Flat Layout: solutions/two-sum/two-sum.py

🛠️ Project Structure

manifest.json       Chrome Extension MV3 manifest configuration
popup.html          Extension dashboard & settings document
background.js       MV3 service worker adapter entry point
src/
  ├── background/   GitHub REST API, OAuth Device Flow, AI Dispatcher, Queue, Stats
  ├── content/      LeetCode submission interceptor & page bridge
  └── popup/        Dashboard SVG rings, settings forms, & event controllers
tests/              Node.js unit regression test suite

🛡️ License

Distributed under the MIT License. See LICENSE for more information.

About

Automatically sync accepted LeetCode solutions to GitHub with AI-generated README, code reviews, and offline sync.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages