# enisthebiker/ebtools architecture

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

- Interactive diagram: https://gitdiagram.com/enisthebiker/ebtools
- Repository: https://github.com/enisthebiker/ebtools

## Overview

EBTools is a browser-based collection of everyday tools; the sampled runtime centers on image utilities, with image conversion identified as a working prototype. The user-facing flow is to find a tool, load or edit an image, process it in the selected tool, then obtain an output. The sampled code supports worker-based codec processing and canvas editing. Several page links and unsampled tool internals are not shown, so those relationships are omitted rather than inferred.

Main entry points: [`image-tools/Converter/script.js`](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/script.js) (Image converter), [`image-tools/Rotate/script.js`](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Rotate/script.js) (Rotate and flip), [`image-tools/Converter/avif.worker.js`](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/avif.worker.js) (AVIF codec worker), [`image-tools/Converter/heic-encoder.worker.js`](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/heic-encoder.worker.js) (HEIC encoder worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Tool discovery"]
  node_home["Tool directory<br/>[script.js]"]
  node_image_category["Image tools page<br/>[script.js]"]
end

subgraph group_image_tools["Image tools"]
  node_compressor["Image compressor<br/>[script.js]"]
  node_rotate["Rotate and flip<br/>[script.js]"]
  node_watermark["Watermark editor<br/>[script.js]"]
end

subgraph group_conversion["Image conversion"]
  node_converter["Image converter<br/>[script.js]"]
end

subgraph group_codec_workers["Codec workers"]
  node_avif_worker["AVIF codec worker<br/>[avif.worker.js]"]
  node_gif_worker["GIF encoder worker<br/>[gif.worker.js]"]
  node_heic_decoder["HEIC decoder worker<br/>[heic.worker.js]"]
  node_heic_encoder["HEIC encoder worker"]
  node_tiff_worker["TIFF codec worker<br/>[tiff.worker.js]"]
end

node_visitor(("Visitor"))
node_codec_cdn{{"Codec CDN"}}
node_browser_canvas["Browser canvas"]

node_visitor -->|"opens"| node_home
node_visitor -.->|"opens"| node_image_category
node_visitor -.->|"selects image"| node_compressor
node_visitor -.->|"selects image"| node_rotate
node_visitor -.->|"selects image"| node_watermark
node_visitor -.->|"selects image"| node_converter
node_compressor -->|"encodes HEIC"| node_heic_encoder
node_rotate -->|"requests AVIF"| node_avif_worker
node_rotate -->|"encodes HEIC"| node_heic_encoder
node_watermark -->|"edits canvas"| node_browser_canvas
node_rotate -->|"renders transform"| node_browser_canvas
node_converter -->|"requests codec"| node_avif_worker
node_converter -->|"decodes HEIC"| node_heic_decoder
node_converter -.->|"encodes GIF"| node_gif_worker
node_converter -.->|"processes TIFF"| node_tiff_worker
node_avif_worker -->|"loads AVIF codec"| node_codec_cdn
node_heic_decoder -->|"loads decoder"| node_codec_cdn
node_heic_encoder -->|"loads encoder"| node_codec_cdn
node_tiff_worker -->|"loads TIFF libraries"| node_codec_cdn

click node_home "https://github.com/enisthebiker/ebtools/blob/main/script.js"
click node_image_category "https://github.com/enisthebiker/ebtools/blob/main/image-tools/script.js"
click node_compressor "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Compressor/script.js"
click node_rotate "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Rotate/script.js"
click node_watermark "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Watermark/script.js"
click node_converter "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/script.js"
click node_avif_worker "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/avif.worker.js"
click node_gif_worker "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/gif.worker.js"
click node_heic_decoder "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/heic.worker.js"
click node_heic_encoder "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/heic-encoder.worker.js"
click node_tiff_worker "https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/tiff.worker.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_home,node_image_category,node_browser_canvas toneBlue
class node_compressor,node_rotate,node_watermark toneAmber
class node_converter toneMint
class node_avif_worker,node_gif_worker,node_heic_decoder,node_heic_encoder,node_tiff_worker toneRose
class node_visitor,node_codec_cdn toneIndigo
```

## Components

### Tool discovery

- [Tool directory](https://github.com/enisthebiker/ebtools/blob/main/script.js): `script.js`
- [Image tools page](https://github.com/enisthebiker/ebtools/blob/main/image-tools/script.js): `image-tools/script.js`

### Image tools

- [Image compressor](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Compressor/script.js): `image-tools/Compressor/script.js`
- [Rotate and flip](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Rotate/script.js): `image-tools/Rotate/script.js`
- [Watermark editor](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Watermark/script.js): `image-tools/Watermark/script.js`

### Image conversion

- [Image converter](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/script.js): `image-tools/Converter/script.js`

### Codec workers

- [AVIF codec worker](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/avif.worker.js): `image-tools/Converter/avif.worker.js`
- [GIF encoder worker](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/gif.worker.js): `image-tools/Converter/gif.worker.js`
- [HEIC decoder worker](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/heic.worker.js): `image-tools/Converter/heic.worker.js`
- [HEIC encoder worker](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/heic-encoder.worker.js): `image-tools/Converter/heic-encoder.worker.js`
- [TIFF codec worker](https://github.com/enisthebiker/ebtools/blob/main/image-tools/Converter/tiff.worker.js): `image-tools/Converter/tiff.worker.js`

### Other components

- **Visitor**
- **Codec CDN**
- **Browser canvas**

## Connections

- Visitor → Tool directory: opens (evidence: `readme.md`)
- Visitor → Image tools page: opens
- Visitor → Image compressor: selects image
- Visitor → Rotate and flip: selects image
- Visitor → Watermark editor: selects image
- Visitor → Image converter: selects image
- Image compressor → HEIC encoder worker: encodes HEIC (evidence: `image-tools/Compressor/script.js`)
- Rotate and flip → AVIF codec worker: requests AVIF (evidence: `image-tools/Rotate/script.js`)
- Rotate and flip → HEIC encoder worker: encodes HEIC (evidence: `image-tools/Rotate/script.js`)
- Watermark editor → Browser canvas: edits canvas (evidence: `image-tools/Watermark/script.js`)
- Rotate and flip → Browser canvas: renders transform (evidence: `image-tools/Rotate/script.js`)
- Image converter → AVIF codec worker: requests codec (evidence: `image-tools/Converter/script.js`)
- Image converter → HEIC decoder worker: decodes HEIC (evidence: `image-tools/Converter/script.js`)
- Image converter → GIF encoder worker: encodes GIF
- Image converter → TIFF codec worker: processes TIFF
- AVIF codec worker → Codec CDN: loads AVIF codec (evidence: `image-tools/Converter/avif.worker.js`)
- HEIC decoder worker → Codec CDN: loads decoder (evidence: `image-tools/Converter/heic.worker.js`)
- HEIC encoder worker → Codec CDN: loads encoder (evidence: `image-tools/Converter/heic-encoder.worker.js`)
- TIFF codec worker → Codec CDN: loads TIFF libraries (evidence: `image-tools/Converter/tiff.worker.js`)
