# azaanmr/leetcompanies-extension architecture

> Architecture diagram of the GitHub repository azaanmr/leetcompanies-extension, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azaanmr/leetcompanies-extension
- Repository: https://github.com/azaanmr/leetcompanies-extension

## Overview

Leet Companies is a Chrome extension for finding company interview-frequency tags while practicing LeetCode. On a problem page, its content script loads problem data, builds and inserts a company widget, and offers links to the company-question web app. Separately, the toolbar popup searches companies and problems and links to the relevant destinations. The README describes the data as bundled and offline, but the data file is absent from the supplied tree, so it is not represented as a repository node. The sampled files show these behaviors; other wiring was not inspected.

Main entry points: [`content.js`](https://github.com/azaanmr/leetcompanies-extension/blob/main/content.js) (Tag Injector), [`popup.js`](https://github.com/azaanmr/leetcompanies-extension/blob/main/popup.js) (Quick Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page["Problem Page"]
  node_injector["Tag Injector<br/>[content.js]"]
end

subgraph group_toolbar["Toolbar Search"]
  node_popup["Quick Search<br/>[popup.js]"]
end

node_leetcode(("LeetCode"))
node_webapp["Leet Companies Web App"]

node_leetcode -->|"hosts script"| node_injector
node_injector -->|"inserts widget"| node_leetcode
node_injector -->|"links to"| node_webapp
node_popup -->|"opens company results"| node_webapp
node_popup -->|"opens problems"| node_leetcode

click node_injector "https://github.com/azaanmr/leetcompanies-extension/blob/main/content.js"
click node_popup "https://github.com/azaanmr/leetcompanies-extension/blob/main/popup.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_injector toneBlue
class node_popup toneAmber
class node_leetcode,node_webapp toneIndigo
```

## Components

### Problem Page

- [Tag Injector](https://github.com/azaanmr/leetcompanies-extension/blob/main/content.js): `content.js`

### Toolbar Search

- [Quick Search](https://github.com/azaanmr/leetcompanies-extension/blob/main/popup.js): `popup.js`

### Other components

- **LeetCode**
- **Leet Companies Web App**

## Connections

- LeetCode → Tag Injector: hosts script (evidence: `README.md`)
- Tag Injector → LeetCode: inserts widget (evidence: `content.js`)
- Tag Injector → Leet Companies Web App: links to (evidence: `content.js`)
- Quick Search → Leet Companies Web App: opens company results (evidence: `popup.js`)
- Quick Search → LeetCode: opens problems (evidence: `popup.js`)
