# o-yol/balloon architecture

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

- Interactive diagram: https://gitdiagram.com/o-yol/balloon
- Repository: https://github.com/o-yol/balloon

## Overview

Balloon is a Manifest V3 Chrome extension for saving programming problems, scheduling revisions, and tracking progress. Users save problems from the popup or a page button; the documented quick-save path sends a message from the content script to the service worker, which saves through shared storage. The popup provides the library, revision queue, statistics, and data import/export. The README documents these relationships, but no source excerpts were available, so internal calls beyond those stated are not shown.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Popup interface"]
  node_popup["Popup"]
end

subgraph group_runtime["Extension runtime"]
  node_content["Content script"]
  node_worker["Service worker"]
end

subgraph group_shared["Shared logic"]
  node_storage["Data storage"]
  node_platforms["Platform detection"]
  node_review["Revision rules"]
  node_insights["Insights"]
  node_dates["Date helpers"]
end

subgraph group_browser["Browser services"]
  node_local[("Local storage")]
  node_toolbar["Toolbar badge"]
end

node_user(("User"))
node_problem_site["Problem site"]

node_user -->|"uses"| node_popup
node_user -->|"opens"| node_problem_site
node_problem_site -->|"runs on"| node_content
node_user -->|"saves via button"| node_content
node_content -->|"messages"| node_worker
node_worker -->|"saves through"| node_storage
node_popup -->|"reads and writes"| node_storage
node_storage -->|"reads and writes"| node_local
node_worker -->|"updates badge"| node_toolbar

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_popup,node_user toneBlue
class node_content,node_worker toneAmber
class node_storage,node_platforms,node_review,node_insights,node_dates toneMint
class node_local,node_toolbar toneRose
class node_problem_site toneIndigo
```

## Components

### Popup interface

- **Popup**

### Extension runtime

- **Content script**
- **Service worker**

### Shared logic

- **Data storage**
- **Platform detection**
- **Revision rules**
- **Insights**
- **Date helpers**

### Browser services

- **Local storage**
- **Toolbar badge**

### Other components

- **User**
- **Problem site**

## Connections

- User → Popup: uses (evidence: `README.md`)
- User → Problem site: opens (evidence: `README.md`)
- Problem site → Content script: runs on (evidence: `README.md`)
- User → Content script: saves via button (evidence: `README.md`)
- Content script → Service worker: messages (evidence: `README.md`)
- Service worker → Data storage: saves through (evidence: `README.md`)
- Popup → Data storage: reads and writes (evidence: `README.md`)
- Data storage → Local storage: reads and writes (evidence: `README.md`)
- Service worker → Toolbar badge: updates badge (evidence: `README.md`)
