# sarathkumargit/google-chrome-extension architecture

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

- Interactive diagram: https://gitdiagram.com/sarathkumargit/google-chrome-extension
- Repository: https://github.com/sarathkumargit/google-chrome-extension

## Overview

This small browser extension lets a user select a video, upload it to Cloudinary, and copy the returned link. The popup script also saves the link in browser-local storage. The HTML and manifest contents were not provided, so the UI node is based on the file tree and the script’s DOM references; no restore-on-open behavior is inferred.

Main entry points: [`popup.html`](https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.html) (Popup Controls), [`popup.js`](https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.js) (Link Handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_popup["Extension Popup"]
  node_controls["Popup Controls<br/>[popup.html]"]
end

subgraph group_upload["Video Upload"]
  node_upload_flow["Upload Flow<br/>[popup.js]"]
  node_link_handling["Link Handling<br/>[popup.js]"]
end

subgraph group_services["Browser Services"]
  node_cloudinary["Cloudinary"]
  node_local_storage[("Local Storage")]
  node_clipboard["Clipboard"]
end

node_user(("User"))

node_user -->|"selects video"| node_controls
node_controls -->|"starts upload"| node_upload_flow
node_upload_flow -->|"uploads video"| node_cloudinary
node_upload_flow -->|"sets returned URL"| node_link_handling
node_link_handling -->|"saves link"| node_local_storage
node_user -->|"copies link"| node_controls
node_controls -->|"requests copy"| node_link_handling
node_link_handling -->|"writes link"| node_clipboard

click node_controls "https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.html"
click node_upload_flow "https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.js"
click node_link_handling "https://github.com/sarathkumargit/google-chrome-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_controls,node_user toneBlue
class node_upload_flow,node_link_handling toneAmber
class node_cloudinary,node_local_storage,node_clipboard toneMint
```

## Components

### Extension Popup

- [Popup Controls](https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.html): `popup.html`

### Video Upload

- [Upload Flow](https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.js): `popup.js`
- [Link Handling](https://github.com/sarathkumargit/google-chrome-extension/blob/main/popup.js): `popup.js`

### Browser Services

- **Cloudinary**
- **Local Storage**
- **Clipboard**

### Other components

- **User**

## Connections

- User → Popup Controls: selects video
- Popup Controls → Upload Flow: starts upload (evidence: `popup.js`)
- Upload Flow → Cloudinary: uploads video (evidence: `popup.js`)
- Upload Flow → Link Handling: sets returned URL (evidence: `popup.js`)
- Link Handling → Local Storage: saves link (evidence: `popup.js`)
- User → Popup Controls: copies link
- Popup Controls → Link Handling: requests copy (evidence: `popup.js`)
- Link Handling → Clipboard: writes link (evidence: `popup.js`)
