Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🟢 BuddyCode — LeetCode Companion

The free Chrome extension that shows company tags, interview frequency, ELO ratings, and post-submission diagnostics on every LeetCode problem.

Chrome Web Store Manifest V3 Version License: MIT No Tracking Open Source

Stop guessing which problems matter. BuddyCode layers verified interview-prep data directly onto the LeetCode UI so you can focus on the problems that get you hired.


✨ Features

Feature Description
🏢 Company Tags See which companies (Amazon, Google, Meta, etc.) have asked each problem — sourced from the popular snehasishroy/leetcode-companywise-interview-questions repo and refreshed against the live "recent 6 months" dataset.
📈 Interview Frequency A pill next to every problem shows the % of candidate reports that include it. No more flying blind on which problems to prioritize.
🎯 ELO Rating Each problem shows its dynamic ELO score from zerotrac/leetcode_problem_rating, with a label (Easy / Medium / Hard / Expert / Master / Grandmaster).
📊 Post-Submission Panel After you submit, a clean diagnostics panel appears with runtime, memory, beat-percentile, distribution histogram, and style feedback — modelled on LeetCode's native AI layout (Approach / Efficiency / Code Style tabs).
🌗 Dark Mode Auto-adapts to LeetCode's dark theme.
🚀 Zero Configuration No sign-up, no API keys, no account. Install and forget.
🔒 100% Local No code, no submissions, no keystrokes, no analytics ever leave your browser.

📸 Screenshots

Add screenshots here after installing — drop PNGs into a docs/ folder and reference them below.

Description Page Submission Panel
Company tags, ELO, frequency Runtime, memory, distribution, style notes

🚀 Installation

From source (this repo)

  1. Clone or download this repository.
  2. Open Chrome and navigate to chrome://extensions.
  3. Toggle Developer mode on (top right).
  4. Click Load unpacked and select the buddycode/ folder.
  5. Visit any LeetCode problem — e.g. https://leetcode.com/problems/two-sum/description/ — and the widgets will appear.

Updating data

The bundled buddycode/companies.json and buddycode/frequencies.json are generated by build_companies.ps1 (Windows PowerShell). Run it from the repo root to refresh the company/frequency data from the upstream source:

./build_companies.ps1

ELO ratings are fetched automatically by the extension and cached for 7 days.


🛠 How It Works

┌──────────────────────┐    injects    ┌──────────────────────────┐
│ LeetCode Problem     │ ◀──────────── │  BuddyCode content.js    │
│  - Description page  │               │  - reads PROBLEM_DB      │
│  - Submission page   │               │  - fetches ELO/companies │
└──────────────────────┘               │  - injects DOM widgets   │
                                       └──────────────────────────┘
                                                  │
                                                  ▼
                                       ┌──────────────────────────┐
                                       │  chrome.storage.local    │
                                       │  (cached datasets, 7d)   │
                                       └──────────────────────────┘
  • Manifest V3 service worker (currently a no-op stub — ready for future features).
  • No background network calls except two cacheable fetches to public GitHub raw URLs.
  • XSS-safe: all user-derived strings are inserted with textContent; only the submission panel uses innerHTML, and every interpolation is HTML-escaped.
  • Mutation-aware: the SPA navigation observer re-runs the injection pipeline on every LeetCode route change.

📂 Project Structure

okBudLeet/
├── buddycode/                  # The Chrome extension
│   ├── manifest.json           #   MV3 manifest
│   ├── background.js           #   Service worker (stub)
│   ├── content.js              #   Main content script (widgets + submission panel)
│   ├── content.css             #   Injected widget styles
│   ├── data.js                 #   PROBLEM_DB (time/space/elo/companies)
│   ├── companies.json          #   Pre-built company tags per slug
│   ├── frequencies.json        #   Pre-built frequency % per slug
│   ├── icons/                  #   16/48/128 PNG icons
│   └── popup/                  #   Settings popup (HTML/CSS/JS)
├── build_companies.ps1         # PowerShell script to regenerate data files
├── .gitignore
├── LICENSE
└── README.md

🔧 Tech Stack

  • JavaScript (vanilla, no build step, no framework)
  • Manifest V3 Chrome extension API
  • CSS with light/dark mode variables
  • PowerShell for data build pipeline

🗺 Roadmap

  • Optional AI-powered complexity analysis (bring-your-own-key)
  • Per-user study stats (problems solved, frequency distribution, streaks)
  • Customizable widgets (reorder, hide, theme)
  • Firefox port (Manifest V2/V3 hybrid)
  • Spaced-repetition mode that surfaces problems you haven't solved recently

🤝 Contributing

PRs welcome! The data pipeline is fully scriptable, and the content script is intentionally framework-free so additions are cheap.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit your changes
  4. Push and open a Pull Request

If you spot a problem with company tags / frequencies, the upstream source lives at snehasishroy/leetcode-companywise-interview-questions — please report it there so the next data refresh picks it up.


🔒 Privacy

BuddyCode does not collect, transmit, or sell any user data. Specifically:

  • ❌ No analytics, no telemetry, no error reporting
  • ❌ No keystroke logging, no code scraping, no submission scraping
  • ❌ No cookies, no fingerprinting
  • ✅ Only outbound network requests are two public, no-auth, cacheable fetches to raw.githubusercontent.com for ELO ratings and recent company tags
  • ✅ All settings and cached data live in chrome.storage.local (never synced, never sent anywhere)

See content.js for the full picture — the codebase is small enough to audit in one sitting.


📜 License

MIT © tusharkrbarman


🙏 Credits


If BuddyCode helped you land an offer, give it a ⭐ — it helps others find it.

About

Free Chrome extension showing company tags, interview frequency, ELO ratings, and post-submission diagnostics on every LeetCode problem. Privacy-first, no sign-up, no telemetry.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages