# mifada2543/meinsert architecture

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

- Interactive diagram: https://gitdiagram.com/mifada2543/meinsert
- Repository: https://github.com/mifada2543/meinsert

## Overview

MeInsert is a browser-only metadata editor for image, audio, video, PDF, and Office files. Users choose single-file editing, batch processing, or metadata cleaning; they inspect and verify changes before saving locally. The architecture separates format recognition and adapters, editing workflows, batch processing, and browser workers/offline support. The README documents these capabilities, but most application source was not sampled, so internal call relationships are omitted rather than inferred; offline cache behavior is supported by the shown service-worker excerpt.

Main entry points: [`single.html`](https://github.com/mifada2543/meinsert/blob/main/single.html) (Single-file page), [`batch.html`](https://github.com/mifada2543/meinsert/blob/main/batch.html) (Batch page), [`index.html`](https://github.com/mifada2543/meinsert/blob/main/index.html) (Metadata cleaning), [`assets/js/app.js`](https://github.com/mifada2543/meinsert/blob/main/assets/js/app.js) (App controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflows["Editing workflows"]
  node_single_page["Single-file page<br/>[single.html]"]
  node_batch_page["Batch page<br/>[batch.html]"]
  node_clean_page["Metadata cleaning<br/>[index.html]"]
  node_app["App controller<br/>[app.js]"]
  node_editor["Editor state and save"]
  node_batch["Batch processing"]
  node_timed_text["Timed text editing<br/>[timed-text.js]"]
  node_media_cut["Media cutting<br/>[media-cut.js]"]
end

subgraph group_formats["Format handling"]
  node_detector["Format detection<br/>[detector.js]"]
  node_registry["Format registry<br/>[registry.js]"]
  node_adapters["Format adapters"]
  node_exiftool["ExifTool engine<br/>[exiftool.js]"]
end

subgraph group_interface["Editor interface"]
  node_ui["Editor and review UI"]
end

subgraph group_runtime["Browser runtime"]
  node_workers["Web workers"]
  node_worker_client["Worker client<br/>[worker-client.js]"]
  node_service_worker["Offline caching<br/>[sw.js]"]
end

node_user(("File owner"))
node_browser_files["Local file input and output"]

node_user -->|"opens editor"| node_single_page
node_user -->|"opens batch mode"| node_batch_page
node_user -->|"chooses cleaning"| node_clean_page
node_single_page -.->|"starts editing"| node_app
node_batch_page -.->|"processes files"| node_batch
node_clean_page -.->|"starts cleaning"| node_app
node_user -->|"selects local files"| node_browser_files
node_browser_files -->|"saves reviewed result"| node_user
node_user -->|"edits synced text"| node_timed_text
node_user -->|"cuts media"| node_media_cut
node_service_worker -->|"enables offline use"| node_user

click node_single_page "https://github.com/mifada2543/meinsert/blob/main/single.html"
click node_batch_page "https://github.com/mifada2543/meinsert/blob/main/batch.html"
click node_clean_page "https://github.com/mifada2543/meinsert/blob/main/index.html"
click node_app "https://github.com/mifada2543/meinsert/blob/main/assets/js/app.js"
click node_editor "https://github.com/mifada2543/meinsert/tree/main/assets/js/editor"
click node_batch "https://github.com/mifada2543/meinsert/tree/main/assets/js/batch"
click node_timed_text "https://github.com/mifada2543/meinsert/blob/main/assets/js/core/timed-text.js"
click node_media_cut "https://github.com/mifada2543/meinsert/blob/main/assets/js/core/media-cut.js"
click node_detector "https://github.com/mifada2543/meinsert/blob/main/assets/js/core/detector.js"
click node_registry "https://github.com/mifada2543/meinsert/blob/main/assets/js/core/registry.js"
click node_adapters "https://github.com/mifada2543/meinsert/tree/main/assets/js/formats"
click node_exiftool "https://github.com/mifada2543/meinsert/blob/main/assets/js/engines/exiftool.js"
click node_ui "https://github.com/mifada2543/meinsert/tree/main/assets/js/ui"
click node_workers "https://github.com/mifada2543/meinsert/tree/main/assets/js/workers"
click node_worker_client "https://github.com/mifada2543/meinsert/blob/main/assets/js/core/worker-client.js"
click node_service_worker "https://github.com/mifada2543/meinsert/blob/main/sw.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_single_page,node_batch_page,node_clean_page,node_app,node_editor,node_batch,node_timed_text,node_media_cut toneBlue
class node_detector,node_registry,node_adapters,node_exiftool toneAmber
class node_ui toneMint
class node_workers,node_worker_client,node_service_worker toneRose
class node_user,node_browser_files toneIndigo
```

## Components

### Editing workflows

- [Single-file page](https://github.com/mifada2543/meinsert/blob/main/single.html): `single.html`
- [Batch page](https://github.com/mifada2543/meinsert/blob/main/batch.html): `batch.html`
- [Metadata cleaning](https://github.com/mifada2543/meinsert/blob/main/index.html): `index.html`
- [App controller](https://github.com/mifada2543/meinsert/blob/main/assets/js/app.js): `assets/js/app.js`
- [Editor state and save](https://github.com/mifada2543/meinsert/tree/main/assets/js/editor): `assets/js/editor`
- [Batch processing](https://github.com/mifada2543/meinsert/tree/main/assets/js/batch): `assets/js/batch`
- [Timed text editing](https://github.com/mifada2543/meinsert/blob/main/assets/js/core/timed-text.js): `assets/js/core/timed-text.js`
- [Media cutting](https://github.com/mifada2543/meinsert/blob/main/assets/js/core/media-cut.js): `assets/js/core/media-cut.js`

### Format handling

- [Format detection](https://github.com/mifada2543/meinsert/blob/main/assets/js/core/detector.js): `assets/js/core/detector.js`
- [Format registry](https://github.com/mifada2543/meinsert/blob/main/assets/js/core/registry.js): `assets/js/core/registry.js`
- [Format adapters](https://github.com/mifada2543/meinsert/tree/main/assets/js/formats): `assets/js/formats`
- [ExifTool engine](https://github.com/mifada2543/meinsert/blob/main/assets/js/engines/exiftool.js): `assets/js/engines/exiftool.js`

### Editor interface

- [Editor and review UI](https://github.com/mifada2543/meinsert/tree/main/assets/js/ui): `assets/js/ui`

### Browser runtime

- [Web workers](https://github.com/mifada2543/meinsert/tree/main/assets/js/workers): `assets/js/workers`
- [Worker client](https://github.com/mifada2543/meinsert/blob/main/assets/js/core/worker-client.js): `assets/js/core/worker-client.js`
- [Offline caching](https://github.com/mifada2543/meinsert/blob/main/sw.js): `sw.js`

### Other components

- **File owner**
- **Local file input and output**

## Connections

- File owner → Single-file page: opens editor (evidence: `README.md`)
- File owner → Batch page: opens batch mode (evidence: `README.md`)
- File owner → Metadata cleaning: chooses cleaning (evidence: `README.md`)
- Single-file page → App controller: starts editing
- Batch page → Batch processing: processes files
- Metadata cleaning → App controller: starts cleaning
- File owner → Local file input and output: selects local files (evidence: `README.md`)
- Local file input and output → File owner: saves reviewed result (evidence: `README.md`)
- File owner → Timed text editing: edits synced text (evidence: `README.md`)
- File owner → Media cutting: cuts media (evidence: `README.md`)
- Offline caching → File owner: enables offline use (evidence: `README.md`)
