Skip to content

About

Automatically sync and backfill LeetCode submissions directly to GitHub with authentic solve dates. Manifest V3 Chrome Extension built with React 18 & TypeScript.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

LeetLogger Logo

LeetLogger 🚀

Automated, Zero-Friction LeetCode Submission Logging & Backdated Historical Catch-Up for GitHub

CI Status License Manifest V3 React 18 TypeScript GitHub Stars PRs Welcome


🌟 Key Features

  • ⚡ Instant Real-Time Sync: Automatically intercepts accepted submissions on LeetCode, formats structured markdown problem statements with badges, and commits code files directly to your target GitHub repository.
  • 📜 Historical Catch-Up Engine (Backdated Bulk Sync): Scans your target GitHub repository tree against your complete LeetCode solved archive and commits missing solutions with their exact historical solve timestamps (author.date / committer.date), populating your authentic GitHub contribution graph.
  • 🔄 Durable Offline Queue: Network blips or rate limits never lose code. Failed transactions persist in chrome.storage.local with automatic exponential backoff retry.
  • 🎨 Glassmorphic React 18 Dashboard: Sleek popup status tracker and options configuration dashboard styled with modern Vanilla CSS.
  • 🛡️ Direct Peer-to-Peer Security: Zero intermediate servers, telemetry proxies, or data aggregators. Direct, authenticated communication between the browser and GitHub APIs.

🏗️ Architecture Overview

graph TD
    subgraph BrowserContext["Browser Context"]
        CS["Content Scripts (LeetCode Ingestion)"]
        POP["React 18 Popup Dashboard"]
        WEL["React 18 Options Hub"]
    end

    subgraph ServiceWorker["Background Service Worker"]
        SW["Service Worker Controller"]
        QM["Durable Storage & FIFO Queue"]
        HS["Historical Catch-Up Engine"]
        GC["GitHub Git Data API Client"]
    end

    subgraph RemoteEndpoints["Remote Endpoints"]
        LC["LeetCode GraphQL API"]
        GH["GitHub REST & Git Data APIs"]
    end

    CS -->|"Submission Payload"| SW
    POP -->|"Status Query & Sync Trigger"| SW
    WEL -->|"Auth Token & Target Repo"| SW
    SW --> QM
    SW --> GC
    HS -->|"Paginated Solved Query"| LC
    HS -->|"Atomic Batch Commit Chain"| GC
    GC -->|"Direct Tree & Ref Commits"| GH
Loading

For in-depth subsystem blueprints and sequence diagrams, explore the System Architecture Overview.


🚀 Quick Start & Installation

1. Build from Source

# Clone the repository
git clone https://github.com/Inkesk-Dozing/LeetLogger.git
cd LeetLogger

# Install dependencies
npm install

# Build the production extension package
npm run build

2. Load into Google Chrome

  1. Open Chrome and navigate to chrome://extensions/.
  2. Toggle on Developer mode in the top-right corner.
  3. Click Load unpacked and select the generated dist/ directory inside LeetLogger.
  4. Click the LeetLogger icon in your browser toolbar to link your GitHub repository and begin tracking!

3. GitHub Authentication (100% Free & Secure)

LeetLogger operates with zero intermediate servers, communicating directly from your browser to the GitHub API:

  1. Open the LeetLogger Dashboard (click extension icon -> Options).
  2. Generate a Fine-Grained Personal Access Token (Recommended):
    • Repository access: Select Only select repositories (e.g. LeetCode-Track) or All repositories (if auto-creating new repos).
    • Repository permissions: Contents: Read and write (and automatic Metadata: Read-only).
  3. Paste the github_pat_... token and link your repository. All credentials remain encrypted locally in your browser's chrome.storage.local.

📁 Repository Structure

LeetLogger/
├── .github/                   # CI/CD pipelines & CodeQL security scans
│   └── workflows/             # ci.yml and codeql.yml
├── assets/                    # Master visual branding, logos, and extension icons
├── docs/                      # Technical Documentation
│   ├── architecture/          # Subsystem blueprints & sequence diagrams
│   ├── api/                   # GitHub REST & Git Data API integration spec
│   ├── components/            # Component contracts & Big-O complexity specs
│   └── security/              # Threat model matrix & CSP definitions
├── src/
│   ├── manifest.json          # Chrome Manifest V3 configuration
│   ├── core/                  # Pure TypeScript engines (Git, Storage, Formatters)
│   ├── platform/              # LeetCode DOM observers & GraphQL fetchers
│   ├── background/            # Background service worker & sync orchestrators
│   ├── content/               # Web page DOM and OAuth interceptors
│   └── ui/                    # React 18 Popup and Options onboarding dashboards
├── webpack.config.js          # Webpack 5 production build config
├── tsconfig.json              # TypeScript configuration
└── LICENSE                    # Apache 2.0 License

📄 License

Licensed under the Apache License, Version 2.0.

About

Automatically sync and backfill LeetCode submissions directly to GitHub with authentic solve dates. Manifest V3 Chrome Extension built with React 18 & TypeScript.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages